"Undefined function or variable 'drawfreehand'." All ROI functions don't work.
이전 댓글 표시
When I try any sort of ROI(region of interest) function such as h = drawfreehand, after opening up an image like the examples I saw, it says "Undefined function or variable 'drawfreehand'." Why does it appear that I cannot use any of these functions. I have Image processing toolbox installed, and I'm using Matlab R2018a
im = imread('ex.png');
>> imshow(im)
>> h = drawassisted;
% Undefined function or variable 'drawassisted'.
채택된 답변
추가 답변 (2개)
You probably don't have the toolbox function on your matlab path. Go to the primary folder where the toolbox functions are stored, copy the path and then add that path and all subfolders to the matlab path.
For example,
addpath(genpath('C:\Users\name\Documents\MATLAB\toolboxes\ROI'))
댓글 수: 3
Emilio Chufan-Bordon
2019년 7월 11일
Adam Danz
2019년 7월 12일
It looks like those function are part of the Image Processing Toolbox listed here:
Are you sure you have that toolbox? Are you able to download the toolbox again?
Walter Roberson
2019년 7월 12일
User has r2018a. The roi enhancement was R2018b.
Image Analyst
2019년 7월 11일
Try this:
>> which -all drawassisted
You should see:
C:\Program Files\MATLAB\R2019a\toolbox\images\imuitools\drawassisted.m
Then 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
What do you observe?
카테고리
도움말 센터 및 File Exchange에서 ROI-Based Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!