oa::image::draw_line
Draw a straight segment over a copy of the input, following line: each pixel whose center lies within thickness / 2 of the (x1, y1)-(x2, y2) segment takes color; all other pixels copy the input. Coordinates are continuous pixel units and color applies to every plane. No anti-aliasing is applied. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, all coordinates and color are finite, and thickness is positive and finite.
Function Documentation
Draw a straight segment over a copy of the input, following line: each pixel whose center lies within thickness / 2 of the (x1, y1)-(x2, y2) segment takes color; all other pixels copy the input. Coordinates are continuous pixel units and color applies to every plane. No anti-aliasing is applied. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, all coordinates and color are finite, and thickness is positive and finite.