读书人

直方不知哪了解决办法

发布时间: 2013-10-27 15:21:50 作者: rapoo

直方,不知哪了
int n,N,A;
BYTE *ImgLineS,*ImgLineS1,max,Z,a;
float newp[256];
float count[256];
float p[256];
for(int y=0;y<ImgHeight;y++)
{
ImgLineS=(BYTE *)imgShow->Picture->Bitmap->ScanLine[y];
ImgLineS1=(BYTE *)imgEdge->Picture->Bitmap->ScanLine[y];
for(int x=0;x<ImgWidth;x++){
for(int j=0;j<256;j++){
if(ImgLineS[x]==j){
count[j]=count[j]+1;
}
int v = ImgHeight * ImgWidth;
p[j] = count[j] / v;
ImgLineS1[j]=(256/count[j])* p[j];
}
[解决办法]


int n,N,A;
BYTE *ImgLineS,*ImgLineS1,max,Z,a;
float newp[256];
float count[256];
float p[256];
for(int y=0;y<ImgHeight;y++)
{
ImgLineS=(BYTE *)imgShow->Picture->Bitmap->ScanLine[y];
ImgLineS1=(BYTE *)imgEdge->Picture->Bitmap->ScanLine[y];
for(int x=0;x<ImgWidth;x++){
for(int j=0;j<256;j++){
if(ImgLineS[x]==j){
count[j]=count[j]+1;
}
int v = ImgHeight * ImgWidth;
p[j] = count[j] / v;
ImgLineS1[j]=(256/count[j])* p[j];
}

读书人网 >C++ Builder

热点推荐