Image
drawRectangle
draws rectangles over an Image
object. This operation is destructive: it changes irreversibly the
Image
object and cannot be undone.
drawRectangle(image, pt1_x, pt1_y, pt2_x, pt2_y, color = "red",
thickness = 1)
An Image
object.
A numeric value or vector representing the x coordinates of a corner of each rectangle.
A numeric value or vector representing the y coordinates of a corner of each rectangle.
A numeric value or vector representing the x coordinates of the corners opposite to pt1.
A numeric value or vector representing the y coordinates of the corners opposite to pt1.
A value or vector of any kind of R color specification compatible
with col2rgb
representing the color of each rectangle's outline
(default: "red").
A numeric value or vector representing the thickness in pixels of each rectangle's outline (default: 1). If negative, then a filled rectangle is drawn.
This function does not return anything. It modifies image
in
place.