SOD C/C++ API Reference - Image Processing


Syntax

void sod_image_draw_line(sod_img input, sod_pts start, sod_pts end, float r, float g, float b);

Description

Draw a single line on an input image. When done, you can save the output on disk using sod_img_save_as_png() for instance.

Parameters

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    start

A sod_pts object holding the coordinates of the starting line position.

sod_pts    end

A sod_pts object holding the coordinates of the ending line position.

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

None.

Example

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

See also

sod_canny_edge_imagesod_image_draw_boxsod_image_draw_circlesod_hilditch_thinsod_rotate_imagesod_crop_image.



Back