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

조회 수: 1 (최근 30일)
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.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 10월 30일
image(Your_Logical_Image);
colormap(gray(2));
or
gray_Image = uint8(255*Your_Logical_Image);
image(gray_Image);
colormap(gray(256));

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by