clear all
close all
clc
I = imread('b1.jpg');
figure;imshow(I);
patch = imcrop(I,[170, 35, 50 50]);
patchVar = std2(patch)^2;
DoS = 2*patchVar;
J = imbilatfilt(I,DoS);
K = imbilatfilt(I,DoS,2);
figure;
figure;imshow(I);
imshow(patch)
imshow(J); title(['Degree of Smoothing: ',num2str(DoS)])
imshow(K); title(['Degree of Smoothing: ',num2str(DoS),', Spatial Sigma: 2'])
what is error in this code?

댓글 수: 8

Adam Danz
Adam Danz 2019년 11월 23일
"what is error in this code?"
I'll ask you that same question. Are you getting an error message or a warning?
We don't have b1.jpg so we can't run your code (you could attach that image file).
If you're not getting an error message, what do you consider to be an error?
Lastly, what part of this involves machine learning?
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 23일
Which MATLAB version you are using?
Mohamed Nasr
Mohamed Nasr 2019년 11월 23일
Which MATLAB version you are using?
I Use matlab R2017b
Mohamed Nasr
Mohamed Nasr 2019년 11월 23일
I'll ask you that same question. Are you getting an error message or a warning?
We don't have b1.jpg so we can't run your code (you could attach that image file).
If you're not getting an error message, what do you consider to be an error?
Lastly, what part of this involves machine learning?
My error:- Undefined function or variable 'imbilatfilt'.
Error in filters (line 9)
J = imbilatfilt(I,DoS);
Adam Danz
Adam Danz 2019년 11월 23일
Looks like you need to install the Image Processing toolbox.
Mohamed Nasr
Mohamed Nasr 2019년 11월 24일
insert it but found same problem
Hmmm, run this line of code and tell us what you get
which('imbilatfilt')
% /MATLAB/toolbox/images/images/imbilatfilt.m % this is what I get
If the result is
which ('imbilatfilt')
'imbilatfilt' not found.
run this line, wait for the full list of installed toolboxes to appear, and then look for "Image Processing Toolbox " in the list.
ver()
If it's not listed, then it wasn't installed properly or those files aren't on the matlab path.
Mohamed Nasr
Mohamed Nasr 2019년 11월 25일
thanx I will run it

댓글을 달려면 로그인하십시오.

 채택된 답변

the cyclist
the cyclist 2019년 11월 23일
편집: the cyclist 2019년 11월 23일

0 개 추천

That is a function from the Image Processing Toolbox. You should check to see if you have that toolbox installed and licensed.
Run these commands:
ver
license('inuse')

추가 답변 (0개)

질문:

2019년 11월 22일

댓글:

2019년 11월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by