Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have two images that are taken from different positions. The 2nd camera is located to the right, up and backward with respect to 1st camera.

So I think there is a perspective transformation between the two views and not just an affine transform since cameras are at relatively different depths . Am I right?

I have a few corresponding points between the two images. I think of using these corresponding points to determine the transformation of each pixel from the 1st to the 2nd image.

I am confused by the functions findFundamentalMat and findHomography . Both return a 3x3 matrix. What is the difference between the two?

Is there any condition required/prerequisite to use them (when to use them)?

Which one to use to transform points from 1st image to 2nd image? In the 3x3 matrices, which the functions return, do they include the rotation and translation between the two image frames?

From Wikipedia , I read that the fundamental matrix is a relation between corresponding image points. In an SO answer here , it is said the essential matrix E is required to get corresponding points. But I do not have the internal camera matrix to calculate E. I just have the two images.

How should I proceed to determine the corresponding point?

Without any extra assumption on the world scene geometry, you cannot affirm that there is a projective transformation between the two views . This is only true if the scene is planar. A good reference on that topic is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman.

If the world scene is not planar, you should definitely not use the findHomography function. You can use the findFundamentalMat function, which will provide you an estimation of the fundamental matrix F. This matrix describes the epipolar geometry between the two views. You may use F to rectify your images in order to apply stereo algorithms to determine a dense correspondence map.

I assume you are using the expression "perspective transformation" to mean "projective transformation". To the best of my knowledge, a perspective transformation is a world to image mapping, not an image to image mapping.

The Fundamental matrix has the relation x'Fu = 0 with x in one image and u in the other iff x and u are projections of the same 3d point. l = Fu defines a line ( lx' = 0 ) where the correponding point of u must be on, so it can be used to confine the searchspace for the correspondences.

A Homography maps a point on one projection of a plane to another projection of the plane. x = Hu

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .