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

Sudden Drop in Depth Map Quality Until System Restart #13400

Open
jrecasens opened this issue Oct 4, 2024 · 5 comments
Open

Sudden Drop in Depth Map Quality Until System Restart #13400

jrecasens opened this issue Oct 4, 2024 · 5 comments

Comments

@jrecasens
Copy link

jrecasens commented Oct 4, 2024

Hello,

I have an IoT edge device using two D456 cameras, running 24/7 to record moving objects. The application has been stable so far, but today I encountered a new issue: all .bag recordings suddenly dropped in quality one after another, and only a system restart (Ubuntu 22) resolved it.

As shown below, the depth map quality degraded significantly, with many objects missing or displaying horizontal grainy dark bands (for comparison, normal operation is shown on the left). I am confident that this is not due to camera settings, as the same setup works well in normal conditions. The only change was a brief event with increased water and dust particles. However, even after the event ended and we cleaned the lenses, subsequent recordings remained poor.

problematic

Could it be that drastic changes in the scene are causing the internal RealSense algorithm to miscalculate and lose its ability to perform correctly? While a restart fixed the issue, I’d like to understand the root cause to prevent this from recurring in the future.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 4, 2024

Hi @jrecasens At the time of day / night that the problem began, could there have been high humidity in the environment like in the recent D456 case at the link below, please?

https://support.intelrealsense.com/hc/en-us/community/posts/34007357457555

Another cause of sudden image degradation could be if the camera faced directly towards a strong light source such as the sun. In those circumstances, a reset could correct the issue. The other ways to resolve it would be if the front of the camera was covered over for several seconds with auto-exposure enabled, or if the light source moved so it was no longer shining directly into the camera, or if the camera was turned away from the light source so that auto-exposure could auto-correct the image.

@jrecasens
Copy link
Author

Thank you for your insights. I cannot confirm if condensation is the issue since the device is currently unreachable until December. However, I do have auto-exposure enabled, and I've observed that water particles or condensation might be causing bright light reflections momentarily.

To address this, I'm considering writing a script to detect these specific events and programmatically trigger a restart of the camera. Do you have any recommendations for monitoring this using pyrealsense?

Looking forward to your suggestions!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 4, 2024

It is possible to set up an IF logic condition in a loop to monitor constantly, with a hardware_reset() command triggered if the condition is met. An example would be if the exposure value dropped below a certain number, or a certain percentage of the depth pixels (such as 50% or more) had a depth value of 0 (indicating that something had gone wrong with the image).

@jrecasens
Copy link
Author

This is going to be tricky as it depends on rules coming from .bag metadata and also on depth processing to detect this issue. False Positives are not acceptable, a hard device restart takes 45 seconds on our side.

Thanks Marty.

@MartyG-RealSense
Copy link
Collaborator

You could reduce the number of erroneous depth values by applying the High Accuracy camera configuration preset, and perhaps also set a high value for an Advanced Mode setting called DS Second Peak Threshold (such as '625' - the default is 325) so that the SDK is very strict about excluding depth coordinates that it is not highly confident in.

You can test both of these settings (the preset and DS Second Peak Threshold) in the RealSense Viewer. The 'High Accuracy' preset is under the 'Presets' drop down menu near the top of the Viewer's options side-panel, whilst Second Peak Threshold can be found under 'Stereo Module > Advanced Controls > Depth Control'.

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