Creating gray scale image from selcted values
Mostrar comentarios más antiguos
Hi, I am having trouble producing an gray scale image from selected values. I tried with the following code to convert my values in gray scale. But it's prodcuing a very tiny image. How can I get a regular size image?
P = [47 61 57; 68 53 39; 60 57 51];
grayimage = imshow(P, [0 255]);
I have also tried this one but having the same output
P = [47 61 57; 68 53 39; 60 57 51];
grayimage = uint8(255 * mat2gray(C));
I = imshow(grayimage);
Could you please help me in this matter? Thank you.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Convert Image Type 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!