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

# FacePad.detectAttackSupport Method

Module: FacePad

## Definition

Detects if an attack support surrounds the detected face.

The recommended usage is to consider the image to be an attack as soon as an attack support is detected.

Important

Loading the `FaceAttackSupportDetector` model is required to use this function.

Python

    detect_attack_support(self, image: Image, detected_face: DetectedFace) -> DetectedFaceAttackSupport

Parameters

> `image` Image
> in Source image to process.
> `detected_face` DetectedFace
> in Detected face to process.

Returns

> DetectedFaceAttackSupport
> The detected face attack support.

Exceptions

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

Dart

    DetectedFaceAttackSupport detectAttackSupport(Image image, DetectedFace detectedFace)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> DetectedFaceAttackSupport
> The detected face attack support.

Exceptions

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

C#

    public DetectedFaceAttackSupport DetectAttackSupport(Image image, DetectedFace detectedFace)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> DetectedFaceAttackSupport
> The detected face attack support.

Exceptions

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

Java

    public DetectedFaceAttackSupport detectAttackSupport(Image image, DetectedFace detectedFace) throws FaceException

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> DetectedFaceAttackSupport
> The detected face attack support.

Exceptions

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

Swift

    public func detectAttackSupport(image: Image, detectedFace: DetectedFace) throws -> DetectedFaceAttackSupport

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> DetectedFaceAttackSupport
> The detected face attack support.

Exceptions

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

C

    int id3FacePad_DetectAttackSupport (
        ID3_FACE_PAD hFacePad,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE hDetectedFace,
        id3DetectedFaceAttackSupport * sDetectedFaceAttackSupport)

Parameters

> `hFacePad` ID3_FACE_PAD
> in Handle to the FacePad object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hDetectedFace` ID3_DETECTED_FACE
> in Detected face to process.
> `sDetectedFaceAttackSupport` id3DetectedFaceAttackSupport *
> out The detected face attack support.

Returns

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