imdrawabline {imageUtilities}R Documentation

Draw a y=ax+b (origin bottom-left, cartesian) line onto an image

Description

Draw a y=ax+b (origin bottom-left, cartesian) line onto an image

Usage

  imdrawabline(img, a, b, col, x1 = 1, y1 = imgetny(img),
    x2 = imgetnx(img), y2 = 1, one.based = TRUE,
    max = imageUtilities.option("max"))

Arguments

img

image to draw on

a

slope of line. for the special case a=Inf, the equation of the line is taken to be x=b.

b

intercept of line

col

colour to draw the line in

x1

left x clipping box, default left of image

y1

bottom y clipping box, default bottom of image

x2

right x clipping box, default right of image

y2

top y clipping box, default top of image

one.based

whether the input indices are one-based

max

maximum image intensity (can usually ignore)

Value

the image with the line y=ax+b drawn on it, within the clipping box (x1,y1) to (x2,y2) (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

imdrawline for a line given specific start/end points

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

Other sandbox: imdrawline


[Package imageUtilities version 1.0.3 Index]