-
-
Notifications
You must be signed in to change notification settings - Fork 787
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
ndimage: add grid_mode option to zoom #4401
Merged
Merged
Conversation
This file contains 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
grlee77
changed the title
add grid_mode option to ndimage.zoom
ndimage: add grid_mode option to zoom
Dec 4, 2020
kmaehashi
added
cat:enhancement
Improvements to existing features
prio:medium
st:blocked-by-another-pr
Blocked by another pull-request
labels
Dec 4, 2020
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
pfnCI, test this please. |
Jenkins CI test (for commit e23dd31, target branch master) succeeded! |
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
pfnCI, test this please. |
Thanks! I'll mrege this with following #4400 . |
Jenkins CI test (for commit ddc31ab, target branch master) succeeded! |
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
resize
and 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)