image_draw_baselines: Draw baselines on an image

View source: R/img.R

image_draw_baselinesR Documentation

Draw baselines on an image

Description

Draw baselines on an image

Usage

image_draw_baselines(image, x, ...)

Arguments

image

image either an object of class magick-image or a path to an image file on disk

x

a list vector where each list element contains columns x and y indicating the positions of the baseline

...

further arguments passed on to lines

Value

a magick-image

Examples

library(magick)
path     <- system.file(package = "madoc.utils", "extdata", "pagexml-example.xml")
x        <- read_pagexml(path)
x

img      <- system.file(package = "madoc.utils", "extdata", "pagexml-example.jpg")
img      <- image_read(img)
plt      <- image_draw_baselines(img, x$baseline)
plt
plt      <- image_draw_baselines(img, x$baseline, col = "red", lwd = 10, lty = 2)
plt

DIGI-VUB/madoc.utils documentation built on Sept. 14, 2022, 3:03 p.m.