SOD C/C++ API Reference - Image Processing


void sod_image_draw_bbox_width(sod_img input, sod_box bbox, int width, float r, float g, float b);


Draw a single box (i.e. rectangle) on an input image with a specified width. This function is very useful when working with the object detection interfaces for example to mark a detected object (i.e. car, plane, person, etc.) coordinates. When done, you can save the output on disk using sod_img_save_as_png() for instance.

Typical Output

Draw some box


sod_img    input

The input image to be processed. The image can be loaded from disk using sod_img_load_from_file(), from memory (i.e. network socket) via sod_img_load_from_mem() or dynamically created via sod_make_image().

sod_pts    bbox

A sod_box object holding the coordinates of the rectangle to be drawn.

int    width

Rectangle width.

float    r

Red color value in a typical RGB colorspace. This interface handle grayscale colorspace also.

float    g

Green color value in a typical RGB colorspace.

float    b

Blue color value in a typical RGB colorspace.

Return Value



Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.

See also