Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

imcoord

Coordinates as images


Description

These functions return pixel coordinates for an image, as an image. All is made clear in the examples (hopefully)

Usage

Xc(im)

Yc(im)

Zc(im)

Cc(im)

Arguments

im

an image

Value

another image of the same size, containing pixel coordinates

Functions

  • Xc: X coordinates

  • Yc: Y coordinates

  • Zc: Z coordinates

  • Cc: C coordinates

See Also

as.cimg.function, pixel.grid

Examples

im <- imfill(5,5) #An image
Xc(im) #An image of the same size, containing the x coordinates of each pixel
Xc(im) %>% imrow(1)
Yc(im) %>% imrow(3) #y is constant along rows
Yc(im) %>% imcol(1)
#Mask bits of the boats image:
plot(boats*(Xc(boats) < 100))
plot(boats*(dnorm(Xc(boats),m=100,sd=30))) #Gaussian window

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.