drawLine
draws lines over an Image
object.
This operation is destructive: it changes irreversibly the Image
object and cannot be undone.
Arguments
- image
An
Image
object.- pt1_x
A numeric value or vector representing the x coordinates of the first end of each line.
- pt1_y
A numeric value or vector representing the y coordinates of the first end of each line.
- pt2_x
A numeric value or vector representing the x coordinates of the second end of each line.
- pt2_y
A numeric value or vector representing the y coordinates of the second end of each line.
- color
A value or vector of any kind of R color specification compatible with
col2bgr
representing the color of each line (default: "red").- thickness
A numeric value or vector representing the thickness in pixels of each line (default: 1).
Author
Simon Garnier, garnier@njit.edu
Examples
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
drawLine(balloon, 1, 1, ncol(balloon), nrow(balloon), thickness = 3)
#> NULL