Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No good initial image pair found #1490

Closed
lfxx opened this issue Apr 13, 2022 · 12 comments
Closed

No good initial image pair found #1490

lfxx opened this issue Apr 13, 2022 · 12 comments

Comments

@lfxx
Copy link

lfxx commented Apr 13, 2022

Hi,thanks for your excellent work.I use your repo to do reconstruction.But i get error above during feature matching.Some pictures in datasets are below:
1
3
5
7
These pictures are from camera which are installed on car.Could you give me some advice about how to do reconstruction on these pictures which are forward motion condition?
Any advice will be appreciated.I have struggled with this several days.

@tsattler
Copy link
Contributor

Pure forward motion is problematic for structure-from-motion as it leads to instable (and degenerate) configurations.

There is a parameter (init_max_forward_motion) that you can set to define the maximum amount of forward motion that is still considered when trying to find an initial pair. Setting it to 1.0 should allow all forward motion.

You will probably get better results though if you also have turning in your dataset.

@lfxx
Copy link
Author

lfxx commented Apr 14, 2022

Pure forward motion is problematic for structure-from-motion as it leads to instable (and degenerate) configurations.

There is a parameter (init_max_forward_motion) that you can set to define the maximum amount of forward motion that is still considered when trying to find an initial pair. Setting it to 1.0 should allow all forward motion.

You will probably get better results though if you also have turning in your dataset.

Thanks for your kindly reply.Even if i set init_max_forward_motion=1,i still get the above error.If you need,i can send a mini-datasets to you to find out the reason.
As a noob on 3D reconstrcution,If sfm is not suit for forward motion,Could you point out which method is meant for this?Slam or etc..

@tsattler
Copy link
Contributor

As I mentioned, forward motion is problematic for structure-from-motion (same for SLAM) as it leads to unstable results.
Capturing sequences that do not only contain forward motion, but also for example driving around corners, could solve the problem.

@whuaegeanse
Copy link
Contributor

whuaegeanse commented Apr 14, 2022

@lfxx
Try to increase init_max_forward_motion from 0.95 to 1.0 (as @tsattler mentioned) and reduce init_min_tri_angle from 2 to 0.5 .

Here is the setting of my test.
image
image
image

The sparse reconstrction
image

Forwar motion means that the z value of relative pose is larger, the triangulation angle is smaller. So the key to process images in such scene is to change the two thresholds.

@lfxx
Copy link
Author

lfxx commented Apr 15, 2022

As I mentioned, forward motion is problematic for structure-from-motion (same for SLAM) as it leads to unstable results. Capturing sequences that do not only contain forward motion, but also for example driving around corners, could solve the problem.

Is that saying i need to use multi-camera to get more pictures around car?or use one camera to get more pictures around car?

@lfxx
Copy link
Author

lfxx commented Apr 15, 2022

@lfxx Try to increase init_max_forward_motion from 0.95 to 1.0 (as @tsattler mentioned) and reduce init_min_tri_angle from 2 to 0.5 .

Here is the setting of my test. image image image

The sparse reconstrction image

Forwar motion means that the z value of relative pose is larger, the triangulation angle is smaller. So the key to process images in such scene is to change the two thresholds.

I use your setting get pretty good results.Thanks!

@lfxx
Copy link
Author

lfxx commented Apr 19, 2022

@lfxx Try to increase init_max_forward_motion from 0.95 to 1.0 (as @tsattler mentioned) and reduce init_min_tri_angle from 2 to 0.5 .

Here is the setting of my test. image image image

The sparse reconstrction image

Forwar motion means that the z value of relative pose is larger, the triangulation angle is smaller. So the key to process images in such scene is to change the two thresholds.

Hello.Now i want to use deep learning based method such as manydepth to predict depth since the default method in colmap is not good enough.How can i apply this depth to colmap?
BTW,Can i have your wechat ID for convnience of communicating?

@lfxx lfxx closed this as completed Apr 19, 2022
@sysu17363087
Copy link

As I mentioned, forward motion is problematic for structure-from-motion (same for SLAM) as it leads to unstable results. Capturing sequences that do not only contain forward motion, but also for example driving around corners, could solve the problem.

Is that saying i need to use multi-camera to get more pictures around car?or use one camera to get more pictures around car?

hi,i have the same problem as yours. I try to do 3D reconstruction on several kitti images which is alse the pure forward motion. I would like to know how you solve the problem at last. Appreciate for your help.

@shubham-monarch
Copy link

Pure forward motion is problematic for structure-from-motion as it leads to instable (and degenerate) configurations.

There is a parameter (init_max_forward_motion) that you can set to define the maximum amount of forward motion that is still considered when trying to find an initial pair. Setting it to 1.0 should allow all forward motion.

You will probably get better results though if you also have turning in your dataset.

Why are we setting it to 1.0?

@tsattler
Copy link
Contributor

tsattler commented Jan 9, 2024

Why are we setting it to 1.0?

Because that is the maximum value.

@shubham-monarch
Copy link

Oh. Because everything is on a relative scale?

@bendanpuppy
Copy link

@lfxx 尝试将 init_max_forward_motion 从 0.95 增加到 1.0(如@tsattler前面提到)把 init_min_tri_angle 从 2 减少到 0.5 。

这是我的测试设置。 图像 图像 图像

稀疏重建 图像

前运动向是指相对位姿的z值越大,三角测量角度越小因此。处理此类场景图像的关键是改变这两个阈值。
Hello, I've also encountered a similar issue while using COLMAP. My dataset consists of endoscopic images capturing the interior of the intestine, including forward movement. Despite attempting the suggested configurations, I haven't been able to resolve the problem. I notice that you have a good understanding of this issue. Could you please share your contact information? I would greatly appreciate your advice.
input.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants