Hi everyone,

I'm currently working on a project to detect various color pastes using OAK-D. I have been able to detect colors and get their centroid of contour. Right now, I'm trying to use stereo depth to get the distance from the camera to the color's bottle, but quite didn't get the concept. Could someone help me with some instruction ? Thank you a lot!

    Hi KhnhTrungTrn
    I assume you are not using any NN for this, correct?

    1. Align the rgb frame with depth. (https://docs.luxonis.com/projects/api/en/latest/samples/StereoDepth/rgb_depth_aligned/)
    2. If you need X and Y as well, feed depth image (now aligned with rgb) into the spatial location calculator to get x and y.

    Basically when the depth and rgb are aligned, pixel from rgb image with index (a, b) corresponds to the same pixel on depth. This way you can check where each object seen on color camera is located at.

    Thanks,
    Jaka