"Undefined function or variable 'drawfreehand'." All ROI functions don't work.
Afficher commentaires plus anciens
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'.
Réponse acceptée
Plus de réponses (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 commentaires
Emilio Chufan-Bordon
le 11 Juil 2019
Adam Danz
le 12 Juil 2019
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
le 12 Juil 2019
User has r2018a. The roi enhancement was R2018b.
Image Analyst
le 11 Juil 2019
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?
Catégories
En savoir plus sur ROI-Based Processing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!