imdrawline {imageUtilities}R Documentation

Draw a line from point a to point b on an image

Description

Draw a line from point a to point b on an image

Usage

  imdrawline(img, x1, y1, x2, y2, col, one.based = TRUE,
    max = imageUtilities.option("max"))

Arguments

img

image to draw on

x1

column to start the line

y1

row to start the line

x2

column to end the line

y2

row to end the line

col

colour to draw with

one.based

boolean, whether x1, x2, y1, and y2 are 1-based

max

the maximum intensity of the image

Value

the image with the line from x1,x2 to y1,y2 on it (inclusive).

Note

if col is supplied in vector form and has any elements greater than 1, *and* max is greater than 1, then we will assume that col scales from 0 to 255.

See Also

imdrawabline for a y=ax+b image

Other draw: drawImage, imdisp, imdrawabline, plotPoints, pointPicker

Other sandbox: imdrawabline


[Package imageUtilities version 1.0.3 Index]