• DepthAI-v2
  • OAK-D Pro depth results not accurate on cenital images

Hi everybody,

I am trying to monitor the growth of plants inside a greenhouse by measuring their height, derived from the depth info from my OAK-D Pro. The problem is I am not getting accurate results, in fact all depth values are off. Examples of this (I don't know how to share the depth image so you can check the values yourselves):

Right mono camera:

Disparity:

  • The camera is 3500mm (3.5m) above the floor, but the depth I get ranges from 4200 to 6000 (see upper left corner on disparity
  • The table on which the plant pots are placed is 3000mm Z-distance from the camera, but I am getting values around 4000
  • As everything's off, so is the plants depth, which should be between 2500-2000, but its over 3000 (which is impossible as that is the distance to the table on which they are placed.

This is my current configuration for the depth node:

stereo = pipeline.createStereoDepth()

stereo.initialConfig.setMedianFilter(dai.MedianFilter.KERNEL_7x7)

stereo.setLeftRightCheck(True)

stereo.setExtendedDisparity(False)

stereo.setSubpixel(False)

stereo.setRectifyEdgeFillColor(0)

stereo.setDepthAlign(dai.CameraBoardSocket.RGB)

stereo.setOutputSize(1248, 936)

and:

device.setIrLaserDotProjectorBrightness(500)

I have thoroughly checked DepthAI docs on how to properly configure stereo and fiddled with all the recommendations given, but none have given me any clue so far.

Does anybody have a clue on why is this happening? What am I doing wrong?

Thanks a lot for your help, this is giving me a big headache

Hi @jakaskerl ,

thanks for your reply. The way I check depth is by first detecting the plants via yolov8-instanceSegmentation. Then, I average out the values of the plant mask on the depth image the same way the spatial detection calculator does. For spots other than the plants I sample some values from the depth mask on those locations, like the floor. And they are far from accurate…

I can't try directly the spatial detector since the oak-ds are connected to a Raspberry Pi with no GUI on a remote location. But I will be going there in two weeks so I can check it then with my laptop. Thanks for the tip!

Have a great day,

Juan