|
Video Effects SDK 2.6.0.118490
AI-powered SDK for real-time video enhancement.
|
Configuration of effects and frame processor. More...
#include <vb_sdk/pipeline.h>
Public Member Functions | |
| virtual PipelineError | setConfiguration (const IPipelineConfiguration *config)=0 |
| Configures the pipeline, for example whether to use GPU or CPU for processing. | |
| virtual IPipelineConfiguration * | copyConfiguration () const =0 |
| Returns a copy of the current configuration. The caller is responsible for releasing it. | |
| virtual IPipelineConfiguration * | copyDefaultConfiguration () const =0 |
| Returns a copy of the default configuration. The caller is responsible for releasing it. | |
| virtual PipelineError | enableBlurBackground (float blurPower)=0 |
| Enables background blur. | |
| virtual void | disableBackgroundBlur ()=0 |
| Disables background blur. | |
| virtual bool | getBlurBackgroundState (float *blurPower) const =0 |
| Returns true if background blur is enabled, otherwise false. | |
| virtual PipelineError | enableReplaceBackground (IReplacementController **controller)=0 |
| Enables background replacement. | |
| virtual void | disableReplaceBackground ()=0 |
| Disables background replacement. | |
| virtual bool | getReplaceBackgroundState () const =0 |
| Returns true if background replacement is enabled, otherwise false. | |
| virtual PipelineError | enableBeautification ()=0 |
| Enables face beautification. | |
| virtual void | disableBeautification ()=0 |
| Disables face beautification. | |
| virtual void | setBeautificationLevel (float level)=0 |
| Sets the face beautification level. | |
| virtual float | getBeautificationLevel () const =0 |
| Returns the current beautification level. | |
| virtual PipelineError | enableSmartZoom ()=0 |
| Enables smart zoom. Smart zoom crops around the face. | |
| virtual void | disableSmartZoom ()=0 |
| Disables smart zoom. | |
| virtual void | setSmartZoomLevel (float level)=0 |
| Sets the smart zoom level. | |
| virtual float | getSmartZoomLevel () const =0 |
| Returns the current smart zoom level. | |
| virtual PipelineError | enableColorCorrection ()=0 |
| Enables color correction. | |
| virtual PipelineError | enableColorCorrectionWithReference (const IFrame *referenceFrame)=0 |
| Enables color grading: generates a color palette from an image and applies it to the video. | |
| virtual PipelineError | enableColorCorrectionWithLutFile (const char *utf8FilePath)=0 |
| Enables color filtering with a lookup table (LUT). | |
| virtual void | disableColorCorrection ()=0 |
| Disables color correction. | |
| virtual void | setColorCorrectionPower (float power)=0 |
| Sets visibility of the color correction effect. | |
| virtual PipelineError | setColorCorrectionParam (ColorCorrectionParam param, float value)=0 |
| Sets one ColorCorrectionParam of the color correction effect. | |
| virtual float | getColorCorrectionParam (ColorCorrectionParam param, PipelineError *error) const =0 |
| Returns one ColorCorrectionParam of the color correction effect. | |
| virtual PipelineError | enableLowLightAdjustment ()=0 |
| Enables the brightening effect. | |
| virtual void | disableLowLightAdjustment ()=0 |
| Disables the brightening effect. | |
| virtual void | setLowLightAdjustmentPower (float power)=0 |
| Sets the power of the brightening effect. | |
| virtual float | getLowLightAdjustmentPower () const =0 |
| Returns the power of the brightening effect. | |
| virtual PipelineError | enableSharpening ()=0 |
| Enables the sharpening effect. | |
| virtual void | disableSharpening ()=0 |
| Disables the sharpening effect. | |
| virtual float | getSharpeningPower () const =0 |
| Returns the current power of the sharpening effect. | |
| virtual void | setSharpeningPower (float power)=0 |
| Sets the power of the sharpening effect. | |
| virtual PipelineError | enableNoiseSuppression ()=0 |
| Enables the noise suppression effect, which reduces sensor noise. | |
| virtual void | disableNoiseSuppression ()=0 |
| Disables the noise suppression effect. | |
| virtual PipelineError | enablePortraitLighting ()=0 |
| Enables the portrait lighting effect. | |
| virtual void | disablePortraitLighting ()=0 |
| Disables the portrait lighting effect. | |
| virtual PipelineError | setPortraitLightingParam (PortraitLightingParam param, float value)=0 |
| Sets one PortraitLightingParam of the portrait lighting effect. | |
| virtual float | getPortraitLightingParam (PortraitLightingParam param, PipelineError *error) const =0 |
| Returns one PortraitLightingParam of the portrait lighting effect. | |
| virtual IFrame * | process (const IFrame *input, PipelineError *error)=0 |
| Processes the frame with all enabled effects applied. | |
| Public Member Functions inherited from tsvb::IRelease | |
| virtual void | release ()=0 |
| Releases the memory that was allocated for the object. | |
Configuration of effects and frame processor.
Created by ISDKFactory::createPipeline(). Use a separate instance for each video stream.
Thread-safe: its methods, except process(), may be called from any thread at any time. process() may be called from any thread too, but not while another process() call is running.
|
pure virtual |
Returns a copy of the current configuration. The caller is responsible for releasing it.
|
pure virtual |
Returns a copy of the default configuration. The caller is responsible for releasing it.
|
pure virtual |
Disables background blur.
|
pure virtual |
Disables face beautification.
|
pure virtual |
Disables color correction.
|
pure virtual |
Disables the brightening effect.
|
pure virtual |
Disables the noise suppression effect.
|
pure virtual |
Disables the portrait lighting effect.
|
pure virtual |
Disables background replacement.
|
pure virtual |
Disables the sharpening effect.
|
pure virtual |
Disables smart zoom.
|
pure virtual |
Enables face beautification.
Not available on Backend::CPU: there it returns PipelineErrorCode::notSupportedByBackend.
|
pure virtual |
Enables background blur.
If already enabled, changes the power of blur.
| blurPower | Power of blur from 0 to 1. |
|
pure virtual |
Enables color correction.
Automatic, manual or both. In automatic mode it analyzes the frame periodically and corrects colors. Manual settings of ColorCorrectionParam, set with setColorCorrectionParam(), work with it or alone. Disables another enabled color correction effect.
Not available on Backend::CPU: there it returns PipelineErrorCode::notSupportedByBackend.
|
pure virtual |
Enables color filtering with a lookup table (LUT).
If already enabled, switches the LUT. Disables another enabled color correction effect.
| utf8FilePath | Path to a .cube file in UTF-8. Only 3D LUTs with maximum size 65 (65x65x65) are supported. |
|
pure virtual |
Enables color grading: generates a color palette from an image and applies it to the video.
If already enabled, generates a new color palette from referenceFrame. Disables another enabled color correction effect.
| referenceFrame | The reference to generate a color palette from. |
|
pure virtual |
Enables the brightening effect.
Low light adjustment enhances the brightness of a dark video. It is useful when the video has a darker environment. It's recommended to use together with color correction.
Not available on Backend::CPU: there it returns PipelineErrorCode::notSupportedByBackend.
|
pure virtual |
Enables the noise suppression effect, which reduces sensor noise.
Not available on Backend::CPU: there it returns PipelineErrorCode::notSupportedByBackend.
|
pure virtual |
Enables the portrait lighting effect.
Brightens the person and darkens the background around them. The background is darkened only while it is the frame itself, blurred or not. Runs segmentation, the way the background effects do.
Not available on Backend::CPU: there it returns PipelineErrorCode::notSupportedByBackend.
|
pure virtual |
Enables background replacement.
By default the background is transparent. A custom background image can be set with IReplacementController::setBackgroundImage(). If background blur is enabled, the custom image is blurred too.
| controller | If not null, receives a new instance of IReplacementController. The caller is responsible for releasing it. |
|
pure virtual |
Enables the sharpening effect.
Sharpening enhances clarity of the video and reduces blurriness.
|
pure virtual |
Enables smart zoom. Smart zoom crops around the face.
|
pure virtual |
Returns the current beautification level.
|
pure virtual |
Returns true if background blur is enabled, otherwise false.
| blurPower | If not null and blur is enabled, receives the blur power. |
|
pure virtual |
Returns one ColorCorrectionParam of the color correction effect.
The value in effect, as setColorCorrectionParam() clamped it, whether or not the effect is enabled.
| param | The parameter to read. |
| error | If not null, receives the error code: PipelineErrorCode::invalidArgument if the parameter is unknown. |
|
pure virtual |
Returns the power of the brightening effect.
|
pure virtual |
Returns one PortraitLightingParam of the portrait lighting effect.
The value in effect, as setPortraitLightingParam() clamped it, whether or not the effect is enabled.
| param | The parameter to read. |
| error | If not null, receives the error code: PipelineErrorCode::invalidArgument if the parameter is unknown. |
|
pure virtual |
Returns true if background replacement is enabled, otherwise false.
|
pure virtual |
Returns the current power of the sharpening effect.
|
pure virtual |
Returns the current smart zoom level.
|
pure virtual |
Processes the frame with all enabled effects applied.
Each result depends on the frames processed before it, so pass the frames of a stream one after another, in their order. It may be called from any thread, but not while another process() call is running.
| input | Frame to process. |
| error | If not null, receives the error code. |
|
pure virtual |
Sets the face beautification level.
| level | Level from 0 to 1. Higher number -> more visible effect. Default is 0.48. |
|
pure virtual |
Sets one ColorCorrectionParam of the color correction effect.
The parameters keep their values while the effect is disabled. Out-of-range values are clamped.
| param | The parameter to set. |
| value | New value of the parameter. |
|
pure virtual |
Sets visibility of the color correction effect.
An alias of setColorCorrectionParam(colorCorrectionParamPower, power): the two set the same value, and it drives color grading and LUT filtering as well as the correction effect.
| power | Power from 0 to 1. Higher number -> more visible effect. |
|
pure virtual |
Configures the pipeline, for example whether to use GPU or CPU for processing.
This method is optional. On error the configuration in use stays as it was.
The effects enabled now stay enabled with the new configuration. If the requested backend lacks one of them, for example Backend::CPU while noise suppression is on, the method fails with PipelineErrorCode::enabledUnsupportedFeatures: disable that effect first.
| config | Configuration to apply, see IPipelineConfiguration. |
|
pure virtual |
Sets the power of the brightening effect.
| power | Power from 0 to 1. Higher number -> brighter result. Default is 0.8. |
|
pure virtual |
Sets one PortraitLightingParam of the portrait lighting effect.
| param | The parameter to set. |
| value | Value from 0 to 1. Out-of-range values are clamped. |
|
pure virtual |
Sets the power of the sharpening effect.
| power | Power from 0 to 1. Higher number -> sharper result. Default is 0.3. |
|
pure virtual |
Sets the smart zoom level.
| level | Level from 0 to 1. Defines how much area should be filled by the face. Higher number -> more area. Default is 0.8. |