필터 지우기
필터 지우기

How to use regionprops in matlab?

조회 수: 4 (최근 30일)
Yuhong Jin
Yuhong Jin 2019년 11월 24일
답변: Image Analyst 2019년 11월 24일
I have writen a code like this to calculate the mean intensity of my masked image, but it keeps having errors saying that 'regionprops' require Image Process Toolbox.
May I ask what went wrong with this code?
  댓글 수: 8
Walter Roberson
Walter Roberson 2019년 11월 24일
This is what it should look like if you have the software installed:
>> ver('images')
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.7.0.1216025 (R2019b) Update 1
MATLAB License Number: XXXXXXX
Operating System: Mac OS X Version: 10.13.6 Build: 17G9016
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
Image Processing Toolbox Version 11.0 (R2019b)
If you do not see the Image Processing Toolbox line then you do not have the software installed.
In the command window click on Add-Ons -> Get Add-Ons . In the window that comes up ask to search for Image Processing Toolbox. Click on the first result. In the detailed page that comes up, over to the right hand side near the top, click on Install .
Note: you will be required to shut down MATLAB for the install to proceed.
Yuhong Jin
Yuhong Jin 2019년 11월 24일
thank you so much

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

채택된 답변

Image Analyst
Image Analyst 2019년 11월 24일
Try this:
% Check that user has the specified Toolbox installed and licensed.
hasLicenseForToolbox = license('test', 'image_toolbox'); % Check for Image Processing Toolbox.
% hasLicenseForToolbox = license('test','Statistics_toolbox'); % Check for Statistics and Machine Learning Toolbox.
% hasLicenseForToolbox = license('test','Signal_toolbox'); % Check for Signal Processing Toolbox.
% hasLicenseForToolbox = license('test', 'video_and_image_blockset'); % Check for Computer Vision System 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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by