Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VideoCapture result in distorted lines in image

I am trying to click an image from Webcam using OpenCV. My code is as follows.

VideoCapture cap0(0); cap0.set(CV_CAP_PROP_FRAME_WIDTH,320); cap0.set(CV_CAP_PROP_FRAME_HEIGHT,240); cap0 >> frame; string fileName = "/0.jpg"; cout << fileName << endl; imwrite(fileName, frame); I am getting this image as output

image description

You can see some weird lines in output., What is the possible reason and how i can eliminate these Please point me to the right direction.

Thanks

VideoCapture result in distorted lines in image

I am trying to click an image from Webcam using OpenCV. My code is as follows.

VideoCapture cap0(0);
cap0.set(CV_CAP_PROP_FRAME_WIDTH,320);
cap0.set(CV_CAP_PROP_FRAME_HEIGHT,240);
cap0 >> frame;
string fileName = "/0.jpg";
cout << fileName << endl;
imwrite(fileName, frame);

I am getting this image as output

image description

You can see some weird lines in output., What is the possible reason and how i can eliminate these Please point me to the right direction.

Thanks