Class FaceDetectorPreset
java.lang.Object
com.azure.resourcemanager.mediaservices.models.Preset
com.azure.resourcemanager.mediaservices.models.FaceDetectorPreset
Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces
present.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblurType()
Get the blurType property: Blur type.Get the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the preset itself.mode()
Get the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID.Get the resolution property: Specifies the maximum resolution at which your video is analyzed.void
validate()
Validates the instance.withBlurType
(BlurType blurType) Set the blurType property: Blur type.withExperimentalOptions
(Map<String, String> experimentalOptions) Set the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the preset itself.withMode
(FaceRedactorMode mode) Set the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID.withResolution
(AnalysisResolution resolution) Set the resolution property: Specifies the maximum resolution at which your video is analyzed.
-
Constructor Details
-
FaceDetectorPreset
public FaceDetectorPreset()Creates an instance of FaceDetectorPreset class.
-
-
Method Details
-
resolution
Get the resolution property: Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected.- Returns:
- the resolution value.
-
withResolution
Set the resolution property: Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected.- Parameters:
resolution
- the resolution value to set.- Returns:
- the FaceDetectorPreset object itself.
-
mode
Get the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction.- Returns:
- the mode value.
-
withMode
Set the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction.- Parameters:
mode
- the mode value to set.- Returns:
- the FaceDetectorPreset object itself.
-
blurType
Get the blurType property: Blur type.- Returns:
- the blurType value.
-
withBlurType
Set the blurType property: Blur type.- Parameters:
blurType
- the blurType value to set.- Returns:
- the FaceDetectorPreset object itself.
-
experimentalOptions
Get the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the preset itself.- Returns:
- the experimentalOptions value.
-
withExperimentalOptions
Set the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the preset itself.- Parameters:
experimentalOptions
- the experimentalOptions value to set.- Returns:
- the FaceDetectorPreset object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classPreset
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-