How do I forward map a point in Open CV with a mapx and mapy? [closed]

asked 2012-05-31 06:31:22 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Ultimately, I'm trying to determine the 3D location of a point I've identified in two cameras. I'm having trouble locating the 2D point for each camera from its mapx & mapy. I could not find in Bradski & Kaehler's OpenCV book how to do it and I have not gotten answers yet (or probaly ever) from Stack Overflow and Opencv-users.

PROCESS

  1. calibrateCamera for each of the pair

  2. stereoCalibrate

  3. stereoRectify

  4. detect the blob I want to locate in 3D on each camera in 2D

  5. initUndistortRectifyMap for each camera

  6. Eventually, perspectiveTransform

PROBLEM with 5:

I have the x and y location of the point in the distorted and unrectified image for each camera(from #4) but I don't know how to get the undistorted and rectified x and y for each camera from the two maps initUndistortRectifyMap creates for each camera. I don't want to remap the whole image since I only want to learn the 3D location of one object for each frame.

QUESTION:

How do I forward map a point (get the undistorted and rectified x and y) with its two maps?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-03 01:48:05.318697