oa::image::draw_rectangle
Draw a rectangle border or fill over a copy of the input, following rectangle: (x, y) gives the top-left corner in pixel units and width/height the extent. A positive thickness draws a border band that many pixels wide measured inward from the rectangle edge; a nonpositive thickness fills the rectangle. color applies to every plane. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, all coordinates and color are finite, width and height are positive, and thickness is finite and nonzero.
Function Documentation
Draw a rectangle border or fill over a copy of the input, following rectangle: (x, y) gives the top-left corner in pixel units and width/height the extent. A positive thickness draws a border band that many pixels wide measured inward from the rectangle edge; a nonpositive thickness fills the rectangle. color applies to every plane. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, all coordinates and color are finite, width and height are positive, and thickness is finite and nonzero.