cant get logitech c170 working(cant read mjpg)
i tried to run the tutorial code for object detection. i have logitech c170 webcam with me. i am not able to run any tutorial codes with this cam connected.
HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP --(!) No captured frame -- Break!
but the same program runs effectively with my built in webcam. since i am a newbie to openCV i am not able to understand the mistakes.
when i took the details of the both cams(built in and logitech c170) using
v4l2-ctl --device=/dev/video0 --all
i got the difference that the pixel formats of both are different. the built in cam is YUYV while logitech is MJPG. more over i am completely unaware of MJPG format..i tried to change the formate to YUYV using
v4l2-ctl --device=/dev/video1 --set-fmt-video=width=640,height=480,pixelformat=0
i could change the format.but when i run the program again the error repeats the format is again changed to MJPG by the system.
consider me as smallest guy in OpenCV...
MJPG ? did you mean MPEG instead ?
(MJPG is an ip/streaming protocol, http with interleaved single jpeg images)
Driver Info (not using libv4l2): Driver name : uvcvideo Card type : Webcam C170 Bus info : usb-0000:00:1d.0-1.2 Driver version: 3.2.50 Capabilities : 0x04000001 Video Capture Streaming Format Video Capture: Width/Height : 640/480 Pixel Format : 'MJPG' Field : None Bytes per Line: 0 Size Image : 921600 Colorspace : SRGB Crop Capability Video Capture: Bounds : Left 0, Top 0, Width 640, Height 480 Default : Left 0, Top 0, Width 640, Height 480 Pixel Aspect: 1/1 Video input : 0 (Camera 1: ok) Streaming Parameters Video Capture: Capabilities : timeperframe Frames per second: 30.000 (30/1) Read buffers : 0
this is what i get when i entered v4l2-ctl --device=/dev/video0 --all in terminal...its MJPG