Repository navigation
ndimage: add grid_mode option to zoom - #4401
Merged
Merged
Conversation
The changes here are consistent with a large number of fixes introduced for SciPy 1.6 Specifically this PR includes order=1 and order=0 fixes from SciPy's gh-12767 and gh-12776
STYLE: f-strings in _spline_prefilter_core.py pep 8 fixes
All ndimage test cases now verified to pass when using SciPy 1.6.0 pre-release code
grlee77
force-pushed
the
ndimage_boundary_grid_zoom
branch
from
December 10, 2020 03:14
9b08aea to
336e5c2
Compare
Contributor
|
pfnCI, test this please. |
Member
|
Jenkins CI test (for commit e23dd31, target branch master) succeeded! |
Contributor
|
As well as #4400, would you mark |
grlee77
force-pushed
the
ndimage_boundary_grid_zoom
branch
from
December 18, 2020 20:54
e23dd31 to
dccd261
Compare
Member
Author
Contributor
|
pfnCI, test this please. |
Contributor
|
Thanks! I'll mrege this with following #4400 . |
Member
|
Jenkins CI test (for commit ddc31ab, target branch master) succeeded! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
blocked by #4400 (This PR builds on that one. Only the final "ENH: implement grid_mode parameter for zoom" commit here is new)
This PR implements zooming in a manner consistent with scikit-image's
resizeand OpenCV'scv2.resize. See further explanation in the corresponding SciPy PR scipy/scipy#13095 (to be released in SciPy 1.6).Basically the issue relates to whether coordinate (0, 0) is at the center or corner of a pixel. In the kernel, this translates into computing coordinates via:
c = zoom * (in_coord + 0.5) - 0.5(for grid_mode=True)vs.
c = zoom * in_coord(for grid_mode=False)