【问题标题】:store imshow - Matlab商店 imshow - Matlab
【发布时间】:2017-06-05 20:18:17
【问题描述】:

如何将减少的颜色 imshow 存储在图像对象中,以便进一步将其用于其他分析。

来源:

I =  imread('C:\eg.jpg');

[X_no_dither,map]= rgb2ind(I,8,'nodither');
figure, imshow(X_no_dither,map)

【问题讨论】:

    标签: matlab imshow


    【解决方案1】:

    您可以使用ind2rgb 将其返回转换为使用新索引图像和颜色图的 RGB 图像

    rgb_image = ind2rgb(X_no_dither, map);
    

    如果需要,您可以将生成的图像保存到带有imwrite 的文件中

    imwrite(rgb_image, 'newimage.png')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-15
      • 2016-01-19
      • 1970-01-01
      • 1970-01-01
      • 2023-04-02
      • 2021-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多