Skip to content

daovietanh190499/structure-from-motion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Structure From Motion

First image pair retrieval

First image pair is greatly affect the result of structure from motion pipeline. First image pair should have as many matching feature keypoints as possible and the repartition of the corresponding features in each image. But at the same time, the baseline or angle between cameras should also be large enough to provide reliable geometric information. In my experience, we can choose first image pair manually and put it on the first position of dataset. As the images below, we have 5 type of image pairs:

Type 1

Two cameras have same location and same direction but different field of view. This view pair position is not able to be used for reconstructing 3d points but it's able to be used for estimates the intrinsic params. this view pair is also called "pure rotation".

View1

Type 2

Two cameras have same location and same field of view but different direction. This view pair position is able to be used for reconstructing 3d points but the 3d points have very low quality.

View2

Type 3 and Type 4

Two cameras have same direction and same field of view but different location. This view pair position is good to be used for reconstructing 3d points. It's the most popular position when the cameras move in the straight direction

View3 View4

Type 5

Two cameras have different location, different direction and same field of view. This view pair position is the best to be used for reconstructing 3d points. It has large baseline between cameras, the cameras also have enough feature points for reconstruct reliable 3d point cloud.

View4

Test

To run code we have to change the img_dir = '../vkist2/' to your image direction and run the sfm.py file

python sfm.py

My result

Result1 Result2 Result3 Result4 Result5 Result6 Result7 Result8 Result9 Result10 Result11 Result12 Result13 Result14 Result15 Result16 Result17