Mean of total values of a matrix' plane without the 0 value pixels
Hi folks,
Any idea how I can find out the mean of all the values of a plane from a matrix?
Except for the 0 value which would ruin the whole calculations, of course.
Thank you for looking into this,
ygr
jit.3m
First thing is figuring out a way to get the pixels with 0 value out of the calculations.
And then calculate the mean from what remains.
By the way, I know about [jit.3m] mean value but the thing with the 0's still remain
Thank you, Tobias. I just read your message. Still trying to figure out how to exclude the 0's from the whole configuration.
jit.iter can help here.
Steps:
Calculate the number of non-black pixel occurrences
Calculate the sum of all the pixels in the image (black is 0 so you don't need to filter it).
Divide it by the number of non-black pixels.
This way you get a higher average, since you're not counting the black pixels...
Oh, my god!
You are a genius! Thank you so much!!