extractCCC: Extract chromatic coefficients and their statistics

Description Usage Arguments Value Examples

View source: R/extractCCC.R

Description

This function applies a mask matrix to a jpeg image and extract statstical metrics for each chromatic coordinate on R, G and B.

Usage

1
extractCCC(path, m)

Arguments

path

a character string, path to the JPEG file

m

a binary mask, mask binary matrix (0 for included, 1 for not)

Value

The function returns statistical metrics for each color channel. It returns NULL, if dimensions do not agree.

Examples

1
2
3
m <- tiff::readTIFF(system.file(package = 'xROI', 'dukehw-mask.tif'))
jpgFile <- system.file(package = 'xROI', 'dukehw.jpg')
cc <- extractCCC(jpgFile, m)

bnasr/xROI documentation built on June 7, 2021, 7:56 a.m.