public class CompareFaceRequest extends AbstractModel
Constructor and Description |
---|
CompareFaceRequest() |
CompareFaceRequest(CompareFaceRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getFaceModelVersion()
Get Algorithm model version used by the Face Recognition service.
|
String |
getImageA()
Get Base64-encoded data of image A, which cannot exceed 5 MB.
|
String |
getImageB()
Get Base64-encoded data of image B, which cannot exceed 5 MB.
|
Long |
getNeedRotateDetection()
Get Whether to enable the support for rotated image recognition.
|
Long |
getQualityControl()
Get Image quality control.
|
String |
getUrlA()
Get URL of image A.
|
String |
getUrlB()
Get URL of image B.
|
void |
setFaceModelVersion(String FaceModelVersion)
Set Algorithm model version used by the Face Recognition service.
|
void |
setImageA(String ImageA)
Set Base64-encoded data of image A, which cannot exceed 5 MB.
|
void |
setImageB(String ImageB)
Set Base64-encoded data of image B, which cannot exceed 5 MB.
|
void |
setNeedRotateDetection(Long NeedRotateDetection)
Set Whether to enable the support for rotated image recognition.
|
void |
setQualityControl(Long QualityControl)
Set Image quality control.
|
void |
setUrlA(String UrlA)
Set URL of image A.
|
void |
setUrlB(String UrlB)
Set URL of image B.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public CompareFaceRequest()
public CompareFaceRequest(CompareFaceRequest source)
public String getImageA()
public void setImageA(String ImageA)
ImageA
- Base64-encoded data of image A, which cannot exceed 5 MB.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
If there are multiple faces in the image, only the face with the largest size will be selected.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getImageB()
public void setImageB(String ImageB)
ImageB
- Base64-encoded data of image B, which cannot exceed 5 MB.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
If there are multiple faces in the image, only the face with the largest size will be selected.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getUrlA()
public void setUrlA(String UrlA)
UrlA
- URL of image A. The image cannot exceed 5 MB in size after being Base64-encoded.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
Either `Url` or `Image` of image A must be provided; if both are provided, only `Url` will be used.
We recommend storing the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability.
The download speed and stability of non-Tencent Cloud URLs may be low.
If there are multiple faces in the image, only the face with the largest size will be selected.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getUrlB()
public void setUrlB(String UrlB)
UrlB
- URL of image B. The image cannot exceed 5 MB in size after being Base64-encoded.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
Either `Url` or `Image` of image B must be provided; if both are provided, only `Url` will be used.
We recommend storing the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability.
The download speed and stability of non-Tencent Cloud URLs may be low.
If there are multiple faces in the image, only the face with the largest size will be selected.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getFaceModelVersion()
public void setFaceModelVersion(String FaceModelVersion)
FaceModelVersion
- Algorithm model version used by the Face Recognition service. Valid values: 2.0, 3.0.
This parameter is `3.0` by default starting from April 2, 2020. If it is left empty for accounts that used this API previously, `2.0` will be used by default.
Different algorithm model versions correspond to different face recognition algorithms. The 3.0 version has a better overall effect than the legacy version and is thus recommended.public Long getQualityControl()
public void setQualityControl(Long QualityControl)
QualityControl
- Image quality control.
0: no control.
1: low quality requirement. The image has one or more of the following problems: extreme blurriness, covered eyes, covered nose, and covered mouth.
2: average quality requirement. The image has at least three of the following problems: excessive brightness, excessive dimness, blurriness or average blurriness, covered eyebrows, covered cheeks, and covered chin.
3: high-quality requirement. The image has one to two of the following problems: excessive brightness, excessive dimness, average blurriness, covered eyebrows, covered cheeks, and covered chin.
4: very high-quality requirement. The image is optimal in all dimensions or only has a slight problem in one dimension.
Default value: 0.
If the image quality does not meet the requirement, the returned result will prompt that the detected image quality is unsatisfactory.public Long getNeedRotateDetection()
public void setNeedRotateDetection(Long NeedRotateDetection)
NeedRotateDetection
- Whether to enable the support for rotated image recognition. 0: no; 1: yes. Default value: 0. When the face in the image is rotated and the image has no EXIF information, if this parameter is not enabled, the face in the image cannot be correctly detected and recognized. If you are sure that the input image contains EXIF information or the face in the image will not be rotated, do not enable this parameter, as the overall time consumption may increase by hundreds of milliseconds after it is enabled.Copyright © 2021. All rights reserved.