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.
댓글 수: 0
답변 (1개)
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 Center 및 File Exchange에서 Modify Image Colors에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!