Learn R Programming

xROI (version 0.9.20)

extractCCC: Extract chromatic coefficients and their statistics

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

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

Run this code
# NOT RUN {
m <- tiff::readTIFF(system.file(package = 'xROI', 'dukehw-mask.tif'))
jpgFile <- system.file(package = 'xROI', 'dukehw.jpg')
cc <- extractCCC(jpgFile, m)
# }

Run the code above in your browser using DataLab