1 | initial version |
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