data.overlay: Plot data over an image

View source: R/image.R

data.overlayR Documentation

Plot data over an image

Description

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

Usage

data.overlay(img, over, ...)

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


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 Jan. 9, 2025, 10:45 p.m.