computeStatisticalQuantitiesPixel: A function to compute the pixel data in a certain parameter...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/computeStatisticalQuantitiesPixel.R

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

1
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

1
2
3
4
# 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)

RsimMosaic documentation built on May 2, 2019, 7:29 a.m.