资 源 简 介
用如求直立主图统计程序。RGB有3个座标,分别是R,G,B,其值从0-255。把0-255分成4段,那么每个座标有4种取值,共可以表示4*4*4=64种颜色。程序中主要是histogram函数,它有两个参数,第1个参数是一个64位数组,每一位表示一种颜色,其值是该颜色出现的次数。另外两个函数numbercolor是对每个像素计算它的颜色值,fenduan是对参数x返回0-255中的某一段。主函数测试一副图片的颜色直方图的统计。-Used as the main map for vertical statistical procedures. RGB has three coordinates, namely R, G, B, its value from 0-255. The 0-255 is divided into 4, then there are four kinds of each coordinates value, can indicate a total of 4* 4* 4 = 64 kinds of colors. Process is mainly histogram function, it has two parameters, the first a parameter is a 64-digit group, each and every one expressed a different color, its value is the number of the color appears. The other two function numbercolor is calculated for each pixel its color value, fenduan of parameters x the return of a certain period of 0-255. The main function to test a picture of the color histogram statistics.