First time here? Check out the FAQ!

Ask Your Question
0

cant get logitech c170 working(cant read mjpg)

asked Sep 8 '13

naeeem gravatar image

updated Sep 11 '13

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

Preview: (hide)

Comments

MJPG ? did you mean MPEG instead ?

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

berak gravatar imageberak (Sep 11 '13)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 (Sep 11 '13)edit

1 answer

Sort by » oldest newest most voted
0

answered Sep 15 '13

naeeem gravatar image

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

Preview: (hide)

Comments

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

Peter_OpenCV gravatar imagePeter_OpenCV (Nov 25 '13)edit

Question Tools

Stats

Asked: Sep 8 '13

Seen: 1,647 times

Last updated: Sep 15 '13