存储 imshow - Matlab
store imshow - Matlab
如何将减少的颜色 imshow 存储在图像对象中,以便我可以进一步将其用于其他分析。
来源:
I = imread('C:\eg.jpg');
[X_no_dither,map]= rgb2ind(I,8,'nodither');
figure, imshow(X_no_dither,map)
您可以使用 ind2rgb
使用新的索引图像和颜色图 将其 转换回 RGB 图像
rgb_image = ind2rgb(X_no_dither, map);
如果需要,您可以将生成的图像保存到 imwrite
文件中
imwrite(rgb_image, 'newimage.png')
如何将减少的颜色 imshow 存储在图像对象中,以便我可以进一步将其用于其他分析。
来源:
I = imread('C:\eg.jpg');
[X_no_dither,map]= rgb2ind(I,8,'nodither');
figure, imshow(X_no_dither,map)
您可以使用 ind2rgb
使用新的索引图像和颜色图 将其 转换回 RGB 图像
rgb_image = ind2rgb(X_no_dither, map);
如果需要,您可以将生成的图像保存到 imwrite
imwrite(rgb_image, 'newimage.png')