Does anyone know a proper way how to get a median height value of an image in SD? Or perhaps not exactly median rather a middle value in between average high and low pixels? Lots of blur my guess of perhaps there might be a better way?
The blur gives wrong result if the image has 90% zero black pixels and only 10% of some actual height and typical halos . IS there a special math to calculate middle point somehow ? Sort of statistical approach maybe or something?
Replies
You can get the median by finding the halfway point between the outputs of a min/max node
As you say, you can get the mean (ish) by blurring or downsampling.
If you want the mode or some sort of weighted value you're kind of buggered - any kind of histogram analysis is highly impractical in designer
Thank you poopipe . I alredy found this cool node . Didn't even know it is there. it's not perfectly what I wanted since yeah I need a kind of weighted toward where most pixels are but it's better than nothing.