How from uint8 to 0 and 1?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I import the following image which is a [583x673x3] uint8 :
and i would like the convert the grey/black color to origianally black.How it can be ?
0 commentaires
Réponse acceptée
Sean de Wolski
le 6 Nov 2014
Igray = rgb2gray(I);
BW = im2bw(Igray,graythresh(Igray));
imshow(BW)
2 commentaires
Plus de réponses (2)
Chad Greene
le 6 Nov 2014
Tinker with this threshold value:
threshold = 250;
A = imread('export_fig_out.png');
A(A>=threshold)=255;
A(A<threshold)=0;
imshow(A)
2 commentaires
Chad Greene
le 6 Nov 2014
Before adjusting the image, (if you have the image processing toolbox) try imhist(A) to see where values in A lie relative to the gray scale.
Voir également
Catégories
En savoir plus sur Convert Image Type 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!