YoYo000 / MVSNet

MVSNet (ECCV2018) & R-MVSNet (CVPR2019)
MIT License
1.36k stars 303 forks source link

Converting openMVG json to MVSNet usable data #29

Open UannaFF opened 5 years ago

UannaFF commented 5 years ago

Hello! I'm trying to convert the json I got from doing SFM with openMVG and I have some doubts.

First: this is what i understand from the pairs.txt provided by you 49 0 10 10 2346.41 1 2036.53 9 1243.89 12 1052.87 11 1000.84 13 703.583 2 604.456 8 439.759 14 327.419 27 249.278

line 1: number of views, line 2: number of the view for which we are listing the matches, line 3: first number is the count of matches, and then, you start listing the views that contains matches with the specified view but I don't know what the number on the side is.

If i say, view 0 has a match with view 10, what is 2346.41? from the json result of openMVG I get something like the following, "structure": [ { "key": 13, "value": { "X": [ 1.8031973191036138, 2.2495496437301769, 6.762512416188528 ], "observations": [ { "key": 0, "value": { "id_feat": 13, "x": [ 495.1080017089844, 723.5880126953125 ] } }, { "key": 1, "value": { "id_feat": 652, "x": [ 719.593017578125, 748.8690185546875 ] } } . . . }

So, for each 3d point, they list the 2D points in each view that contributes to its formation. I thought I'd put those 2D coordinates next to the view matching but you have only one number, not a 2D coordinate.

YoYo000 commented 5 years ago

@UannaFF the score is the view selection score, which is used to indicate the match quality between the two views. You can refer to the MVSNet paper for how to compute the view selection score.

UannaFF commented 5 years ago

Thank you for your answer, I just have a question on the function to calculate theta, p is supposed to be the sparse 3d point seen from both images in world coordinates? I did a first conversion and the result look weird, do you have any idea of what could be happening? I'm putting here the results i'm getting with mvsnet and the results i got with openmvs

bad_results_mvsnet00 bad_results_mvsnet201 openmvs png00

my images look like this one: r -0

I'm getting min depth 0 and max depth 26 from openmvg, when I use those values, the output is empty but when I start incrementing the min value I start getting these results.

yao520131415926 commented 5 years ago

@UannaFF Hello, my fused point cloud is the same with yours whick looks quite wired. And I wonder whether you have solved this problem.

UannaFF commented 5 years ago

Hey! I didn't solve this problem but i'm planning to revisit it now. I'll let you know if i figure something out.

UannaFF commented 5 years ago

@YoYo000 could you please tell me if there's something about the openmvg poses that need to be adjusted, I want to find the source of the problem. I was using other solution that needed the first pose as the origin of the coordinate system(which is not the case for openmvg), is there something like that that could be affecting the estimation?

YoYo000 commented 5 years ago

Hi @UannaFF

I just upload a script to convert colmap sfm result to mvsnet input. Could you try first convert the openmvg sfm to colmap and then to mvsnet?