Description Usage Arguments Value Examples
Performs a variation of kmeans to make virtual pixels.
1 | slic(img, num_superpixel = 200, compactness = 1)
|
img |
input image file |
num_superpixel |
number of superpixels |
compactness |
parameter that denotes how similarly related the pixels must be |
list of 2 images, one with the averaged colors and one with the indexes
1 2 3 4 5 6 7 | x = readImage(system.file('images', 'shapes.png', package='EBImage'))
superpixelated <- slic(x)
# # To display the average color of each superpixel
display(superpixelated[[1]], "raster")
# # To display a colored version that makes evident the superpixel separations
display(EBImage::colorLabels(superpixelated[[2]]), "raster")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.