Ask Your Question
0

cant get logitech c170 working(cant read mjpg)

asked 2013-09-08 05:38:09 -0500

naeeem gravatar image

updated 2013-09-11 07:15:52 -0500

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...

edit retag flag offensive close merge delete

Comments

MJPG ? did you mean MPEG instead ?

(MJPG is an ip/streaming protocol, http with interleaved single jpeg images)

berak gravatar imageberak ( 2013-09-11 07:21:01 -0500 )edit

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

naeeem gravatar imagenaeeem ( 2013-09-11 08:57:38 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-09-15 06:04:22 -0500

naeeem gravatar image

well i got answer....using tutorials c++ language...

edit flag offensive delete link more

Comments

how did you solve this problem!? cuz am having the same problem!

Peter_OpenCV gravatar imagePeter_OpenCV ( 2013-11-24 19:56:59 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-09-08 05:38:09 -0500

Seen: 1,257 times

Last updated: Sep 15 '13