allow varying size inputs, with varying size channels#31
Open
fdan wants to merge 1 commit intoTheFoundryVisionmongers:masterfrom
Open
allow varying size inputs, with varying size channels#31fdan wants to merge 1 commit intoTheFoundryVisionmongers:masterfrom
fdan wants to merge 1 commit intoTheFoundryVisionmongers:masterfrom
Conversation
ringdk
suggested changes
Jul 20, 2022
Contributor
ringdk
left a comment
There was a problem hiding this comment.
Hello! Thanks for submitting the merge request. I can see what you're looking to achieve, however there are a couple of things that need to be addressed:
- The reason for using the
format()and not theinputIop's bounds is because the format gives us the full size frame, and not just a data window. As you've found, it's not ideal. - When changing it to
imageBoundsyou need to be careful about handling negative values, and computing the correct width & height for the buffer. (eg. on your lines 467 & 482, it is possible for the values forfrandftto be negative) - Similarly, the buffers could be allocating more memory than is needed, i.e. you probably want
[fr-fx-1, ft-fy-1]for the dimensions - The data window isn't being passed through to the server
- The
renderOutputBuffer()function is still parsing using the returned image using theformatand not theimageBounds
Flagging this to @johannabar @guillaumegalesfoundry , as I'm wondering if ImagePlane can take more than 4 channels.
Thanks again @fdan !
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.
This change addresses a todo item outlined in MLClient.cpp:
// Parse image. TODO: Check for multiple inputs, different channel sizeThe previous code enforced a single format on all inputs. I needed to make this change in my own fork and thought I'd submit it to Foundry for comment.