TrackedFace.getExpandedBounds Method¶
Module: TrackedFace
Definition¶
Gets the bounding box around the detected face with specified aspect ratio and specified margin.
get_expanded_bounds(self, aspect_ratio: float, margin: float) -> Rectangle
Parameters
aspect_ratio
floatin Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
floatin Relative margin around the detected face. Recommended value is 0.5.
Returns
The portrait bounds.
Exceptions
An error has occurred during Face Library execution.
Rectangle getExpandedBounds(double aspectRatio, double margin)
Parameters
aspectRatio
doublein Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
doublein Relative margin around the detected face. Recommended value is 0.5.
Returns
The portrait bounds.
Exceptions
An error has occurred during Face Library execution.
public Rectangle GetExpandedBounds(float aspectRatio, float margin)
Parameters
aspectRatio
floatin Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
floatin Relative margin around the detected face. Recommended value is 0.5.
Returns
The portrait bounds.
Exceptions
An error has occurred during Face Library execution.
public Rectangle getExpandedBounds(float aspectRatio, float margin) throws FaceException
Parameters
aspectRatio
floatin Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
floatin Relative margin around the detected face. Recommended value is 0.5.
Returns
The portrait bounds.
Exceptions
An error has occurred during Face Library execution.
public func getExpandedBounds(aspectRatio: Float, margin: Float) throws -> Rectangle
Parameters
aspectRatio
Floatin Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
Floatin Relative margin around the detected face. Recommended value is 0.5.
Returns
The portrait bounds.
Exceptions
An error has occurred during Face Library execution.
int id3TrackedFace_GetExpandedBounds (
ID3_TRACKED_FACE hTrackedFace,
float aspectRatio,
float margin,
id3FaceRectangle * sPortraitBounds)
Parameters
hTrackedFace
ID3_TRACKED_FACEin Handle to the TrackedFace object.aspectRatio
floatin Aspect ratio of the bounding box. Default recommended value is 1.33 (4/3).margin
floatin Relative margin around the detected face. Recommended value is 0.5.sPortraitBounds
id3FaceRectangle *out The portrait bounds.
Returns