Navigation
API > API/Plugins > API/Plugins/MetaHumanCharacterEditor > API/Plugins/MetaHumanCharacterEditor/UMetaHumanCharacterEditorSubsyst-
Description
Run face landmark detection on an image and return tracking contour curves. Use with a front-facing portrait of the target mesh — typically a SceneCapture2D render. The first call after editor start synchronously loads the face contour tracker NNE models (the default tracker asset), so it can take several seconds; subsequent calls hit the cached models and are fast.
| Name | TrackFaceLandmarksFromImage |
| Type | function |
| Header File | /Engine/Plugins/MetaHuman/MetaHumanCharacter/Source/MetaHumanCharacterEditor/Public/MetaHumanCharacterEditorSubsystem.h |
| Include Path | #include "MetaHumanCharacterEditorSubsystem.h" |
| Source | /Engine/Plugins/MetaHuman/MetaHumanCharacter/Source/MetaHumanCharacterEditor/Private/MetaHumanCharacterEditorSubsystem.cpp |
UFUNCTION (BlueprintCallable, Category="MetaHuman|Conforming")
bool TrackFaceLandmarksFromImage
(
const TArray < FColor > & InImageData,
int32 InWidth,
int32 InHeight,
TMap < FString , FTrackingPoints > & OutCurveTrackingPoints
)
true if any landmarks were detected; false on invalid input, model load failure, or no face found.
Parameters
| Name | Remarks |
|---|---|
| InImageData | Raw pixel data (BGRA8); length must equal InWidth * InHeight. |
| InWidth | Image width in pixels. |
| InHeight | Image height in pixels. |
| OutCurveTrackingPoints | Named contour curves (2D points in image space). |