Learn R Programming

imager (version 0.14)

at: Return pixel value at coordinates

Description

Return pixel value at coordinates

Usage

at(im, x, y, z = 1, cc = 1)

color.at(im, x, y, z = 1)

Arguments

im
an image (cimg object)
x
x coordinate (vector)
y
y coordinate (vector)
z
z coordinate (vector, default 1)
cc
colour coordinate (vector, default 1)

Value

  • pixel values

Functions

  • color.at: return value of all colour channels at a location

Examples

Run this code
im <- as.cimg(function(x,y) x+y,50,50)
at(im,10,1)
at(im,10:12,1)
at(im,10:12,1:3)
color.at(boats,x=10,y=10)

Run the code above in your browser using DataLab