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

Method for overlapping images added to Cross-Correlation (Phase Correlation) example. #1560

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

paalge
Copy link
Contributor

@paalge paalge commented Jun 16, 2015

This adds to the Cross-Correlation (Phase Correlation) example by showing how to overlap two images once the shift has been calculated.

@paalge paalge changed the title Method for overlapping images added to Cross-Correlation (Phase Correlation). Method for overlapping images added to Cross-Correlation (Phase Correlation) example. Jun 16, 2015
ax2.set_title('Shifted back image')


diff = image - shifted_image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should convert to float before taking the difference, using img_as_float, otherwise overflows can happen.

@emmanuelle
Copy link
Member

Thanks for this addition to the example. If you're plotting the difference between the orginal and "back shifted" image, then it would be interesting to use a different shifting method to build the shifted array. Indeed, here we use both Fourier transform to shift forward and back, resulting in almost no difference. If you're using another method, like spline interpolation with ndimage.shift, then you can see that the error is greater for edges, which is quite interesting I think.

@emmanuelle
Copy link
Member

Also, figures showing the grayscale images should use cmap='gray'. Could you please change this?

@paalge
Copy link
Contributor Author

paalge commented Aug 29, 2015

Thank you for the comments. I've changed the cmap and the overflow issue. As for using another method I'm not sure if it should be added here or to a new example comparing the different methods for shifting?

@emmanuelle
Copy link
Member

@paalge I'm really not an expert on methods for shifting, so I don't know if it's worth an example (if you think so, go for it!).

@paalge
Copy link
Contributor Author

paalge commented Sep 7, 2015

I'm no expert on shifting algorithms either. The addition to this example added in order to clarify how you can use the calculated shift.

Base automatically changed from master to main February 18, 2021 18:22
@grlee77 grlee77 added the 📄 type: Documentation Updates, fixes and additions to documentation label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 type: Documentation Updates, fixes and additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants