MATLAB: Sir shows an error in line2

super pixel segmentation

A = imread('athira.jpg'); [L,N] = superpixels(A,168); figure BW = boundarymask(L); imshow(imoverlay(A,BW,'cyan'),'InitialMagnification',67)

Best Answer

Your code works correctly (with a different image) when I run it.
Note that the superpixels function was introduced in R2016a. If you have an earlier version of MATLAB and the Image Processing Toolbox, you will not be able to use it.