MATLAB错误" imhist"即使安装了图像处理工具箱

时间:2017-04-17 15:17:05

标签: matlab image-processing

我有一个色彩丰富的图像,我在MATLAB中转换为灰度。但是当我想显示灰度图像的直方图时,它输出的错误信息是

  

未定义的功能或变量' imhist'。

有趣的是,imread()imshow()命令运行良好。我检查了图像处理工具箱是否已安装,看起来是肯定的。

>> license('test', 'image_toolbox')

ans = 
     1

另请参阅attachment中安装的工具箱的附件截图。

我使用的代码是:

clc;
close all;
clear all;

test_image = imread('fractals.jpg');
whos;

test_image(1,1,:);
test_image(200,262,:);
figure, imshow(test_image);
size(test_image)

test_image_gray = rgb2gray(test_image);
figure, imshow(test_image_gray)

%figure, imhist(test_image)
imhist(test_image_gray)

0 个答案:

没有答案