computeStatisticalQuantitiesPixel {RsimMosaic}R Documentation

A function to compute the pixel data in a certain parameter space

Description

A function to compute the relevant pixel quantity (the RGB color). Optionally it can also output the values of relevant, nearby pixels as RGB colors at the Left, UpperLeft, Upper, UpperRight, Right, LowerRight, Lower, and LowerLeft pixels.

Usage

computeStatisticalQuantitiesPixel(i, j, img, useGradients = FALSE)

Arguments

i

The row (or the X in the image).

j

The column (or the Y in the image).

img

An image array (as created by the readJPEG function from the jpeg library).

useGradients

A flag indicating if the values of the nearby pixels should be returned.

Value

An array with the relevant pixel quantites.

Author(s)

Alberto Krone-Martins

See Also

computeStatisticalQuantitiesTile

Examples

# Read the R logo and output the value of its pixel (50, 5) in the parameter space
library('jpeg')
logo <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg")) # Read the R logo
computeStatisticalQuantitiesPixel(50, 5, logo) # Compute the quantities at the pixel (5,5)


[Package RsimMosaic version 1.0.3 Index]