Skip to content
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

[Feature request] masked MinMaxDifference #298

Open
Purfview opened this issue Sep 2, 2022 · 2 comments
Open

[Feature request] masked MinMaxDifference #298

Purfview opened this issue Sep 2, 2022 · 2 comments

Comments

@Purfview
Copy link

Purfview commented Sep 2, 2022

Would it be possible to do masked MinMaxDifference where black area from a mask is omitted?
That would allow to get stats from only the relevant parts of the frames.

@pinterf
Copy link

pinterf commented Dec 26, 2023

I suppose it should work in general for all min/max/median/... functions. Thresholded modes (median as well, which is an 50% threshold) however calculate with with total pixel count.

Question: if - special case - mask is all black, then the total pixel count is zero. This would affect average as well.
What is the required action for this? Report an error?

Question2: the full opacity (255 in 8-bits) can also have special meaning. Does your proposal have a reason to use 0-black for the purpose? (I don't mind, just asking, I don't know the actual use case)

@Purfview
Copy link
Author

In my use cases I check that a mask is present and is not full opacity before doing anything. So I don't have use for both special cases.

Btw, later I found that there is RT_YPlaneMinMaxDifference in RT_Stats plugin.
It's doing -> "Return int -1, if no valid pixels in Mask clip."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants