https://github.com/mlampros/fastglcm
GLCM Texture Features
https://github.com/mlampros/fastglcm
glcm r rcpparmadillo
Last synced: about 2 months ago
JSON representation
GLCM Texture Features
- Host: GitHub
- URL: https://github.com/mlampros/fastglcm
- Owner: mlampros
- Created: 2022-08-08T17:15:35.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-27T04:33:25.000Z (about 2 years ago)
- Last Synced: 2025-04-11T16:36:51.847Z (about 2 months ago)
- Topics: glcm, r, rcpparmadillo
- Language: R
- Homepage: https://mlampros.github.io/fastGLCM/
- Size: 8.75 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/mlampros/fastGLCM/actions)
[](https://mlampros.github.io/fastGLCM/reference/index.html)
[](http://cran.r-project.org/package=fastGLCM)
[](http://www.r-pkg.org/pkg/fastGLCM)
[](https://hub.docker.com/r/mlampros/fastglcm)
[](https://cran.r-project.org/package=fastGLCM)
[](https://codecov.io/github/mlampros/fastGLCM?branch=master)## fastGLCM
Fast GLCM feature texture computation. This R package includes two GLCM implementations:
* An Rcpp Armadillo implementation which is parallelized and modified to return all GLCM features at once. Preferably use this version but be aware that there is a difference when computing the convolution between the OpenCV (python fastGLCM implementation) and the Armadillo library (Rcpp implementation). OpenCV performs interpolation in the image boundaries whereas Armadillo does not. For big images there is no visual difference but it's visible in small imagery.
* A fast GLCM feature texture computation based on *python numpy arrays* (for more information see the ['fastGLCM' Python Code Github Repository](https://github.com/tzm030329/GLCM)). To use this version, you will need to have Python configured in your Operating System and the [reticulate](https://github.com/rstudio/reticulate) R package installed.More details on the functionality of *fastGLCM* can be found in the package [Documentation](https://mlampros.github.io/fastGLCM/reference/index.html), [Vignette](https://mlampros.github.io/fastGLCM/articles/fastGLCM_Functionality.html) and [blog-post](http://mlampros.github.io/2022/08/16/gray_level_co_occurrence_matrix/)
### Installation:
To install the package from CRAN use,
```R
install.packages("fastGLCM")```
and to download the latest version of the package from Github,
```R
remotes::install_github('mlampros/fastGLCM')```
#### **Docker Image**
**Docker images** of the *fastGLCM* package are available to download from my [dockerhub](https://hub.docker.com/r/mlampros/fastglcm) account. The images come with *Rstudio* and the *R-development* version (latest) installed. The whole process was tested on Ubuntu 18.04. To **pull** & **run** the image do the following,
```R
docker pull mlampros/fastglcm:rstudiodev
docker run -d --name rstudio_dev -e USER=rstudio -e PASSWORD=give_here_your_password --rm -p 8787:8787 mlampros/fastglcm:rstudiodev
```
The user can also **bind** a home directory / folder to the image to use its files by specifying the **-v** command,
```R
docker run -d --name rstudio_dev -e USER=rstudio -e PASSWORD=give_here_your_password --rm -p 8787:8787 -v /home/YOUR_DIR:/home/rstudio/YOUR_DIR mlampros/fastglcm:rstudiodev
```
The **USER** defaults to *rstudio* but you have to give your **PASSWORD** of preference (see [https://rocker-project.org](https://rocker-project.org/) for more information).
Open your web-browser and depending where the docker image was *build / run* give,
**1st. Option** on your personal computer,
```R
http://0.0.0.0:8787```
**2nd. Option** on a cloud instance,
```R
http://Public DNS:8787```
to access the Rstudio console in order to give your username and password.
### **Similar Projects:**
* https://github.com/azvoleff/glcm (*RcppArmadillo Implementation*)
* https://github.com/ailich/GLCMTextures (*Rcpp and RcppArmadillo Implementation*)
### Citation:
If you use the code of this repository in your paper or research please cite both **fastGLCM** and the **original articles** (see CITATION) `https://CRAN.R-project.org/package=fastGLCM`:
```R
@Manual{,
title = {{fastGLCM}: Fast Gray Level Co-occurrence Matrix computation (GLCM) using R},
author = {Lampros Mouselimis},
year = {2022},
note = {R package version 1.0.2},
url = {https://CRAN.R-project.org/package=fastGLCM},
}
```