I’m using the astra SDK in visual studio 2019 and I’m modifying it to detect via vision and opencv some markers. My problem comes when trying to match the depth frame to the RGB frame. I notice the first one is at 640x400, while the second one at 640x480. I’ve tried to rescale the RGB frame by diving Y position of the marker by 1.2, but it doesn’t match.
Why is your depth stream resolution 640x400? You should set it to 640x480. You can do it with setResolution(int resolutionX, int resolutionY). Then use setImageRegistrationMode(openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR) if you want the depth steam to align with the color stream.
That didn’t work either. I contacted orbbec support and they told me to enable registration mode. It works, but now it has an offset in the XY position.
Did you use setImageRegistrationMode(openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR)? Other than that I cannot think of any other reason why this mismatch between the depth stream and the color steam should happen.