MATLAB Answers

how to fix the error "Undefined function or variable 'superpixels'." ?

5 views (last 30 days)
SNEHA P S
SNEHA P S on 6 Mar 2017
Answered: Walter Roberson on 15 Mar 2017
Hey, while doing some code for image segmentation i got stuck at an error saying "Undefined function or variable 'superpixels'".
A = imread('MobL.png'); [L,N] = superpixels(A,500); figure BW = boundarymask(L); imshow(imoverlay(A,BW,'cyan'),'InitialMagnification',67)
This is the code i had used. Please help me to rectify the error.

  0 Comments

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 15 Mar 2017
Superpixels was not introduced until R2016a.

  0 Comments

Sign in to comment.


Alexandra Harkai
Alexandra Harkai on 6 Mar 2017
This error is very self-explanatory: superpixels is not a variable that is defined for the scope, nor it is a function name that is on the MATALB search path.
To fix, find out where it should have been defined before using it. If it should be a variable, assign values to it. If it should be a function, make sure there exists a function on the MATLAB search path.

  1 Comment

SNEHA P S
SNEHA P S on 15 Mar 2017
As i am a beginner in matlab please help me how to make sure a function exists on the matlab search path.

Sign in to comment.

Sign in to answer this question.