Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images from D415 stereo camera a blurred. We cannot recognize bar codes when measuring from 70 cm distance. #7187

Closed
Aaituov opened this issue Aug 25, 2020 · 16 comments

Comments

@Aaituov
Copy link

Aaituov commented Aug 25, 2020

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version { legacy / 2.. }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

<Describe your issue / question / feature request / etc..>

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 25, 2020

Hi @Aaituov Can you confirm which sensor on the D415 camera is blurred please. Is it the RGB color? Thank you.

@Aaituov
Copy link
Author

Aaituov commented Aug 25, 2020

@MartyG-RealSense Hi! Yep, RGB color. Output from camera which we get - JPEG image. Its quality is not satisfactory enough, so our/and thirt party proven object recognition algorithms could recognize bar code image.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 25, 2020

You can reduce blurring by using 60 FPS for the RGB. Some more technical detail about this is on the link below:

#3554

Alternatively you could look into whether the new RealSense D455 camera would be suitable for your project, as its RGB sensor has a fast global shutter for the first time like the depth sensor does (previous 400 Series models have used a slower rolling shutter on the RGB sensor).

@Aaituov
Copy link
Author

Aaituov commented Aug 26, 2020

Hi! In #3554 they talk about blurred video image. While we have problems with photo image. Is there any solution for RGB blurred photoes?
Thank you!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 26, 2020

Blurring should still affect a static image if the observed object was moving quickly at the time that the single-frame image was captured.

If using 60 FPS for RGB is not an ideal anti-blurring solution for you, you could try reducing the RGB exposure value. However, this darkens the image. You can compensate by increasing the value of the RGB gain to re-brighten the image, though this may result in increased noise.

@Aaituov
Copy link
Author

Aaituov commented Sep 1, 2020

Our object is static and moving. We didn't try to reduce RGB expose value and gain. BUt we increased FPS from 30 to 60. But quality of image became too bad for us. IT decreased from 1028 to 765.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 1, 2020

I ran tests where I tried to observe a normal sized bar code on a multipack of Coke using the RGB stream in the RealSense Viewer. I can understand better now the results that you are getting. At 70 cm away or more, the lines of the barcode start blurring together, making them likely unreadable. Moving the camera in closer makes the lines of the code sharper.

Would it be possible to move the camera in closer than 70 cm in your project, please? For example, if you are only using the RGB stream, the minimum depth restriction of the depth sensing does not apply. When the depth stream is being used, you can move in as close as 0.3 meters on the D415, and closer if you reduce the camera's minimum distance by increasing the Disparity Shift value.

image

Edit: I had an idea and placed a magnifying glass in front of the camera's RGB lens a short distance from the camera. It doubled the size of the barcode whilst retaining sharpness, acting as a zoom. It requires a very clean magnifying glass, but it did make a significant difference in my test.

@MartyG-RealSense
Copy link
Collaborator

Hi @Aaituov Do you still require assistance wth this case, please? Thanks!

@Aaituov
Copy link
Author

Aaituov commented Sep 9, 2020 via email

@MartyG-RealSense
Copy link
Collaborator

Okay, thank you. Let's recap on what the current situation is. You want to scan bar codes and the camera is fixed at a distance of 70 cm from the bar code. But the bar code is too blurred to recognize from that distance. And putting some kind of magnifier in front of the RGB lens, as suggested above, is not an option. Is that correct, please?

@Aaituov
Copy link
Author

Aaituov commented Sep 10, 2020 via email

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 10, 2020

I conducted further RGB tests with a D415 in the RealSense Viewer at 640x480 and approximately 70 cm distance with a barcode and found that blurring of the barcode could be reduced by maximizing the Sharpness option to a value of '100'.

Also, make sure that there is not a Decimation post-processing filter active on the RGB, as this can significantly increase blurring.

Disabling RGB auto-exposure and auto white-balance, maximizing RGB 'Gain' to 128 to brighten the image and reducing RGB 'White Balance' to around 3600 also helped to create a strong bright image that made the black and white of the bar code stand out. The overall effect of all of these settings on the bar code is shown below.

image

@Aaituov
Copy link
Author

Aaituov commented Sep 11, 2020 via email

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 11, 2020

There isn't an auto-focus on the RGB sensor of the RealSense cameras. I ran further tests but the average size of the bar code is a limiting factor on what can be achieved at a 70 cm range due to the lines blending together at distance.

You could try setting up an auto-exposure region of interest on the RGB sensor. This tries to maintain a user-defined area of the image at a pre-defined 'setpoint' intensity. Again though, the problem of the distance of the barcode from the camera may mean that this does not add much advantage,

There is the possibility of using a separate non-RealSense RGB camera as the color image source, perhaps one with built-in auto-focus. This may be impractical for your project though.

https://www.intelrealsense.com/depth-camera-external-sync-trigger/

@MartyG-RealSense
Copy link
Collaborator

Hi @Aaituov Do you still require assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants