0

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.

Dave1
  • 11
  • 2
  • Hello and welcome to StackOverflow. Please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – Alex Leo Feb 25 '19 at 19:08
  • Basically, you cannot get a 3D coordinate out of an image of single camera. You may either need to construct stereo camera or use structured light. Or, if your object has some constraints like it is always on a flat surface, you may be able to get the 3d point after obtaining the surface's parameter. – hiroki Feb 26 '19 at 01:24

0 Answers0