makeup|SDK makeup|SDK is a library based on visage|SDK face tracking used to configure and render virtual makeup.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
com.visagetechnologies.makeupsdk.MakeupEngine Class Reference
Inheritance diagram for com.visagetechnologies.makeupsdk.MakeupEngine:

## Public Member Functions
| MakeupEngine (Activity context, String licensePath, BSCProvider provider)
void | AddObserver (IMakeupObserver observer)
void | CreateMakeup (FeatureTemplate featureTemplate, FinishTemplate finishTemplate, ArrayList< Float > boundingBox)
void | CreateMakeup (FeatureTemplate featureTemplate, FinishTemplate finishTemplate)
void | DisplayMakeup (Effect effect)
void | HideMakeup (Effect effect)
void | ClearMakeup ()
void | RemoveMakeup (Effect effect)
void | UpdateMakeup (Effect effect)
void | Reset ()
FeatureTemplateRepository | GetFeatures ()
FinishTemplateRepository | getFinishes ()
FinishTemplateRepository | GetFinishes ()

## Detailed Description

This class is part of the SDK's core functionality.
It primarily serves two key functions:
Manipulating the current output of the view throught creating, displaying, updating, hiding, and removing makeup effects.
Exposure of FeatureTemplateRepository and FinishTemplateRepository deserialized from Feature.json and finishes.json files.

## Constructor & Destructor Documentation

## ◆ MakeupEngine()

com.visagetechnologies.makeupsdk.MakeupEngine.MakeupEngine | ( | Activity | context,
|  | String | licensePath,
|  | BSCProvider | provider
| ) |  |
| inline

Constructor of the makeup engine

Parameters

  context | The android activity in witch the SDK will render
  licensePath | Path to the license
  frameProvider | Instance of FrameProvider used to provide input frames to the SDK

## Member Function Documentation

## ◆ AddObserver()

void com.visagetechnologies.makeupsdk.MakeupEngine.AddObserver | ( | IMakeupObserver | observer | ) |
| inline

Attaches observer to the engine. IMakeupObserver is used to obtain event notifications from the engine.

Parameters

  observer | Instance of IMakeupObserver

## ◆ ClearMakeup()

void com.visagetechnologies.makeupsdk.MakeupEngine.ClearMakeup | ( |  | ) |
| inline

Destroys all created makeup effects.

## ◆ CreateMakeup() [1/2]

void com.visagetechnologies.makeupsdk.MakeupEngine.CreateMakeup | ( | FeatureTemplate | featureTemplate,
|  | FinishTemplate | finishTemplate
| ) |  |
| inline

Creates makeup effect from given feature and finish templates. Returns the id of the created effect via IMakeupObserver interface.

Parameters

  featureTemplate | FeatureTemplate object
  finishTemplate | FinishTemplate object

## ◆ CreateMakeup() [2/2]

void com.visagetechnologies.makeupsdk.MakeupEngine.CreateMakeup | ( | FeatureTemplate | featureTemplate,
|  | FinishTemplate | finishTemplate,
|  | ArrayList< Float > | boundingBox
| ) |  |
| inline

Creates makeup effect from given feature and finish templates. Additionally, this function takes an array of floats specifying a bounding box in the following way:

- Lower left x coordinate is the first element of the array
- Lower left y coordinate is the second element of the array
- Upper right x coordinate is the third element of the array
- Upper right y coordinate is the fourth element of the array Bounding box is set in normalized image coordinates where point (0.0, 0.0) is the lower left corner of the output image while point (1.0, 1.0) is the upper right corner of the output image. This effect will be visible only when its location in the output image is inside of the bounding box. The default bounding box is contains the whole output image. If the input array has less than 4 elements, the default bounding box will be used. Returns the id of the created effect via IMakeupObserver interface.

Parameters

  featureTemplate | FeatureTemplate object
  finishTemplate | FinishTemplate object
  boundingBox | Quuartet specifying bounding box in which this effect is visible

## ◆ DisplayMakeup()

void com.visagetechnologies.makeupsdk.MakeupEngine.DisplayMakeup | ( | Effect | effect | ) |
| inline

Displays given makeup effect.

Parameters

  effect | makeup effect id

## ◆ GetFeatures()

FeatureTemplateRepository com.visagetechnologies.makeupsdk.MakeupEngine.GetFeatures | ( |  | ) |
| inline

Returns loaded feature template repository containing predefined features. Each of the predefined feature templates specify a standard renderfing procedure for each of the makeup features supported by the engine.

## ◆ getFinishes()

FinishTemplateRepository com.visagetechnologies.makeupsdk.MakeupEngine.getFinishes | ( |  | ) |
| inline

Deprecated:
  since version 4.0. Will be deleted in next version. Use GetFinishes function instead.

## ◆ GetFinishes()

FinishTemplateRepository com.visagetechnologies.makeupsdk.MakeupEngine.GetFinishes | ( |  | ) |
| inline

Returns loaded finish template repository containing predefined finishes. Each of the predefined finish templates specify a standard renderfing procedure for each of the finishes supported by the engine.

## ◆ HideMakeup()

void com.visagetechnologies.makeupsdk.MakeupEngine.HideMakeup | ( | Effect | effect | ) |
| inline

Hides given makeup effect.

Parameters

  effect | makeup effect

## ◆ RemoveMakeup()

void com.visagetechnologies.makeupsdk.MakeupEngine.RemoveMakeup | ( | Effect | effect | ) |
| inline

Destroys given makeup effect.

Parameters

  effect | makeup effect

## ◆ Reset()

void com.visagetechnologies.makeupsdk.MakeupEngine.Reset | ( |  | ) |
| inline

Reinitializes face tracking. When using the SDK on single images, this method should be called after each image has been processed.

## ◆ UpdateMakeup()

void com.visagetechnologies.makeupsdk.MakeupEngine.UpdateMakeup | ( | Effect | effect | ) |
| inline

Updates given makeup effect.

Parameters

  effect | makeup effect