问题描述:
matlab中使用imhist函数查看直方图有问题
两幅对比度不同的灰度图,为什么直方图一样?
附上Matlab程序:
clc;
clear all;
close all;
[f1,map] = imread('D:\Matlab\ceshi.bmp');
figure(1);
subplot(2,1,1);
imshow(f1,map);
title('原图像');
subplot(2,1,2);
imhist(f1,map);
axis on;
title('直方图');
[f2,map1] = imread('D:\Matlab\ceshi100.bmp');
figure(2);
subplot(2,1,1);
imshow(f2,map1);
title('修改图像');
subplot(2,1,2);
imhist(f2,map1);
axis on;
title('直方图');
两幅对比度不同的灰度图,为什么直方图一样?
附上Matlab程序:
clc;
clear all;
close all;
[f1,map] = imread('D:\Matlab\ceshi.bmp');
figure(1);
subplot(2,1,1);
imshow(f1,map);
title('原图像');
subplot(2,1,2);
imhist(f1,map);
axis on;
title('直方图');
[f2,map1] = imread('D:\Matlab\ceshi100.bmp');
figure(2);
subplot(2,1,1);
imshow(f2,map1);
title('修改图像');
subplot(2,1,2);
imhist(f2,map1);
axis on;
title('直方图');
问题解答:
我来补答展开全文阅读