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

Add disambiguation option to phase_cross_correlation (skimage 0.20 feature) #486

Merged
merged 4 commits into from
Feb 2, 2023

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jan 25, 2023

This MR ports a couple of recent features merged upstream for scikit-image 0.20

  • a docstring update to lab2rgb and rgb2lab
  • a new "disambiguation" flag to phase_cross_correlation (default of False matches the old behavior)

There is also one change that is technically breaking in that the shift is now always returned as a tuple of floats rather than as a cupy.ndarray of size refernce_image.ndim. I think this is preferable and working with small coordinate tuples rather than using array operations allows avoiding kernel launch overheads. Upstream scikit-image is a bit inconsistent in that it returns a tuple when disambiguate is True, but a numpy.ndarray otherwise. It should probably be changed to return a tuple in all cases.

Use elementwise tuple operations instead of CuPy or NumPy array operations.
This is much faster for these tiny arrays of length reference_image.ndim.
@grlee77 grlee77 added breaking Introduces a breaking change feature request New feature or request labels Jan 25, 2023
@grlee77 grlee77 requested a review from a team as a code owner January 25, 2023 02:39
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2023

Codecov Report

Base: 92.95% // Head: 92.94% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (3cde2b6) compared to base (8a66080).
Patch coverage: 91.48% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-23.02     #486      +/-   ##
================================================
- Coverage         92.95%   92.94%   -0.01%     
================================================
  Files               130      130              
  Lines              9775     9805      +30     
================================================
+ Hits               9086     9113      +27     
- Misses              689      692       +3     
Impacted Files Coverage Δ
python/cucim/src/cucim/skimage/color/colorconv.py 97.97% <ø> (ø)
...m/skimage/registration/_phase_cross_correlation.py 94.82% <91.48%> (-1.69%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@grlee77 grlee77 added this to the v23.02.00 milestone Feb 1, 2023
Copy link
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

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

Thanks @grlee77 !Looks good to me!

@grlee77
Copy link
Contributor Author

grlee77 commented Feb 2, 2023

/merge

@rapids-bot rapids-bot bot merged commit 010e0ef into rapidsai:branch-23.02 Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Introduces a breaking change feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants