SamiUddin231996 - I understand. The workaround I mentioned applies to neuralDepth.depth, not neuralDepth.disparity. If you are reading disparity from get(), then the values are disparity units, not millimeters, so 300 / 3000 mm thresholds won’t work directly there.
For now, please use the neuralDepth.depth output if you want to filter by real distance in mm:
depth = depthFrame.getCvFrame()
depth[(depth < 300) | (depth > 3000)] = 0
That said, I agree the proper solution is to have this inside NeuralDepthConfig, similar to StereoDepthConfig.thresholdFilter. I already passed this to the team and they said it should be doable and it is tracked, but I don’t have an ETA yet.
Best,
Oskar