Question on function graythresh

2 visualizaciones (últimos 30 días)
Erin
Erin el 5 de Abr. de 2013
I want to use the function graythresh to find a global threshold of a gray scale image. The output level I know is normalized to be between 0 and 1. I want to know how is it normalized? I want to get back the actual intensity value I should use as a global threshold.
Also, does having lots of zeros in my image throw off graythresh?
Thanks

Respuestas (1)

Image Analyst
Image Analyst el 5 de Abr. de 2013
You can multiply that 0-1 value by the max for the integer type:
maxValue = intmax('uint8') % or...
maxValue = intmax('uint16')
grayLevelThreshold = maxValue * grayThreshValue;

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by