程序

来源:互联网 发布:百度搜索引擎 大数据 编辑:程序博客网 时间:2024/04/25 05:29
loat column[7]={0,0,0,0,0,0,0};float data[7][7]; for(i = 3;i<=m_nHeight-4;i++){int j = 3;//the data of 7*7for(int m = -3;m<=3;m++)for(int n = -3;n<=3;n++){COLORREF c = m_pImage->GetPixel(i+m,j+n);float grey = GetRValue(c);data[m+3][n+3] = grey;}//sum of 7 columnsfor(m=0;m<7;m++)for(int n=0;n<7;n++){column[m] = column[m]+data[n][m];}//the sum of all datafloat sum=0.0;for(m=0;m<7;m++){sum = sum + column[m];}//get the mean of the datafloat mean = sum =