Difference between im2bw and imbinarize?
31 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (1)
Guillaume
le 13 Août 2019
Modifié(e) : Guillaume
le 13 Août 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)
0 commentaires
Voir également
Catégories
En savoir plus sur Oceanography and Hydrology dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!