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

What if i want to get the disparity of right image ? #37

Open
NiuKeke opened this issue Apr 26, 2019 · 4 comments
Open

What if i want to get the disparity of right image ? #37

NiuKeke opened this issue Apr 26, 2019 · 4 comments

Comments

@NiuKeke
Copy link

NiuKeke commented Apr 26, 2019

Should i run it again with exchanged left and right image,if i want get the disparity of right image or i just use the right disparity which is generated by left base image? I think the both method are different.

@mohanen
Copy link

mohanen commented Apr 26, 2019

It is simple to do so.

With Out Editing LibSGM:-
Flip the left and right image Horizontally and exchange the left, right image for the execute API and once you get the Output, Flip it again Horizontally.

Edit Source of LibSGM:-
Edit the check_consistency.cu and validate the right disparity
Edit the stereo_sgm.cpp where the check_consistency comes in and make sure you use d_right_disp as output

Personally, I would prefer the "With Out Editing LibSGM" method because of the fact that calculating right to left disparity from the cost of left to right disparity is not same (path aggregation might behave differently for the right to left when calculated from scratch).

@NiuKeke
Copy link
Author

NiuKeke commented Apr 26, 2019

It is simple to do so.

With Out Editing LibSGM:-
Horizontal Flip the left and right image and give switch the left image, right image input with right image, left image to the execute API and once you get the Output Flip it again Horizontally.

Edit Source of LibSGM:-
Edit the check_consistency.cu and validate the right disparity
Edit the stereo_sgm.cpp where the check_consistency comes in and make sure you use d_right_disp as output

Personally, I would prefer the "With Out Editing LibSGM" method because of the fact that calculating right to left disparity from the cost of left to right disparity is not same (path aggregation might behave differently for the right to left when calculated from scratch).

So ,if i want to use the disparity of the right image,the best method is to exchange left and right image,but which will increase the time

@mohanen
Copy link

mohanen commented Apr 26, 2019

By what means you denoting an increase in time.

And By the way Exchanging only will not help, cause when you exchange left right the direction of search or the range of the search (min and max) has to be modified, we don't have that flexibility here so we flip the image horizontally.

@NiuKeke
Copy link
Author

NiuKeke commented May 13, 2019

By what means you denoting an increase in time.

And By the way Exchanging only will not help, cause when you exchange left right the direction of search or the range of the search (min and max) has to be modified, we don't have that flexibility here so we flip the image horizontally.

What do you mean by flipping the image horizontally? In fact, we don't know the correct direction of search or the range of the search (min and max) at the very start so i think that the both sides of current pixel will be the best direction of search .Is it correct?

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