Why imhist do not run?

조회 수: 9 (최근 30일)
matlab9000
matlab9000 2018년 3월 22일
답변: Image Analyst 2018년 3월 22일
This is the code:
img = imread('peppers.png');
imhist(img), grid;
Display error, why?
  댓글 수: 1
Benjamin Kraus
Benjamin Kraus 2018년 3월 22일
What error?

댓글을 달려면 로그인하십시오.

답변 (4개)

Image Analyst
Image Analyst 2018년 3월 22일
Then post your complete error message - ALL THE RED TEXT.
And post the results of this (what do you see):
% Check that user has the specified Toolbox installed and licensed.
hasLicenseForToolbox = license('test', 'image_toolbox'); % license('test','Statistics_toolbox'), license('test','Signal_toolbox')
if ~hasLicenseForToolbox
% User does not have the toolbox installed, or if it is, there is no available license for it.
% For example, there is a pool of 10 licenses and all 10 have been checked out by other people already.
ver % List what toolboxes the user has licenses available for.
message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?');
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return;
end
end

Abhishek Ballaney
Abhishek Ballaney 2018년 3월 22일
https://www.mathworks.in/help/images/ref/imhist.html

Benjamin Kraus
Benjamin Kraus 2018년 3월 22일
imhist is part of the Image Processing Toolbox. Could the problem be that you do not have a license for the Image Processing Toolbox?

matlab9000
matlab9000 2018년 3월 22일
No, it's a default image of Matlab

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by