-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
base: main
Are you sure you want to change the base?
Conversation
ax2.set_title('Shifted back image') | ||
|
||
|
||
diff = image - shifted_image |
There was a problem hiding this comment.
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.
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 |
Also, figures showing the grayscale images should use |
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? |
@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!). |
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. |
This adds to the Cross-Correlation (Phase Correlation) example by showing how to overlap two images once the shift has been calculated.