SLIC, SEEDS and LSC superpixels
Group nearby pixels into small coherent regions to reduce the cost of later reasoning.
The same scene stays here while the working view changes.
Each centre starts with a position and the intensity at that position.
The displayed assignments minimize a combined spatial and intensity distance, rather than position alone.
Five assignment/mean updates bend regions toward the object boundaries. This colour-spatial clustering example omits native connectivity cleanup.
Enforce connectivity and expose region labels or boundaries.
Computed colour-spatial clustering example. SLIC, SEEDS and LSC use different optimization and connectivity rules.
Try it on an image
Experiment at pixel level
Partition Lab colours into SLIC superpixels and draw their boundaries on the original.
The engine loads on your first run. Your images stay in this browser.
Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.
Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Select a pixel
Select a pixel
When to use it
Build region-level features, simplify segmentation inputs, or visualize local image structure.
How it works
- 01Initialize a spatial partition or local cluster centres.
- 02Refine assignments using the selected colour/spatial objective.
- 03Enforce connectivity and expose region labels or boundaries.
pixels → locally coherent regions → region-level processing
What to tune
SLIC balances colour and spatial distance; SEEDS updates block partitions; LSC uses a transformed feature-space clustering objective.
Where it breaks down
Superpixels are an oversegmentation, not semantic objects. The algorithms optimize different objectives and have distinct tuning parameters.
TypeScript API
Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.
All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.
Related methods
Global thresholding
Divide pixels using one intensity threshold, or choose it automatically with Otsu or the triangle method.
Adaptive thresholding
Compute a different intensity threshold for each local neighbourhood.
Connected components
Give every connected foreground region a distinct integer label.
Contour tracing
Trace the boundary of each binary region as an ordered sequence of points.