v20180301

package
v3.0.306+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// No motions of eye closing are detected.
	FAILEDOPERATION_ACTIONCLOSEEYE = "FailedOperation.ActionCloseEye"

	// The face is too close to the screen.
	FAILEDOPERATION_ACTIONFACECLOSE = "FailedOperation.ActionFaceClose"

	// The face is too far from the screen.
	FAILEDOPERATION_ACTIONFACEFAR = "FailedOperation.ActionFaceFar"

	// The face is too far left from the screen.
	FAILEDOPERATION_ACTIONFACELEFT = "FailedOperation.ActionFaceLeft"

	// The face is too far right from the screen.
	FAILEDOPERATION_ACTIONFACERIGHT = "FailedOperation.ActionFaceRight"

	// The first motion is not detected.
	FAILEDOPERATION_ACTIONFIRSTACTION = "FailedOperation.ActionFirstAction"

	// The lighting is too dim.
	FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark"

	// The lighting is too strong.
	FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong"

	// Failed to detect a full face.
	FAILEDOPERATION_ACTIONNODETECTFACE = "FailedOperation.ActionNodetectFace"

	// No motions of mouth opening are detected.
	FAILEDOPERATION_ACTIONOPENMOUTH = "FailedOperation.ActionOpenMouth"

	// Comparison failed.
	FAILEDOPERATION_COMPAREFAIL = "FailedOperation.CompareFail"

	// The comparison similarity did not reach the passing standard.
	FAILEDOPERATION_COMPARELOWSIMILARITY = "FailedOperation.CompareLowSimilarity"

	// Error calling the comparison engine API.
	FAILEDOPERATION_COMPARESYSTEMERROR = "FailedOperation.CompareSystemError"

	// Failed to store the file. Please try again later.
	FAILEDOPERATION_FILESAVEERROR = "FailedOperation.FileSaveError"

	// The ID number entered is incorrect.
	FAILEDOPERATION_IDFORMATERROR = "FailedOperation.IdFormatError"

	// The name and ID number do not match. Please check and try again.
	FAILEDOPERATION_IDNAMEMISMATCH = "FailedOperation.IdNameMisMatch"

	// The number is not in the library. Please go to the applicable household registrar for check.
	FAILEDOPERATION_IDNOEXISTSYSTEM = "FailedOperation.IdNoExistSystem"

	// The photo is not in the library. Please go to the applicable household registrar for check.
	FAILEDOPERATION_IDPHOTONOEXIST = "FailedOperation.IdPhotoNoExist"

	// The ID photo resolution is too low. Please upload a new one.
	FAILEDOPERATION_IDPHOTOPOORQUALITY = "FailedOperation.IdPhotoPoorQuality"

	// Failed to return a photo from the customer library or authentication center. Please try again later.
	FAILEDOPERATION_IDPHOTOSYSTEMNOANSWER = "FailedOperation.IdPhotoSystemNoanswer"

	// Multiple faces are detected.
	FAILEDOPERATION_LIFEPHOTODETECTFACES = "FailedOperation.LifePhotoDetectFaces"

	// Real person comparison failed.
	FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake"

	// Failed to detect a full face.
	FAILEDOPERATION_LIFEPHOTODETECTNOFACES = "FailedOperation.LifePhotoDetectNoFaces"

	// The resolution of the image passed in is too low. Please upload a new one.
	FAILEDOPERATION_LIFEPHOTOPOORQUALITY = "FailedOperation.LifePhotoPoorQuality"

	// The image passed in is too large or too small.
	FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError"

	// The face is not fully exposed.
	FAILEDOPERATION_LIPFACEINCOMPLETE = "FailedOperation.LipFaceIncomplete"

	// The lip movement range is too small.
	FAILEDOPERATION_LIPMOVESMALL = "FailedOperation.LipMoveSmall"

	// Failed to pull the video. Please try again.
	FAILEDOPERATION_LIPNETFAILED = "FailedOperation.LipNetFailed"

	// The video is empty or its size is inappropriate. The recording duration should be about 6 seconds.
	FAILEDOPERATION_LIPSIZEERROR = "FailedOperation.LipSizeError"

	// The video format is incorrect.
	FAILEDOPERATION_LIPVIDEOINVALID = "FailedOperation.LipVideoInvalid"

	// The video definition is too low.
	FAILEDOPERATION_LIPVIDEOQUAILITY = "FailedOperation.LipVideoQuaility"

	// No sound is detected.
	FAILEDOPERATION_LIPVOICEDETECT = "FailedOperation.LipVoiceDetect"

	// The volume of the video is too low.
	FAILEDOPERATION_LIPVOICELOW = "FailedOperation.LipVoiceLow"

	// Speech recognition failed.
	FAILEDOPERATION_LIPVOICERECOGNIZE = "FailedOperation.LipVoiceRecognize"

	// Face detection failed. Unable to extract the photo for comparison.
	FAILEDOPERATION_LIVESSBESTFRAMEERROR = "FailedOperation.LivessBestFrameError"

	// Liveness detection failed.
	FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail"

	// Suspected spoofed recording.
	FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake"

	// Error calling the liveness engine API.
	FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError"

	// Video-based real person detection failed.
	FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError"

	// The name entered is incorrect.
	FAILEDOPERATION_NAMEFORMATERROR = "FailedOperation.NameFormatError"

	// Real person detection failed.
	FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail"

	// Eye detection failed.
	FAILEDOPERATION_SILENTEYELIVEFAIL = "FailedOperation.SilentEyeLiveFail"

	// No face is detected in the video.
	FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail"

	// Low face quality.
	FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail"

	// A face mask is detected.
	FAILEDOPERATION_SILENTFACEWITHMASKFAIL = "FailedOperation.SilentFaceWithMaskFail"

	// Mouth detection failed.
	FAILEDOPERATION_SILENTMOUTHLIVEFAIL = "FailedOperation.SilentMouthLiveFail"

	// Multiple faces are detected in the video.
	FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail"

	// The video might be spoofed.
	FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail"

	// Real person detection did not reach the passing standard.
	FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold"

	// The video is too short. Please capture a video longer than 2 seconds.
	FAILEDOPERATION_SILENTTOOSHORT = "FailedOperation.SilentTooShort"

	// Unknown internal error.
	FAILEDOPERATION_UNKNOWN = "FailedOperation.UnKnown"

	// Invalid parameter.
	INVALIDPARAMETER = "InvalidParameter"

	// Incorrect parameter value.
	INVALIDPARAMETERVALUE = "InvalidParameterValue"

	// Unauthorized operation.
	UNAUTHORIZEDOPERATION = "UnauthorizedOperation"

	// The account is in arrears.
	UNAUTHORIZEDOPERATION_ARREARS = "UnauthorizedOperation.Arrears"

	// Identity verification has not been completed for the account.
	UNAUTHORIZEDOPERATION_NONAUTHORIZE = "UnauthorizedOperation.NonAuthorize"

	// The service has not been activated.
	UNAUTHORIZEDOPERATION_NONACTIVATED = "UnauthorizedOperation.Nonactivated"

	// Unsupported operation.
	UNSUPPORTEDOPERATION = "UnsupportedOperation"
)
View Source
const APIVersion = "2018-03-01"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) LivenessCompare

