Why I get error using fspecial in R2015b student use?
9 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Image Analyst
2016 年 2 月 3 日
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 件のコメント
Walter Roberson
2016 年 2 月 3 日
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
2016 年 2 月 3 日
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
2016 年 2 月 3 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!