Ask Your Question
1

Decreasing capture resolution of webcam

asked Apr 12 '13

unmesh gravatar image

How to reduce capturing resolution of webcam?? I have used iball C8.0(FACE2FACE) webcam. Without using function cvSetCaptureProperty it captures frame with 640x480 resolution, with this function it shows same resolution i.e. 640X480. I want change into 320X240 or 480x320 resolution. If i used following function to reduce resolution,

  1. cvSetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH, 320);
  2. cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 240);

it captures in 640x480 resolution and gives error

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP

Preview: (hide)

Comments

Are you sure that your camera supports these other resolutions? Many cheaper camera's only support single resolutions.

StevenPuttemans gravatar imageStevenPuttemans (Apr 12 '13)edit

1 answer

Sort by » oldest newest most voted
3

answered Apr 12 '13

hjf gravatar image

this is a limitation of the opencv against the Linux video API. I'm using a logitech C170, lsusb -v shows that it supports a lot of resolutions and formats (can even do BGR which would be good to feed opencv with).

on windows I can set the resolution and FPS just fine with this camera. for linux I had to change the opencv source (there's a define somewhere, i think #DEFAULT_WIDTH or something like that) and you can set to 320x240, for example. but it's a hardcoded value.

Preview: (hide)

Question Tools

Stats

Asked: Apr 12 '13

Seen: 4,360 times

Last updated: Apr 12 '13