Hi everyone,
Below is part of my source code which consists of reading the intensities of pixels along 25 vertical intervals in a pgm picture format. The problem is that I'm having only the first value of H at the first interval, which means the first "for loop" is not incrementing.I want to have the values of H at each interval.Please help me.
Thanks.
void CKevinView::OnIndex()
{
// TODO: Add your command handler code here
int first;
int count;
int H;
int interval=NewImage.width/25;
for (int j = interval; j <= NewImage.width; (j+=interval)++)
{
first=0;
count=0;
for ( int i=0; i<NewImage.height; i++)
{
if (NewImage.matrix[j].real > 50 )
first++;
if (NewImage.matrix[j].real > 230)
count++;
}
}
H=((first-count)/count)*100;
m_show.m_h = count;
m_show.DoModal();
}
Below is part of my source code which consists of reading the intensities of pixels along 25 vertical intervals in a pgm picture format. The problem is that I'm having only the first value of H at the first interval, which means the first "for loop" is not incrementing.I want to have the values of H at each interval.Please help me.
Thanks.
void CKevinView::OnIndex()
{
// TODO: Add your command handler code here
int first;
int count;
int H;
int interval=NewImage.width/25;
for (int j = interval; j <= NewImage.width; (j+=interval)++)
{
first=0;
count=0;
for ( int i=0; i<NewImage.height; i++)
{
if (NewImage.matrix[j].real > 50 )
first++;
if (NewImage.matrix[j].real > 230)
count++;
}
}
H=((first-count)/count)*100;
m_show.m_h = count;
m_show.DoModal();
}