SLIC has been updated a few times since this example was created, adding support for grayscale images (so converting to RGB is no longer necessary) and changing the keyword "ratio" to "compactness". This commit brings the example up to date.
image_label2rgb
label2rgb
The name change reflects a switch in the argument order (and makes the image an optional argument).