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!