Opencv Camera Interfacing
Hello I am working on a project based on template matching. In my project I am using Rapberry Pi and Logitech C270 HD webcam. When I am trying to take picture from the camera using the sample program (from opencv build directory) I am getting error during compilation:
pi@raspberrypi ~/opencv-2.4.9/finalproject/templet_matching/camera $ ./starter_video 0
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP
press space to save a picture. q or esc to quit
init done
opengl support available
Corrupt JPEG data: 1 extraneous bytes before marker 0xd2
Mat WIdth:640
Mat Height:480
Corrupt JPEG data: 1 extraneous bytes before marker 0xd0
Mat WIdth:640
Mat Height:480
please help me. Thank you
Did you built OpenCV with the -WITH_JPEG=ON flag? It seems that it cannot read the supplied JPEG header information.
I am not sure I have just followed the standard procedure of building opencv.
Can you add explicitly
-D WITH_JPEG=ON -D WITH_JASPER=ON
and see if the error still occurs after rebuilding?