func (c *Client) LivenessCompare(request *LivenessCompareRequest) (response *LivenessCompareResponse, err error)

LivenessCompare This API is used to pass in a video and a photo, determine whether the person in the video is real, and if yes, then determine whether the person in the video is the same as that in the photo.

error code that may be returned:

FAILEDOPERATION_ACTIONCLOSEEYE = "FailedOperation.ActionCloseEye"
FAILEDOPERATION_ACTIONFACECLOSE = "FailedOperation.ActionFaceClose"
FAILEDOPERATION_ACTIONFACEFAR = "FailedOperation.ActionFaceFar"
FAILEDOPERATION_ACTIONFACELEFT = "FailedOperation.ActionFaceLeft"
FAILEDOPERATION_ACTIONFACERIGHT = "FailedOperation.ActionFaceRight"
FAILEDOPERATION_ACTIONFIRSTACTION = "FailedOperation.ActionFirstAction"
FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark"
FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong"
FAILEDOPERATION_ACTIONNODETECTFACE = "FailedOperation.ActionNodetectFace"
FAILEDOPERATION_ACTIONOPENMOUTH = "FailedOperation.ActionOpenMouth"
FAILEDOPERATION_COMPAREFAIL = "FailedOperation.CompareFail"
FAILEDOPERATION_COMPARELOWSIMILARITY = "FailedOperation.CompareLowSimilarity"
FAILEDOPERATION_COMPARESYSTEMERROR = "FailedOperation.CompareSystemError"
FAILEDOPERATION_FILESAVEERROR = "FailedOperation.FileSaveError"
FAILEDOPERATION_IDFORMATERROR = "FailedOperation.IdFormatError"
FAILEDOPERATION_IDNAMEMISMATCH = "FailedOperation.IdNameMisMatch"
FAILEDOPERATION_IDNOEXISTSYSTEM = "FailedOperation.IdNoExistSystem"
FAILEDOPERATION_IDPHOTONOEXIST = "FailedOperation.IdPhotoNoExist"
FAILEDOPERATION_IDPHOTOPOORQUALITY = "FailedOperation.IdPhotoPoorQuality"
FAILEDOPERATION_IDPHOTOSYSTEMNOANSWER = "FailedOperation.IdPhotoSystemNoanswer"
FAILEDOPERATION_LIFEPHOTODETECTFACES = "FailedOperation.LifePhotoDetectFaces"
FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake"
FAILEDOPERATION_LIFEPHOTODETECTNOFACES = "FailedOperation.LifePhotoDetectNoFaces"
FAILEDOPERATION_LIFEPHOTOPOORQUALITY = "FailedOperation.LifePhotoPoorQuality"
FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError"
FAILEDOPERATION_LIPFACEINCOMPLETE = "FailedOperation.LipFaceIncomplete"
FAILEDOPERATION_LIPMOVESMALL = "FailedOperation.LipMoveSmall"
FAILEDOPERATION_LIPNETFAILED = "FailedOperation.LipNetFailed"
FAILEDOPERATION_LIPSIZEERROR = "FailedOperation.LipSizeError"
FAILEDOPERATION_LIPVIDEOINVALID = "FailedOperation.LipVideoInvalid"
FAILEDOPERATION_LIPVIDEOQUAILITY = "FailedOperation.LipVideoQuaility"
FAILEDOPERATION_LIPVOICEDETECT = "FailedOperation.LipVoiceDetect"
FAILEDOPERATION_LIPVOICELOW = "FailedOperation.LipVoiceLow"
FAILEDOPERATION_LIPVOICERECOGNIZE = "FailedOperation.LipVoiceRecognize"
FAILEDOPERATION_LIVESSBESTFRAMEERROR = "FailedOperation.LivessBestFrameError"
FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail"
FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake"
FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError"
FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError"
FAILEDOPERATION_NAMEFORMATERROR = "FailedOperation.NameFormatError"
FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail"
FAILEDOPERATION_SILENTEYELIVEFAIL = "FailedOperation.SilentEyeLiveFail"
FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail"
FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail"
FAILEDOPERATION_SILENTFACEWITHMASKFAIL = "FailedOperation.SilentFaceWithMaskFail"
FAILEDOPERATION_SILENTMOUTHLIVEFAIL = "FailedOperation.SilentMouthLiveFail"
FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail"
FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail"
FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold"
FAILEDOPERATION_SILENTTOOSHORT = "FailedOperation.SilentTooShort"
FAILEDOPERATION_UNKNOWN = "FailedOperation.UnKnown"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETERVALUE = "InvalidParameterValue"
UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
UNAUTHORIZEDOPERATION_ARREARS = "UnauthorizedOperation.Arrears"
UNAUTHORIZEDOPERATION_NONAUTHORIZE = "UnauthorizedOperation.NonAuthorize"
UNAUTHORIZEDOPERATION_NONACTIVATED = "UnauthorizedOperation.Nonactivated"
UNSUPPORTEDOPERATION = "UnsupportedOperation"

