changing a true color or gray scale image to binary and then to gray scale or true color

1 vue (au cours des 30 derniers jours)
Preethi
Preethi le 30 Oct 2013
Commenté : Preethi le 30 Oct 2013
I have converted a m X n X 3 image(no color map) to binary, worked on binary and now want to convert the resultant image back to gray scale. i tried changing the logical image to uint8, the result is not as expected. Is there any way to obtain the final image in gray with the same gray scale intensities.
Thanking you in advance.

Réponses (1)

Walter Roberson
Walter Roberson le 30 Oct 2013
image(Your_Logical_Image);
colormap(gray(2));
or
gray_Image = uint8(255*Your_Logical_Image);
image(gray_Image);
colormap(gray(256));

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by