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

Question about matches visualization #39

Closed
ChrisLLLLL opened this issue Feb 22, 2022 · 5 comments
Closed

Question about matches visualization #39

ChrisLLLLL opened this issue Feb 22, 2022 · 5 comments

Comments

@ChrisLLLLL
Copy link

Hi. I would like to ask you how can I show the correct and incorrect matches like the fig 7 and fig 10 in paper? with green, red and blue line. I don't know how to visualize the match in this case. Looking forward to your reply

@rpautrat
Copy link
Member

Hi, you can use this function:

def plot_color_lines(lines, correct_matches, wrong_matches,

@ChrisLLLLL
Copy link
Author

thank you, i find this, but what does "correct_matches, wrong_matches" stand for ?

@rpautrat
Copy link
Member

Well, is the name not clear enough for you? :)
correct_matches is a boolean with one value per line to indicate correct matches, wrong_matches is the same for wrong matches. The first set will be colored in green, the second one in red and the remaining lines are in blue.

Reading the function and understanding what it does is probably faster than me writing this answer...

@ChrisLLLLL
Copy link
Author

Sorry, Maybe I didn't express it clearly. In the code I see the function introduction, but at first I didn't know what to enter. I tried it, but I don't know if it's correct. Could you help me see it? I think “correct_matches” should be correct but I don't know how to get "wrong_matches".I wrote in "match_lines.ipynb".
"line_correct1=valid_matches
line_correct2 = np.zeros((len(line_seg2)),dtype=np.bool)
for i in match_indices:
line_correct2[i] = True
plot_color_lines([line_seg1[:, :, ::-1], line_seg2[:, :, ::-1]], [line_correct1,line_correct2], [0,0],lw=2)"
correct

@rpautrat
Copy link
Member

Hi, sorry for the late reply. You would need access to the ground truth correspondences between the two images to know which lines are incorrect.
The evaluation code on ETH3D (where these images are coming from) has not been released yet, but you can find an uncleaned version of it here: #30 (comment). The idea is to unproject all lines in 3D with the ground truth depth and camera poses, then evaluate which lines are matching between the images. You would need to dig into the evaluation code to understand how to use it though.

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