VideoCapture result in distorted lines in image

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

Saghir Khatri gravatar image

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

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

VideoCapture cap0(0);
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.


edit retag flag offensive close merge delete