Difference between im2bw and imbinarize?

31 visualizaciones (últimos 30 días)
HC
HC el 13 de Ag. de 2019
Editada: Guillaume el 13 de Ag. de 2019
Hello all,
I know newer versions of MATLAB recommend using imbinarize instead of im2bw. I was wondering if there were any significant differences.
I'm also working on a image processing project and im2bw was used with a sensitivity level of 0.9. Is there an equivalent for imbinarize?
Thanks.

Respuestas (1)

Guillaume
Guillaume el 13 de Ag. de 2019
Editada: Guillaume el 13 de Ag. de 2019
You can look at the source code of both functions to see the difference in implementation
edit im2bw.m
edit imbinarize.m
In the case of a global threshold for imbinarize, the two are exactly equivalent for images of type 'single', 'double', 'uint8', 'uint16', and 'uint32'. For images of type 'int16' (imbinarize also supports 'int8' and 'int32', im2bw doesn't), the two slightly differ in that im2bw temporarilly offset and convert the image to 'uint16 but the end result is the same.
The meaning of the threshold is the same for both functions, so
im2bw(someimage, 0.9)
can be translated directly into
imbinarize(somimage, 0.9)

Categorías

Más información sobre Oceanography and Hydrology en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by