how can I load videoCapture inside windows for in a picture box
I have build a form that will serve as an interface, but now I am experiencing some problems getting cameraCapture load inside a pictureBox, I have done this code:
VideoCapture capture(0);
if (!capture.isOpened()) {
information->Text = "no signal!";
exit(0);
}
else {
timer1->Start();
information->Text = " Signal!";
Mat frame, gray, gray_old, dif;
capture>>frame;
cvtColor(frame, gray_old, CV_BGR2GRAY);
GaussianBlur(gray_old, gray_old, cv::Size(11, 11), 1.5, 1.5);
frame = cvQueryFrame(capture);
cvCopy(frame,frame); //it's important if u make the image in 3 channel or filtering
pictureBox1->Image = gcnew //replacement of cvShowImage
System::Drawing::Bitmap(frame->width,frame->height,frame->widthStep,
System::Drawing::Imaging::PixelFormat::Format24bppRgb,(System::IntPtr) frame->imageData);
pictureBox1->Refresh();
How can I show the cameraCapture? All syntax "frame" is underlined in red after Gaussian function... The error: error C2819: type 'cv::Mat' does not have an overloaded member 'operator ->'
Can you help me please
frame = cvQueryFrame(capture); // you already done the same some lines above. also, avoid all old c-api functions .. !
"problem is After GaussianBlur all word's like frame and capture give error" - meaning what, exactly ?
since your Mat is neither a pointer, not an IplImage (again, skip those old c-idioms), try frame.cols, frame.rows, etc