Description Usage Arguments Value Author(s) See Also Examples
View source: R/computeStatisticalQuantitiesPixel.R
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.
1 | computeStatisticalQuantitiesPixel(i, j, img, useGradients = FALSE)
|
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. |
An array with the relevant pixel quantites.
Alberto Krone-Martins
computeStatisticalQuantitiesTile
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.