Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 matlab 中有一个使用 hsv 进行颜色编码的图像,其 clim 值范围从 -90 到 90。我现在想要做的是将 rgb 图像转换为具有来自 cmap 的相关值的矩阵(即 cmap 标签)。谁能解释如何做到这一点?
我想我可以使用 rgb2ind 索引回我的颜色图,然后获取相关的标签,但我不确定这是否是最好的方法。
Step 1: You can convert the RGB to grayscale or just choose a single color channel. Step 2: Use imagesc to plot that matrix. Step 3: Use colormap to adjust the colorscale to be from -90 to 90.
imagesc
colormap