Applies a function to the extracted numeric matrix of values behind an image and returns the result. Only useable for single-channel images.
Arguments
- image
character or magick-image. Image to extract information from.
- fun
function reference. The function to be applied.
- censor_bbox
list or numeric vector. Region(s) to be censored and converted to
NAin the image data matrix before applyingfun. Can be used to exclude sections of images such as camera company logos and camera strips when calculating averages from outputs of functions such asimg_difference()andimg_luminosity().- format
character. Format of provided bounding box(es). See
bbox_convert().- ...
Additional arguments passed to
fun. If usingcensor_bbox, many functions will require the use ofna.rm = TRUEhere.
