|
makeup|SDK
makeup|SDK is a library based on visage|SDK face tracking used to configure and render virtual makeup.
|
#import <MakeupEngine.h>
Instance Methods | |
| (void) | - AddObserver: |
| (FeatureTemplateRepository *) | - GetFeatures |
| (void) | - CreateMakeup:featureTemplate: |
| (void) | - CreateMakeup:featureTemplate:finishTemplate: |
| (void) | - DisplayMakeup: |
| (void) | - UpdateMakeup: |
| (void) | - ClearMakeup |
| (void) | - HideMakeup: |
| (void) | - RemoveMakeup: |
| (void) | - Reset |
| (void) | - SetCameraDevice: |
| (FinishTemplateRepository *) | - GetFinishes |
| (UIView *) | - GetView |
| Retrieve surface that displays the resulting output of the makeup engine. Resizing of the surface is tied to the quality of the rendering pipeline. Higher resolutions give better fidelity but at the cost of performance. For the highest quality keep the aspect ratio of input images and the surface similar. | |
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.
| - (void) AddObserver: | (id< IMakeupObserver >) | observer |
Attaches observer to the engine. IMakeupObserver is used to obtain event notifications from the engine.
| observer | Instance of IMakeupObserver |
| - (void) ClearMakeup |
Destroys all created makeup effects.
| - (void) CreateMakeup: | (FeatureTemplate *) | ||
| featureTemplate: | (FinishTemplate *) | finishTemplate | |
Creates makeup effect from given feature and finish templates. Returns the id of the created effect via IMakeupObserver interface.
| featureTemplate | FeatureTemplate object |
| finishTemplate | FinishTemplate object |
| - (void) CreateMakeup: | (FeatureTemplate *) | ||
| featureTemplate: | (FinishTemplate *) | ||
| finishTemplate: | (NSArray *) | boundingBox | |
Creates makeup effect from given feature and finish templates. Additionally, this function takes an array of NSNumbers specifying a bounding box in the following way:
| featureTemplate | FeatureTemplate object |
| finishTemplate | FinishTemplate object |
| boundingBox | Quuartet specifying bounding box in which this effect is visible |
| - (void) DisplayMakeup: | (Effect *) | effect |
Displays given makeup effect.
| effect | makeup effect |
| - (FeatureTemplateRepository *) GetFeatures |
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.
| - (FinishTemplateRepository *) GetFinishes |
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.
| - (UIView *) GetView |
Retrieve surface that displays the resulting output of the makeup engine. Resizing of the surface is tied to the quality of the rendering pipeline. Higher resolutions give better fidelity but at the cost of performance. For the highest quality keep the aspect ratio of input images and the surface similar.
| - (void) HideMakeup: | (Effect *) | effect |
Hides given makeup effect.
| effect | makeup effect |
| - (void) RemoveMakeup: | (Effect *) | effect |
Destroys given makeup effect.
| effect | makeup effect |
| - (void) Reset |
Reinitializes face tracking. When using the SDK on single images, this method should be called after each image has been processed.
| - (void) SetCameraDevice: | (unsigned int) | id |
Defines which camera will be used.
| id | camera id |
| - (void) UpdateMakeup: | (Effect *) | effect |
Updates given makeup effect.
| effect | makeup effect |