Giter Club home page Giter Club logo

supercells's Introduction

supercells

CRAN status R-CMD-check Codecov test coverage CRAN RStudio mirror downloads

The goal of supercells is to utilize the concept of superpixels to a variety of spatial data. This package works on spatial data with one variable (e.g., continuous raster), many variables (e.g., RGB rasters), and spatial patterns (e.g., areas in categorical rasters). It is based on the SLIC algorithm (Achanta et al. (2012)), and readapts it to work with arbitrary dissimilarity measures.

Installation

You can install the released version of supercells from CRAN with:

install.packages("supercells")

You can install the development version from GitHub with:

install.packages("supercells", repos = "https://nowosad.r-universe.dev")

Example

library(supercells)
library(terra)
#> terra 1.6.49
library(sf)
#> Linking to GEOS 3.11.0, GDAL 3.5.2, PROJ 9.0.1; sf_use_s2() is TRUE
vol = rast(system.file("raster/volcano.tif", package = "supercells"))
plot(vol)

vol_slic1 = supercells(vol, k = 50, compactness = 1)
plot(vol)
plot(st_geometry(vol_slic1), add = TRUE, lwd = 0.2)

Documentation

See the package’s vignettes:

  1. The supercells() function
  2. Superpixels of a single raster layer
  3. Superpixels of an RGB raster
  4. Superpixels of spatial categorical patterns
  5. Experimental features of the supercells package

Watch the presentations about this package and some related ideas:

  1. Spatial segmentation in R using the supercells package, 2021-09-02, OpenGeoHub Summer School - slides, video
  2. Generalizing the Simple Linear Iterative Clustering (SLIC) superpixels, 2021-09-28, GIScience 2021 - slides, video

Read the related article:

  1. Nowosad, J., Stepinski, T. (2022). Extended SLIC superpixels algorithm for applications to non-imagery geospatial rasters. International Journal of Applied Earth Observation and Geoinformation, https://doi.org/10.1016/j.jag.2022.102935

Contribution

Contributions to this package are welcome - let us know if you need other distance measures or transformations, have any suggestions, or spotted a bug. The preferred method of contribution is through a GitHub pull request. Feel also free to contact us by creating an issue.

supercells's People

Contributors

nowosad avatar

Watchers

Gábor Csárdi avatar CRAN robot avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.