FaceAnalyser.applyMask Method

Module: FaceAnalyser

Definition

Applies a mask to replace the background with the specified color and returns a 24-bit BGR image.

Image applyMask(Image image, Image mask, int red, int green, int blue)

Parameters

image Image
in Source image to process.

mask Image
in Mask to be applied. Must be a 8-bit greyscale image of same size as the input image.

red int
in Green channel of the background color. Must be a value from 0 to 255.

green int
in Red channel of the background color. Must be a value from 0 to 255.

blue int
in Blue channel of the background color. Must be a value from 0 to 255.

Returns

The output image.

Exceptions

An error has occurred during Face Library execution.