cvReprojectImageTo3D -3d modelling from 2d images issue-

时光毁灭记忆、已成空白 提交于 2019-11-30 01:39:14

Extract from opencv doc :

" The function stereoRectify computes the rotation matrices for each camera that (virtually) make both camera image planes the same plane. Consequently, that makes all the epipolar lines parallel and thus simplifies the dense stereo correspondence problem. On input the function takes the matrices computed by stereoCalibrate() and on output it gives 2 rotation matrices and also 2 projection matrices in the new coordinates. "

Answer:

It means 3 options :

  • Or you have two images and you know the model of your camera (intrisics) that you loaded from a XML for instance loadXMLFromFile() => stereoRectify() => reprojectImageTo3D()

  • Or you don't have them but you can calibrate your camera => stereoCalibrate() => stereoRectify() => reprojectImageTo3D()

  • Or you can't calibrate the camera (it is your case, because you don't have the Sir Tsukuba's camera, then : you need to find pair keypoints on both images with SURF, SIFT for instance (you can use any blob detector actually), then compute descriptors of these keypoints, then matching keypoints from image right and image left according to their descriptors, and then find the fundamental mat from them. The processing is much harder and would be like this: detect keypoints (SURF, SIFT) => extract descriptors (SURF,SIFT) => compare and match descriptors (BruteForce, Flann based approaches) => find fundamental mat (findFundamentalMat()) from these pairs => stereoRectifyUncalibrated() => reprojectImageTo3D()

I hope it helped you, if not, please, let me know

Julien,

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!