Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (21.5%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: Cidree
- License: other
- Language: R
- Default Branch: main
- Homepage: https://cidree.github.io/OTBsegm/
- Size: 49.2 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 1
Created about 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# OTBsegm
[](https://CRAN.R-project.org/package=OTBsegm)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://app.codecov.io/gh/Cidree/OTBsegm)
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://www.repostatus.org/#active)
[](https://CRAN.R-project.org/package=OTBsegm)
**OTBsegm** is an R package that provides a user-friendly interface to the unsupervised image segmentation algorithms available in [Orfeo ToolBox (OTB)](https://www.orfeo-toolbox.org/), a powerful open-source library for remote sensing image processing. **OTBsegm** is built on top of [`link2GI`](https://r-spatial.github.io/link2GI/) R package, providing easy access to image segmentation algorithms.
To use {`OTBsegm`}, you must first install OTB on your machine. Once OTB is installed and properly linked through {`link2GI`} (see examples), this package allows you to easily integrate OTB's segmentation algorithms into your workflows.
## Installation
You can install the development version of OTBsegm from [GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("Cidree/OTBsegm")
```
## Example
We will see how to segment an image included in the package:
```{r}
## load packages
library(link2GI)
library(OTBsegm)
library(terra)
## load image
image_sr <- rast(system.file("raster/pnoa.tiff", package = "OTBsegm"))
## visualize
plotRGB(image_sr)
```
The image is a 500x500 meters RGB tile, with a spatial resolution of 15 cm in Galicia, Spain. The meanshift algorithm has the next important arguments:
* **spatialr**: spatial radius of the neighborhood
* **ranger**: range radius defining the radius (expressed in radiometry unit) in the multispectral space
* **minsize**: minimum size of a region (in pixel unit) in segmentation. Smaller clusters will be merged to the neighboring cluster with the closest radiometry. If set to 0 no pruning is done. The image's resolution is 1.2 m, therefore, a value of `minsize = 10` means that the smallest segment will be $10 * 1.2^2 = 14.4 m^2$.
In order to use the algorithms, we need to link our OTB installation using {`link2GI`}:
```{r}
otblink <- link2GI::linkOTB(searchLocation = "C:/OTB/")
```
Once we are connected, we can apply the segmentation algorithm and visualize the results:
```{r}
results_ms_sf <- segm_meanshift(
image = image_sr,
otb = otblink,
spatialr = 5,
ranger = 25,
maxiter = 10,
minsize = 10
)
```
```{r}
plotRGB(image_sr)
plot(sf::st_geometry(results_ms_sf), add = TRUE)
```
Owner
- Name: Cidre
- Login: Cidree
- Kind: user
- Location: Córdoba, Spain
- Company: University of Córdoba
- Repositories: 1
- Profile: https://github.com/Cidree
GitHub Events
Total
- Watch event: 1
- Push event: 17
- Fork event: 1
- Create event: 3
Last Year
- Watch event: 1
- Push event: 17
- Fork event: 1
- Create event: 3
Packages
- Total packages: 1
-
Total downloads:
- cran 489 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: OTBsegm
Apply Unsupervised Segmentation Algorithms from 'OTB'
- Homepage: https://cidree.github.io/OTBsegm/
- Documentation: http://cran.r-project.org/web/packages/OTBsegm/OTBsegm.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.0
published about 1 year ago
Rankings
Dependent packages count: 26.6%
Dependent repos count: 32.8%
Average: 48.7%
Downloads: 86.7%
Maintainers (1)
Last synced:
10 months ago