powered by
This function applies a mask matrix to a jpeg image and extract statstical metrics for each chromatic coordinate on R, G and B.
extractCCC(path, m)
a character string, path to the JPEG file
a binary mask, mask binary matrix (0 for included, 1 for not)
The function returns statistical metrics for each color channel. It returns NULL, if dimensions do not agree.
# 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