# makeColorMap **Repository Path**: baiweiphys/make-color-map ## Basic Information - **Project Name**: makeColorMap - **Description**: 根据一张图片配色 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-11-15 - **Last Updated**: 2023-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # makeColorMap ``` clc;clear;close all; img=imread('./pic/pic5.jpg'); [ind,map] = rgb2ind(img,3); map = rgb2hsv(map); map = sortrows(map, [-1 -3 2],'ascend'); %# sort first by Hue, then by value map = hsv2rgb(map); cMap=makeColorMap(map,100); I = repmat(1:3, 3, 1); subplot(2,1,1) imagesc(I), colormap(map) title('图像参考色') ax=gca; grid on; box off ax.LineWidth=1; ax.XMinorTick='on'; ax.YMinorTick='on'; ax.ZMinorTick='on'; ax.GridLineStyle=':'; ax.FontSize=14; ax.FontName='Times New Roman'; subplot(2,1,2) I = repmat(1:100, 100, 1); imagesc(I), colormap(cMap) title('插值后的渐变色') ax=gca; grid on; box off ax.LineWidth=1; ax.XMinorTick='on'; ax.YMinorTick='on'; ax.ZMinorTick='on'; ax.GridLineStyle=':'; ax.FontSize=14; ax.FontName='Times New Roman'; ``` ![输入图片说明](image.png) #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)