fail to call a function .
Halo everyone, i am new to this forum and new to vc++ as well. Nice to meet u all.
as my topic mention above, i am failed to call a function.
by using vc++ 6, i create button on GUI and edited code on it. The function is named as shown below.In this part of code, i would like to call another function that called mask and there are 3 variables (m,x,and y)that i wish to bring along to the mask function.
The problem i meet is i failed to call the mask function.
what happen to my code?? is that i should not use "void" ??
Pleas advise ...thanks !!
void CFingerPrintBiometricSystemDlg::OnThinning()
IplImage* temp=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1) ;
temp = cvLoadImage( "threshold_thin.bmp", 0 );
if(!temp) printf("Could not load image file:%s\n","threshold_thin.bmp");
int m;
int x=2;
int y=2;
CvScalar s;
for (m=0; m<8 ; m++)
{
for (x; x< temp->width; x++)
{
for (y; y<temp-> height;y++)
{
s= cvGet2D(temp,y,x);
if (s.val[0]=0)
{
mask(m,x,y);
}
}
}
}
void CFingerPrintBiometricSystemDlg::mask(int m, int x, int y)
IplImage* temp=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1) ;
temp = cvLoadImage( "threshold_thin.bmp", 0 );
if(!temp) printf("Could not load image file: %s\n","threshold_thin.bmp");
CvScalar value_white;
value_white.val[0] =255;
value_white.val[1] =255;
value_white.val[2] =255;
if (m=1)
{
CvScalar p_c;
p_c= cvGet2D(temp,y,x);
CvScalar p_cb;
p_cb = cvGet2D (temp,y-1,x);
CvScalar p_lb;
p_lb = cvGet2D (temp,y-1,x-1);
CvScalar p_rb;
p_rb = cvGet2D (temp,y-1,x+1);
if (p_c.val[0]==0 && p_cb.val[0]==0 && p_lb.val[0]==0 && p_rb.val[0]==0)
{
cvSet2D(temp,y,x-1, value_white);
cvSet2D(temp,y,x+1, value_white);
cvSaveImage( "threshold_thin.bmp", temp );
temp = cvLoadImage( "threshold_thin.bmp", 0 );
}
}
.
.
.
.
.
|