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

openMVG .feat question #1

Open
ctwpotter opened this issue Dec 13, 2017 · 6 comments
Open

openMVG .feat question #1

ctwpotter opened this issue Dec 13, 2017 · 6 comments
Assignees

Comments

@ctwpotter
Copy link

Dear @ySalaun , thanks for provide this LineSfM code.
Lately I test this code. I found I got the different results compared to the result presented in your paper 《Robust SfM with Little Image Overlap》. I tested the sample images following the steps of the instruction: LSD_MULTISACALE--VANISHING_POINT--LINE_MATCHING--CALIBRATION--RECONSTRUCTION, but the dence.refined.mesh.ply only contains four 3D points.

ply
format ascii 1.0
element vertex 4
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 0
property list uint8 int32 vertex_indices
end_header
0.0106194 -0.189911 0.14482 50 255 50
0.803659 -0.126331 0.723105 50 255 50
1.567 -0.0715306 1.42358 50 255 50
2.56536 -0.0378929 1.85199 50 255 50

I notice that the openMVG folder is where I should save my detection with my openMVG, so I wonder if I got the wrong detection of the openMVG.

@ySalaun
Copy link
Owner

ySalaun commented Dec 13, 2017

Hi @ctwpotter
I am not sure to understand exactly what you did, so I have some questions for you

  • It seems that you used the images inside TEST_IMAGES folder. Did tou changed the path of images inside images.txt file
  • you speak about openMVG. Did you use openMVG to detect points independantly of this code ?
  • if you create the folder pictures (as in the TEST_IMAGES folder) you obtain some results for each part of the code (line detection / matching / vanishing points ...) ? Could you quickly check that the detected lines, matched lines and vanishing point cluster are more or less correct ?
  • for the bifocal calibration, if you use TEST_IMAGES folder, you should obtain a quick error summary at the end of the code (on the terminal). Could you check if it is ok ?
  • last question, do you work on linux or windows ? I haven't tested it on windows and it may not work correctly

I'm sorry but I haven't used this code for almost a year and I won't be able to test it on my computer but I'll try my best to help you,

Yohann

@ctwpotter
Copy link
Author

Dear @ySalaun .
Thanks for your quick reply. Here are the answers to your questions.
q1: I changed the path of images of my own images path inside images.txt file.
q2: Yes, I use openMVG to detect points independantly of this code, I get the .feat file and matches.putative.txt generated by the openMVG.
q3: I check the detected lines, matched lines, vanishing points in the folder pictures, it seems that they are correct.
q4: When I use TEST_IMAGES folder, the rotation and translation error are ok. But when I test my own pictures, the error summary turns to:
Error in rotation : 120
Error in translation : nan
And I do not which part went wrong.
q5: I test this code on ubuntu 16.04.
Thanks again for your reply and help, I hope I could use the LineSFM to obtain a 3D model in the indoor scenes.
ctwpotter

@ySalaun
Copy link
Owner

ySalaun commented Dec 13, 2017

Just to be sure:

  • The code works well with the TEST_IMAGES on your computer. The whole reconstruction ?
  • For your own images the reconstruction gives you only four 3D points.

There might be many reasons:

  • first check for line/point matches between each consecutive pictures (if there are not enough point matches, it might not work)
  • the bifocal calibration might be wrong. If you have a ground truth you can compare it. Otherwise, it is more painful and you will have to check each image pairs (e.g. by drawing epipolar lines).
  • the global calibration might be wrong. You can check each consecutive triplet by looking at the given translation ratio (if it does not appear, use verbose option). Usually consecutive pictures are taken at similar interval of length which means a ratio between 0.5 and 2 in absolute value. If the code finds a ratio too small or too large it is usually wrong.

Just to be sure, the code should work fine with ordered pictures (consecutive ones as in the sample). If it is not the case, it might not works well.
Could you also send me some samples of your pictures with line matches (best would be with consecutive pictures so I can have a look at the overlap)

Best,

Yohann

@ySalaun ySalaun self-assigned this Dec 13, 2017
@ctwpotter
Copy link
Author

Sorry for reply your message so late.
The code doesn't work well with the TEST_IMAGES, the dense.mesh.ply only contains four 3D points.
That's why I wonder if I got the wrong files generated by the openMVG, cause they are the files generated by myself.
I also tested the data sets taken by myself with ordered pictures. Still can't get a nice work.
ctwpotter

@ySalaun
Copy link
Owner

ySalaun commented Dec 18, 2017

I think I know the issue:
I compute a bounding box of the scene for the final mesh display. This bounding box is computed using the camera position and a rough erosion is used to avoid displaying outliers.
For a whole scene it usually works correctly but for one triplet only it won't work.

The best thing to test it would be to run the code on the whole Strecha dataset:
https://github.com/openMVG/SfM_quality_evaluation/tree/master/Benchmarking_Camera_Calibration_2008

About your picture it can either be an issue during calibration (as I've explained in my previous post) or a similar error of bounding box or still another issue. Best would be to obtain good results with Strecha first.

Best,

Yohann

@ySalaun
Copy link
Owner

ySalaun commented Dec 19, 2017

In saveMesh function inside interface.cpp you can change the code to modify the bounding box computation.
It is also possible to disable the use of this bounding box by using false as insideMode argument (last argument, default is false) for saveMesh function inside main_reconstruction.cpp

Yohann

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

2 participants