"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!