I have a problem with the cvGet2D in opencv. I captured video from webcam, and it work. There is a code part, and i see the video in the opencv window, but the s Scalar always get 0 value. But there is an image in the "gray" iplimage. What i missed in the code?
.... IplImage *frame; IplImage gray; CvCapture capture = cvCaptureFromCAM(2); CvScalar s;
.....
frame = cvQueryFrame( capture );
gray = cvCreateImage( cvGetSize(frame), IPL_DEPTH_8U,1 );
cvCvtColor(frame, gray, CV_RGB2GRAY);
s=cvGet2D(frame,100,100);
....
cvShowImage( "Cam", gray );
Please help me somebody! Thank you!
Comment #1
Posted on Dec 7, 2009 by Quick Giraffei used it in the code, just writed wrong here:
s=cvGet2D(grey,100,100);
so problem is the same.
Status: New
Labels:
Type-Defect
Priority-Medium