Unsigned short PlayBack1Calculate: : CalGlayMax (unsigned int * Array_Hist, unsigned short Number_Pixel)
{
Unsigned int Number_Pixel_Inside=0;
//Number_Pixel_Inside=0;
For (int I=IMAGE_LEN - 1; I & gt; 0; I -)
{
Number_Pixel_Inside +=Array_Hist [I];//this is a problem the breakpoint
If (Number_Pixel_Inside & gt;=Number_Pixel)
{
Return ((unsigned short) I);
}
}
Return ((unsigned short) 0);
}
CodePudding user response:
Mostly Array_Hist crossing the line, or before calling this function and destroys memory,No shortcut, debug step by step