Add disambiguation option to phase_cross_correlation (skimage 0.20 feature) #486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This MR ports a couple of recent features merged upstream for scikit-image 0.20
lab2rgb
andrgb2lab
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 sizerefernce_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 whendisambiguate
is True, but a numpy.ndarray otherwise. It should probably be changed to return a tuple in all cases.