ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Wed, 28 May 2014 14:46:28 -0500how to find the 3d location of a given pixel (fixed monocular camera)https://answers.ros.org/question/171286/how-to-find-the-3d-location-of-a-given-pixel-fixed-monocular-camera/Given that I have the following:
- known pixels from an undistorted image (taken by monocular camera)
- fixed angle of inclination of camera
- fixed height of camera and flat terrain (so the height from camera to ground is fixed)
- intrinsic parameters of the camera (published over /camera_info), and also field-of-view angle
How can I find the 3-d (well, 2-d really since height is fixed) location (in the real world relative to the camera) of each pixel? i.e. what ROS packages/nodes should I use that have that functionality? I've been searching for a solution within ROS for weeks (and I'm surprised that no one has needed this before).
I attempted my own solution using some trigonometry, but it doesn't seem to work well (my equations must be off).
Is something like [projectPixelTo3dRay](http://docs.ros.org/api/image_geometry/html/python/#image_geometry.PinholeCameraModel.projectPixelTo3dRay) in image_geometry what I'm looking for?
Perhaps I simply don't know WHAT to look for when I'm searching... Can anyone point me in the right direction? I can't seem to figure this out on my own...
basheersubeiWed, 28 May 2014 14:46:28 -0500https://answers.ros.org/question/171286/