matlab生成指定大小的figure,matlab 为图像添加jet伪彩色,并添加color bar;保存figure图片; 对图像进行高斯模糊;
img = imread('D:\ap.jpg');
figure; %matlab生成指定大小的figure
set(gcf,'Position',[100 100 500 500]);%如何改变Figure的大小,省的拖拽
imshow(img);
set(gcf,'colormap',jet);%matlab 为图像添加jet伪彩色,并添加color bar;
maxV = max(max(img));
caxis([0 maxV]);
colorbar;
saveas(gcf,"_jet.jpg");
-----------
---
heatImg = load(inHeatmapFileName);% 或者用imread
heatImg = heatImg.heatImg;
heatImg = im2double(heatImg);
heatImg = heatImg/max(max(heatImg));
heatImg = heatImg * 100;
sigma = 5.5; %会让你的图像变得模糊,越大越模糊
window = double(uint8(3*sigma)*2 + 1);
G = fspecial('gaussian', window, sigma);
img_gauss_corr = imfilter(heatImg, G,'corr','replicate','same');
figure;imshow(img_gauss_corr);
set(gcf,'colormap',jet);
colorbar;