How from uint8 to 0 and 1?
Mostrar comentarios más antiguos
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 ?
Respuesta aceptada
Más respuestas (2)
Youssef Khmou
el 6 de Nov. de 2014
Editada: Youssef Khmou
el 6 de Nov. de 2014
rgb2gray(im2double(X));
1 comentario
Dimitrios
el 6 de Nov. de 2014
Chad Greene
el 6 de Nov. de 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 comentarios
Chad Greene
el 6 de Nov. de 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.
Sean de Wolski
el 6 de Nov. de 2014
graythresh separates modes for you :)
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!