2013-02-26 04:21:03 -0600 | received badge | ● Supporter (source) |
2013-02-26 03:38:07 -0600 | answered a question | Calculating distance from the pixel value of a disparity map Hey Lassan, the last line of the documentation for reprojectImageTo3D states "To reproject a sparse set of points {(x,y,d),...} to 3D space, use perspectiveTransform()" perspectiveTransform takes a 3D Point as src, in your case (x,y,disparity(x,y)) which will then be transformed using the Q matrix obtained with stereoRectify() and the result written into dst. I haven't tested it myself but something like 1) Push all the points you want to transform into a cv::Mat array 2) cv::perspectiveTransform(your_point_array, output_point_array, Qmat) should do the trick for you. Hope that helped Greetings Mathias |