Learn R Programming

xROI (version 0.1.1)

extractCCC: Extract chromatic coefficients and their statistics

Description

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

Usage

extractCCC(path, m)

Arguments

path

path to the JPEG file

m

mask binary matrix (1 for selected)

Value

The function returns statistical metrics for each color channel. The function 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