have been able to successfully detect an object using haar cascade classifier in python using opencv. When the object is detected, a rectangle is shown around the object. The x and y position of this rectangle is known and so is the height and width (x,y,w,h). The problem I have is trying the get the 3d coordinates form this rectangle (x,y,z).
I have not been able to find an resources on getting the z coordinate of the detected object. I calibrated my camera and found the camera matrix and also the distortion coefficient but not sure next what to do next. I looked into pose estimation but do not think that will be able to get the 3D coordinates of this object.
Please any help will be sufficient. I just need to be pointed in the right direction so i can continue my project
Thank you.