Camera does not capture valid depth maps

Hey all,

I managed to capture the left image and depth map, but the visulised depth map does not seem to be valid, is it related to camera carlibration ?

Please refer the images example in the github (PNG files not allowed to attached here)
examples of depth maps here

Any suggestions/advices, very apprecited!


Hi @chen
for underwater processing, you cannot use the factory calibration which is good only for “in-air” depth estimation.
You must use OpenCV with a waterproof chessboard to calibrate the camera when operating underwater:

Hi Myzhar,

Thanks for your advices. Actually, we submerged the camera (in a water proof box) and the calibration board into the water for calibration. The calibration board was attached to a pole and we moved the pole around to simulate the camera looking at the board at different angles and distance.

We are wondering is it due to the initial camera parameter setting for depth settings. We did not set depth mode, range and Sensing Modes. We assume their default settings are working. Do we need to configure them ? what is your suggestion on these settings?

Very appreicated :slight_smile:


Underwater processing differs from air processing, so I suggest adjusting all parameters to achieve optimal results in your configuration.
I would test ‘ULTRA’, ‘NEURAL’, and NEURAL_PLUS depth modes and tune the confidence threshold to obtain the best depth map possible.

I noticed the fish were very close. What’s the operating depth range?

Hey Myzhar,

Thanks for following up.

I hadn’t noticed the NEURAL_PLUS mode before, but I will test this option as well. Additionally, I observed that some fish were very close, resulting in only partial captures of their bodies. I believe these captures are not useful for length estimation. Therefore, I set a depth range from 0.1 to 0.5 meters (tank is only 3m to 5m wide in diameter). I’m not sure if this is the optimal operating range, but it seems to cover fish that have their full bodies captured in the images.

Moreover, I am considering proposing the use of a combinatorial optimization algorithm to automatically fine-tune all these parameters. The challenge lies in defining a fitness function that can measure the quality of the depth map for our operational needs. My question is: in general, what would be good performance metrics for measuring the quality of a depth map that falls within the minimum and maximum depth range? Especailly, when ground truth is not known, could optimizing the objective be to maximize average depth confidence values that would be helpful in finding an optimal set of these parameters?


Good questions! They can be part of scientific research. Normally to estimate the goodness of the calibration we use specific texturized targets placed at known distances.