ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to force a camera to lower its resolution using parameters?

asked 2018-04-25 11:52:11 -0500

Coppermind gravatar image

Hello, I am trying to use the parameters of cv_camera to lower the resolution of a video stream from a usb webcam. I attempted to launch the webcam using the following command:

rosrun cv_camera cv_camera_node __name:=test1 _device_id:=1 _image_width:=352 _image_height:=240

With the intent of using the image_width and image_height parameters to manually set the number of pixels. However, I did not notice any difference in the camera stream. Is this the proper procedure for trying to chance the resolution or is there a different method?

Any insight or assistance would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

I'm neither an expert on cameras nor on the cv_camera_node, but: Are you sure your "Webcam" (maybe note which model you have?) actually supports the resolution you are trying to set and that it actually supports setting it over the API?

mgruhler gravatar image mgruhler  ( 2018-04-26 09:36:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-27 14:10:00 -0500

Your camera has to support those given resolutions, otherwise the drivers don't know what to do. If this is a generic camera driver based on UVC or something and not implemented for your specific camera, you're probably out of luck. The SDK for the camera is most likely needed to do this.

Your alternative is to make a node which subscribes to that image and then it uses openCV or eq. to downsample to your desired resolution.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-04-25 11:52:11 -0500

Seen: 1,077 times

Last updated: Apr 27 '18