SOD C/C++ API Reference - Image Processing


Syntax

void sod_scale_image_channel(sod_img input, int c, float v);

Description

Perform constant value multiplication on each pixel of a selected color channel unlike sod_scale_image() which process the entire image (i.e. all channels).

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().

int    c

The target color channel starting from 0 for Red, 1 for Green and 2 for Blue in a typical RGB colorspace. Note that in a grayscale image, this value must be set to 0.

float    s

Constant value to multiply with each single pixel of the target color channel. This value must be set between 0..1 such as 0.7.

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_scale_imagesod_resize_imagesod_hough_lines_detectsod_crop_imagesod_translate_image.



Back