Learn R Programming

RsimMosaic (version 1.0.2)

computeStatisticalQuantitiesTile: A function to compute the tile data in a certain parameter space

Description

A function to compute the relevant statistical quantities (only the median value is implemented) of the RGB colors for the entire image. Optionally it can also compute the median values of the RGB colors at the Left, UpperLeft, Upper, UpperRight, Right, LowerRight, Lower, and LowerLeft, corners of the image.

Usage

computeStatisticalQuantitiesTile(img, useGradients = FALSE)

Arguments

img
An image array (as created by the readJPEG function from the jpeg library).
useGradients
A flag indicating if the values of the relevant quantities should be calculated in the corners of the image.

Value

An array with the relevant quantities calculated.

Details

The data is defined as the median RGB colors of the tile images at this version. Optionally, the median RGB values of the tile image corners are also calculated.

See Also

readJPEG, computeStatisticalQuantitiesPixel

Examples

Run this code
# Read the R logo and output its values in the parameter space
library('jpeg')
logo <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg")) # Read the R logo
computeStatisticalQuantitiesTile(logo) # Compute the quantities

Run the code above in your browser using DataLab