Why I get error using fspecial in R2015b student use?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
h=imread('C:\Users\USER\Desktop\bio imaging\pic.jpg');
h2=fspecial('gaussian',[3,3],1);
h3=filter2(h2,h);
imshow(h3/256)
Undefined function 'fspecial' for input arguments of type 'char'.
Is there something wrong with the code? I've tried so many methods to write 'fspecial' but failed.
0 commentaires
Réponses (2)
Image Analyst
le 3 Fév 2016
This worked for me:
h=imread('cameraman.tif');
h2=fspecial('gaussian',[3,3],1);
h3=filter2(h2,h);
imshow(h3/256)
I don't know what your image is, but I got a different error than you when I tried a color image. What does this say:
which -all fspecial
and if you type ver, does it show the Image processing Toolbox listed?
3 commentaires
Walter Roberson
le 3 Fév 2016
What did
which -all fspecial
say? If it said that it was not found then the problem is that you have not installed Image Processing Toolkit. You need to go back to your MATLAB installer and request that all the toolboxes you want to use be installed.
Image Analyst
le 3 Fév 2016
What does this say:
% Check that user has the Image Processing Toolbox installed.
hasIPT = license('test', 'image_toolbox');
if ~hasIPT
% User does not have the toolbox installed.
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
which -all fspecial
Walter Roberson
le 3 Fév 2016
fspecial is part of the Image Processing toolkit, the license for which is typically included as part of the Student Version license. However you might have purchased one of the more customized Student Version license, or (more likely) you might not have asked for Image Processing Toolkit to be installed at the time you were installing MATLAB.
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!