0

I work code in visual studio with a win32 console and opencv and it compiles fine, but when I worked with the same GUI code it causes a lot of errors. I want to display an IplImage in a picturebox but when compiling it always displays a message "identifier not defined" how to solve this problem thank you

private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) {
IplImage* img = 0;
int height,width,step,channels;
uchar *data;

cvNamedWindow("Fenetre_test", CV_WINDOW_AUTOSIZE);
cvMoveWindow("Fenetre_test", 100, 100);

CvCapture* capture = cvCaptureFromCAM(0);
while(cvWaitKey(600)!=' '){
img=cvQueryFrame(capture);

height = img->height;
width = img->width;
step = img->widthStep;
channels = img->nChannels;
data = (uchar *)img->imageData;
//cout << "Processing a " << width << "x" << height << " image with " << channels << " channels" << endl;

cvShowImage("Fenetre_test", img );
cvWaitKey(10);
int result=cvSaveImage("srcc.jpg",img);

error

 "CvCapture" identificatuer not declare
"img" identificatuer not declare
"height" identificatuer not declare
"width" identificatuer not declare
"step" identificatuer not declare
"channels" identificatuer not declare
"data" identificatuer not declare

however I declared its "IplImage* img = 0;
int height,width,step,channels;
uchar *data;"

0 Answers0