I am using open cv and python to perform SFM. I got relative pose between views via essential matrix but plotting it looks wrong. What is missing?

132 views Asked by At

I have a camera matrix and essential matrix. I extracted relative pose via cv2.recoverPose(). I have feature matches between pairs of images in the sequence. With the pairs, for test purposes, I took a subset of the whole sequence of images and paired each of these images against the first one to get the feature matches. That part works ok because I can display it and can see matches. But then when I go onto extract the relative Pose and try to plot the position and orientation of the each camera shot on a 3D plot, it should show all the points in an arc With orientation pointing along the radius to the centre where the object is. But it does not look like that. What am I doing wrong or missing?

Tried to provide an initial translation and rotation matrix (from which I can extract the rotation vector) and used it along with relative pose to compute the rotation and translation of each camera view. But it does not look right on the plot.

1

There are 1 answers

1
Arvn On

I think the reason why camera poses came out looking incorrect was because the were problems with the correspondences.

When I visualised the matches between pairs of images, firstly there were only a few pairs of points being matched between two images with overlap. That was to do with quality of the data. I had work with data where the objects in the image was mostly smooth with very few edges. Of these,several matches looked incorrect. That is, a pixel corresponding to an object of interest in did not match to human eyes with a pixel on the paired image. On the paired image it pointed to a different location on the same object.

So, then the camera pose recovery step failing was not as much of a surprise.

Where it has worked correctly, what I observed was that there were a large number of correspondences and only a small proportion of these was incorrect.

I will supply some pictures in my next post to clarify.