Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# PortraitProcessor.createPortrait Method

Module: PortraitProcessor

## Definition

Analyses an image and creates a portrait with the first detected face or the currently tracked face if the update parameter is activated.

This method performs the following tasks:

- Face detection

- Landmark detection (68 points)

- Head pose estimation

- Verification of subject position

- Geometric attributes computation

- Unified quality score computation

Important

This method requires the `FaceDetector`, `FaceLandmarksEstimator` and `FacePoseEstimator` models to be loaded.

Python

    create_portrait(self, image: Image) -> Portrait

Parameters

> `image` Image
> in Source image.

Returns

> Portrait
> The newly created portrait.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    Portrait createPortrait(Image image)

Parameters

> `image` Image
> in Source image.

Returns

> Portrait
> The newly created portrait.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public Portrait CreatePortrait(Image image)

Parameters

> `image` Image
> in Source image.

Returns

> Portrait
> The newly created portrait.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public Portrait createPortrait(Image image) throws FaceException

Parameters

> `image` Image
> in Source image.

Returns

> Portrait
> The newly created portrait.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func createPortrait(image: Image) throws -> Portrait

Parameters

> `image` Image
> in Source image.

Returns

> Portrait
> The newly created portrait.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FacePortraitProcessor_CreatePortrait (
        ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor,
        ID3_FACE_IMAGE hImage,
        ID3_FACE_PORTRAIT hPortrait)

Parameters

> `hPortraitProcessor` ID3_FACE_PORTRAIT_PROCESSOR
> in Handle to the PortraitProcessor object.
> `hImage` ID3_FACE_IMAGE
> in Source image.
> `hPortrait` ID3_FACE_PORTRAIT
> out The newly created portrait.

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.