MATLAB菜鸟求教直方图输出 IMhist 问题!!
i=imread('a.bmp');%读取图像j=imadjust(i,[0/255120/255],[]);k(:,:,1)=histeq(j(:,:,1));k(:,...
i=imread('a.bmp');%读取图像
j=imadjust(i,[0/255 120/255],[]);
k(:,:,1)=histeq(j(:,:,1));
k(:,:,2)=histeq(j(:,:,2));
k(:,:,3)=histeq(j(:,:,3));
subplot(1,3,1),imshow(i),title('原图像')
subplot(1,3,2),imshow(j),title('灰度级调整后的图')
subplot(1,3,3),imshow(k),title('直方图均衡化后的图')
figure,subplot(1,3,1),imhist(i,64),title('原图像对应直方图')
subplot(1,3,2),imhist(j,64),title('灰度级调整后的直方图')
subplot(1,3,3),imhist(k,64),title('均衡化后的直方图')
运行结果:
??? Error using ==> iptcheckinput
Function IMHIST expected its first input, I or X, to be two-dimensional.
Error in ==> imhist>parse_inputs at 275
iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'}, ...
Error in ==> imhist at 57
[a, n, isScaled, top, map] = parse_inputs(varargin{:});
Error in ==> abc at 9
figure,subplot(1,3,1),imhist(i,64),title('原图像对应直方图')
如何修改才能显示正确的直方图啊?? 展开
j=imadjust(i,[0/255 120/255],[]);
k(:,:,1)=histeq(j(:,:,1));
k(:,:,2)=histeq(j(:,:,2));
k(:,:,3)=histeq(j(:,:,3));
subplot(1,3,1),imshow(i),title('原图像')
subplot(1,3,2),imshow(j),title('灰度级调整后的图')
subplot(1,3,3),imshow(k),title('直方图均衡化后的图')
figure,subplot(1,3,1),imhist(i,64),title('原图像对应直方图')
subplot(1,3,2),imhist(j,64),title('灰度级调整后的直方图')
subplot(1,3,3),imhist(k,64),title('均衡化后的直方图')
运行结果:
??? Error using ==> iptcheckinput
Function IMHIST expected its first input, I or X, to be two-dimensional.
Error in ==> imhist>parse_inputs at 275
iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'}, ...
Error in ==> imhist at 57
[a, n, isScaled, top, map] = parse_inputs(varargin{:});
Error in ==> abc at 9
figure,subplot(1,3,1),imhist(i,64),title('原图像对应直方图')
如何修改才能显示正确的直方图啊?? 展开
1个回答
东莞大凡
2024-08-07 广告
2024-08-07 广告
OpenCV标定板是东莞市大凡光学科技有限公司在相机标定中常用的工具。它通常由黑白格点按一定规则排列在平面上组成,如棋盘格或圆形格等。在相机标定时,将标定板置于不同位置和姿态下拍摄图像,利用OpenCV库中的函数检测标定板上的角点或圆心,进...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询