data.overlay: Plot data over an image

Description Usage Arguments Details Value See Also Examples

View source: R/image.R

Description

Simple wrapper for points to plot data derived from an image over that image.

Usage

1

Arguments

img

character, an image file path.

over

a data frame, data table, or matrix with two columns, the first representing x and the second y coordinates.

...

other arguments to be passed to points

Details

Simply plots 2D dimensional data over the image specified in img. May be useful in plotting output from trackter's kin functions.

Value

The image is plotted in the graphics device with points given in x

See Also

kin.free, kin.search, kin.simple

Examples

1
2
3
4
5
6
7
8
9
f <-system.file("extdata/img", "sunfish_BCF.jpg", package = "trackter")

d <- dim(EBImage::readImage(f))

x <- runif(10,1,d[1])
y <- runif(10,1,d[2])
pts <- cbind(x,y)

data.overlay(img=f,over=pts,col="red",type="p")

ckenaley/trackter documentation built on Feb. 11, 2022, 6:43 a.m.