type LivenessCompareRequest

type LivenessCompareRequest struct {
	*tchttp.BaseRequest

	// Base64 string of the image for face comparison.
	// The size of the Base64-encoded image data can be up to 3 MB. JPG and PNG formats are supported.
	// Please use the standard Base64 encoding scheme (with the "=" padding). For the encoding conventions, please see RFC 4648.
	ImageBase64 *string `json:"ImageBase64,omitempty" name:"ImageBase64"`

	// Base64 string of the video for liveness detection.
	// The size of the Base64-encoded video data can be up to 8 MB. MP4, AVI, and FLV formats are supported.
	// Please use the standard Base64 encoding scheme (with the "=" padding). For the encoding conventions, please see RFC 4648.
	VideoBase64 *string `json:"VideoBase64,omitempty" name:"VideoBase64"`

	// Liveness detection type. Valid values: LIP/ACTION/SILENT.
	// LIP: numeric mode; ACTION: motion mode; SILENT: silent mode. You need to select a mode to input.
	LivenessType *string `json:"LivenessType,omitempty" name:"LivenessType"`

	// Input parameter for the numeric mode: numeric verification code (1234). An API needs to be called first to get a numeric verification code;
	// Input parameter for the motion mode: motion order (2,1 or 1,2). An API needs to be called first to get the motion order;
	// Input parameter for silent mode: empty.
	ValidateData *string `json:"ValidateData,omitempty" name:"ValidateData"`

	// This parameter does not need to be passed in for this API.
	Optional *string `json:"Optional,omitempty" name:"Optional"`
}

func NewLivenessCompareRequest

func NewLivenessCompareRequest() (request *LivenessCompareRequest)

func (*LivenessCompareRequest) FromJsonString

func (r *LivenessCompareRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*LivenessCompareRequest) ToJsonString

func (r *LivenessCompareRequest) ToJsonString() string

type LivenessCompareResponse

type LivenessCompareResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// The best screenshot of the video after successful verification. The photo is Base64-encoded and in JPG format.
		BestFrameBase64 *string `json:"BestFrameBase64,omitempty" name:"BestFrameBase64"`

		// Similarity. Value range: [0.00, 100.00]. As a recommendation, when the similarity is greater than or equal to 70, it can be determined that the two faces are of the same person. You can adjust the threshold according to your specific scenario (the FAR at the threshold of 70 is 0.1%, and FAR at the threshold of 80 is 0.01%).
		Sim *float64 `json:"Sim,omitempty" name:"Sim"`

		// Service error code. `Success` will be returned for success. For error information, please see the `FailedOperation` section in the error code list below.
		Result *string `json:"Result,omitempty" name:"Result"`

		// Service result description.
		Description *string `json:"Description,omitempty" name:"Description"`

		//
		BestFrameList []*string `json:"BestFrameList,omitempty" name:"BestFrameList"`

		// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewLivenessCompareResponse

func NewLivenessCompareResponse() (response *LivenessCompareResponse)

func (*LivenessCompareResponse) FromJsonString

func (r *LivenessCompareResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*LivenessCompareResponse) ToJsonString

func (r *LivenessCompareResponse) ToJsonString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL