-
Notifications
You must be signed in to change notification settings - Fork 606
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
ImageBufAlgo: Initial implementation of st_warp
transform function
#3379
ImageBufAlgo: Initial implementation of st_warp
transform function
#3379
Conversation
I would recommend (if you think you can tackle it) adding |
b90356a
to
526dff7
Compare
I've added However, I wanted to run something strange by you. Initially, I generated my test reference from the existing reference However, using that as my reference image was causing consistent test failures due to differences above the minimum difference threshold when compared with the output that used the
I checked out the raw diff in Nuke, and the pixel differences are all 0-2 8-bit code values apart. I then went back and regenerated my reference image from the
Using this new reference image does not cause the same test failure, and this is the reference image I have added to the PR. I wanted to mention this because I don't know how to explain it; the reference I also tested what would happen if I generated my reference image directly from the original This also causes test failures when compared with the Let me know if you have any insights or concerns. |
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.
This looks really good. Some minor changes are suggested (see comments inline).
I would encourage you to also add docs for the new oiiotool command in oiiotool.rst (though I can give that a stab after this merges, if you just don't have the time for it).
526dff7
to
7ff7c8a
Compare
Whoops, I missed this one. I'll take a look at this tomorrow. |
- Remove ST buffer datatype guard - Simplify additional ROI prep - Remove unnecessary buffer reallocation
bc12142
to
c682e56
Compare
OK, I've added an |
LGTM! |
@nrusch, do you want this backported to 2.3? |
Yes please, that would be great. Thanks! |
…cademySoftwareFoundation#3379) * Initial implementation of `ImageBufAlgo::st_warp` * Simplify default filter logic, and share it with `ImageBufAlgo::warp` * Add st_warp to oiiotool * Add tests for bespoke `st_warp` validations that are done before IBAprep * Add st_warp test to oiiotool-xform testsuite * Address review notes - Remove ST buffer datatype guard - Simplify additional ROI prep - Remove unnecessary buffer reallocation * Use sample accumulator type for source/dest iterator USERT * Add `--st_warp` section to `oiiotool.rst`
Description
Add a new
ImageBufAlgo::st_warp
function, intended to closely match the behavior of Nuke'sSTMap
node.The function takes a source
ImageBuf
to warp, and a secondaryImageBuf
containing channels to treat as normalized image space (i.e.st
) coordinates. For each pixel in thest
buffer, the coordinates are used to look up a source pixel position, which is then sampled using a filter to produce a new output pixel.The transform is currently only defined over the geometry of the
st
buffer (again, matching the behavior of the Nuke node), with the expectation that any desired scaling should be done to thest
buffer prior to warping.One notable difference between the Nuke node and this implementation is the filtering behavior: for better or worse, Nuke's filtering API does some extra level of interpolation/smoothing on top of the raw filter results (possibly just an extra linear filtering pass).
This set of changes has been developed off of
dev-2.3
and then rebased ontomaster
for the PR, so it is known to be portable between those branches.Tests
I have not added any new tests at this point. I didn't see any examples of testing the spatial IBA functions in
imagebufalgo_test.cpp
, so I'm not sure what the policy is there, or how best to ensure strict correctness.Checklist:
have previously submitted a Contributor License Agreement
(individual, and if there is any way my
employers might think my programming belongs to them, then also
corporate).
(adding new test cases if necessary).