VideoCapture result in distorted lines in image [closed]

asked 2016-11-14 01:52:01 -0600

Saghir Khatri gravatar image

updated 2016-11-14 01:52:35 -0600

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-04 12:37:51.719121