Ask Your Question
2

Location of Epipole

asked 2013-07-31 07:23:30 -0600

Abid Rahman K gravatar image

Hi,

I was checking on epipolar geometry, trying to draw the epipolar lines. From reading, what i understood is that epipole of image 1 is the projection of camera center-2 if both images were taken together. And all the epilines pass through these epipole.

I attached two images,

in epi1.jpg, I drew epilines in left image for the corresponding points in the right image. Intersection of epilines shows the projection of camera of right image which seems to be correct in this case.

image description

But in second image, I expected epipole to be outside the image since camera projection of right image can't be inside the left image since camera in left image is in front of camera of right image. But I got epipole to be inside. How is it possible?

image description

(Sorry if i confused you)

This is my code: https://gist.github.com/abidrahmank/6121536

Regards Abid K.

edit retag flag offensive close merge delete

Comments

Hello. I can't run the example in https://opencv-python-tutroals.readth... an also your example from github. I'm using OpenCV 2.4.1.0. The first error I get is: OpenCV Error: Unsupported format or combination of formats (Both matrices must be floating-point (single or double precision)) in cvConvertPointsHomogeneous, file ........\opencv\modules\calib3d\src\fundam.cpp, line 901 Traceback (most recent call last): File "epipolar.py", line 54, in F, mask = cv2.findFundamentalMat(pts1,pts2,cv2.FM_RANSAC) cv2.error: ........\opencv\modules\calib3d\src\fundam.cpp:901: error: (-210) Both matrices must be floating-point (single or double precision) in function cvConvertPoin

mantoniogr gravatar imagemantoniogr ( 2015-04-28 17:38:22 -0600 )edit

I have the same issue. Did you find a solution?

kb_ gravatar imagekb_ ( 2015-05-30 18:02:27 -0600 )edit

AttributeError: 'module' object has no attribute 'SIFT' i have python(x,y) version 2.7 et opencv version3.0.0 why I have this error message?

fraihat gravatar imagefraihat ( 2016-04-12 08:40:27 -0600 )edit

try this: sift = cv2.xfeatures2d.SIFT_create()

akaehud gravatar imageakaehud ( 2016-07-03 16:19:42 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
5

answered 2013-07-31 11:18:03 -0600

koubiak gravatar image

updated 2013-08-02 12:06:20 -0600

This is actually simple :)

If you look at the relative motion between the 2 images, the second camera/image has been taken in front of the other one.

So as expected the second camera project in the middle of camera one (fig 1 left).

Similarly Camera 1 projects in the middle of camera 2. Remember that projective geometry is not oriented the front and back is the same. Negative depth does not affect the projection.

Maybe a simpler way to visualize this is to draw the line between you camera center. They will both cross the camera planes has one camera is in front of the other. Therefore each epipople is in the image.

See figure for more detailimage description

edit flag offensive delete link more

Comments

+1 for your efforts. But I would recommend a drawing as you mentioned for a better understanding.

Abid Rahman K gravatar imageAbid Rahman K ( 2013-07-31 13:00:01 -0600 )edit

Hi Abid, I quickly created a figure let me know if this clarify my answer

koubiak gravatar imagekoubiak ( 2013-08-02 12:07:20 -0600 )edit

thank you. I think my understanding of epipole was wrong. Epipole is the point of intersection of a camera center with other image plane, right? (earlier, I thought it is where we see the other camera in our image, which is partially correct, valid only when other camera is in field of view of our camera. If it is behind, it is outside the scope, it is not vaid). Correct me if i am wrong !!!. And I accept your answer.

Abid Rahman K gravatar imageAbid Rahman K ( 2013-08-03 05:10:03 -0600 )edit

So when you told me to draw the figure, I drew the same picture you drew. And I was cracking my head thinking how the camera 2 (behind) is visible in a picture taken in front.... (very funny)

Abid Rahman K gravatar imageAbid Rahman K ( 2013-08-03 05:12:06 -0600 )edit
1

Yes the epipole in image 1 is the 2D point correspondance to the projection of the camera center of image 2.

koubiak gravatar imagekoubiak ( 2013-08-07 15:22:19 -0600 )edit

I wonder if you could check this similar question : http://answers.opencv.org/question/18125/epilines-not-correct/

Abid Rahman K gravatar imageAbid Rahman K ( 2013-08-07 23:21:02 -0600 )edit
0

answered 2016-03-22 11:36:09 -0600

Ael gravatar image

Hi, I'm currently working on using epipolar geometry to find the the relationship between two images taken by the same camera which has moved mainly forward with very slight translation in the horizontal direction(same as this scenario). I was wondering if you know opencv can cater for this now, as it was written in the Opencv O'Reilly book in Chapter 12 - OpenCV does not (yet) deal with the case of rectifying stereo images when the epipole is within the image frame

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-07-31 07:23:30 -0600

Seen: 17,202 times

Last updated: Mar 22 '16