You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImageStat.Stat.extrema reports 0,255 on 16 bit grey image #1606
There is an Image.getextrema function, which returns the per-band extrema for the image.
This function is used by the histogram function for non 8-bit modes to return extrema to define the bins used in the histogram. The histogram is still going to return a vector length = bands*256.
ImageStat.Stat.extrema relies on the image histogram function, and simply returns the low and high bins used. This is correct for 8 bit per channel images, but fails for anything else.
So, ultimately, Image.getextrema is a much more efficient and correct function to use.
Activity
radarhere commentedon Dec 23, 2015
No, testing with the latest version, I get the same result.
wiredfool commentedon Dec 27, 2015
There is an
Image.getextremafunction, which returns the per-band extrema for the image.This function is used by the histogram function for non 8-bit modes to return extrema to define the bins used in the histogram. The histogram is still going to return a vector length = bands*256.
ImageStat.Stat.extremarelies on the image histogram function, and simply returns the low and high bins used. This is correct for 8 bit per channel images, but fails for anything else.So, ultimately,
Image.getextremais a much more efficient and correct function to use.wiredfool commentedon Dec 29, 2015
ImageStatImage.getextremafunctionIorFimages