I'm new in this field and I'm trying to model a simple scene in 3d out of 2d images and I dont have any info about cameras. I know that there are 3 options:
I have two images and I know the model of my camera (intrisics) that I loaded from a XML for instance
loadXMLFromFile()=>stereoRectify()=>reprojectImageTo3D()I don't have them but I can calibrate my camera =>
stereoCalibrate()=>stereoRectify()=>reprojectImageTo3D()I can't calibrate the camera (it is my case, because I don't have the camera that has taken the 2 images, then I need to find pair keypoints on both images with SURF, SIFT for instance (I can use any blob detector actually), then compute descriptors of these keypoints, then match keypoints from image right and image left according to their descriptors, and then find the fundamental matrix 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'm using the last approach and my questions are:
1) Is it right?
2) if it's ok, I have a doubt about the last step stereoRectifyUncalibrated() => reprojectImageTo3D(). The signature of reprojectImageTo3D() function is:
void reprojectImageTo3D(InputArray disparity, OutputArray _3dImage, InputArray Q, bool handleMissingValues=false, int depth=-1 )
cv::reprojectImageTo3D(imgDisparity8U, xyz, Q, t