IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.49k stars 1.74k forks source link

Set shutter speed (not fps) for video recording? #463

Closed abarajithan11 closed 5 years ago

abarajithan11 commented 5 years ago

Hi,

I've attached three Realsense D435 cameras on a wheeled robot and I'm recording videos while driving it around. I'm controlling the camera through ROS (Intel relasense2_camera package) This way, I'm getting a video with each frame blurred. Is there a way to set the shutter speed?

Thanks

fiorano10 commented 5 years ago

@abarajithan11 What speed are you moving at? Which image stream are you looking at? Is it the RGB stream? If yes, It's a rolling shutter camera which would be the causing motion blur. Try using the infrared cameras instead, they are global shutter.

abarajithan11 commented 5 years ago

I'm moving at around 0.5 m/s and I'm looking at RGB stream. I need to train a DNN using the RGB frames. Isn't there an option to use a faster shutter speed? Would decreasing the exposure help?

fiorano10 commented 5 years ago

I don’t think you can change the shutter speed. The RGB camera is a rolling shutter which causes motion blur, and I don’t know if there’s a way around that. You’re best bet would be to use the infrared cameras instead.

stefangordon commented 5 years ago

Rolling shutter is going to cause distortion rather than blur. Regardless of the shutter type, each individual pixel has an exposure time (which is what is really meant when you say shutter speed in this context) which is the cause of the blur.

I believe you can manually set exposure, but of course it is roughly tied to available light. Does the blur go away if you run in bright light? (sunlight?)

doronhi commented 5 years ago

You can indeed change the exposure time using rqt_reconfigure. The image will be sharper but also darker. You'll may need a scene with more light. In addition to what @stefangordon said, rolling shutter will cause different parts of the image to be taken in different times (the effect of propeller where you can the same blade in several locations...) but this effect is only visible for very fast moving objects. If your problem is indeed concerned with a fast moving scene and rgb image is necessary you can try the D415 with global shutter rgb camera.

blubbi321 commented 5 years ago

@doronhi I also have the problem of a rapidly moving scene and the RGB stream being required. However, as far as I can see there is no D415 with global shutter for RGB and the D435 only has global shutter sensors on the IR streams. In case this is not right could you tell be where to get a D415 with a global shutter RGB sensor?

doronhi commented 5 years ago

I see that I got mixed up before. The cameras have the following sensors: D415 – depth - rolling shutter. RGB – rolling shutter. D435 – depth – Global shutter. RGB – rolling shutter.

There is no D415 with global shutter on the RGB sensor. Sorry about the misinformation.

blubbi321 commented 5 years ago

Ok, too bad. Thanks for the clarification!