Skip to content

Comparison of kmeans and supercells for image semgentiation in R

Notifications You must be signed in to change notification settings

kadyb/image-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image segmentation in R

In this repository you will find examples of image segmentation scripts in R. Example ortho.R shows segmentation on a small RGB orthoimage, while example landsat.R uses a multiband spectral image (8261 x 8201 pixels x 7 bands). The Quarto file comparison.qmd contains a comparison of the simple kmeans clustering algorithm with supercells based on SLIC algorithm.

Note: Currently the kmeans prediction method in landsat.R is very slow (calculations take ~1 hour). Alternatively, you can check out the example in landsat_blocks.R, which uses processing in blocks (it takes ~18 min), but unfortunately the boundaries between blocks are strongly visible.

segmentation