??? Undefined function or variable 'im' . how to solve this error?

조회 수: 1 (최근 30일)
Sreepriya Jeejesh
Sreepriya Jeejesh 2018년 6월 6일
댓글: KSSV 2018년 6월 6일
when i enter the following code "undefined function or variable 'im'.
%im=input image to be clustered
%lb=clustered image/labeled image
if size(im,3)>1
[lb,center] = ColorClustering(im);
else
[lb,center] = GrayClustering(im);
end

답변 (1개)

Shrestha Kumar
Shrestha Kumar 2018년 6월 6일
편집: Shrestha Kumar 2018년 6월 6일
Hi,
You get this error because you have commented the definition of variable im in the first line. Uncomment it and then provide right value to the variable.Also uncomment the definition of lb variable(second line).
  댓글 수: 1
KSSV
KSSV 2018년 6월 6일
YOu have to use imread to read the image....have a look on imread.

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by