001/*
002 * ===========================================================================================
003 * = COPYRIGHT
004 *          PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
005 *   This software is supplied under the terms of a license agreement or nondisclosure
006 *   agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or
007 *   disclosed except in accordance with the terms in that agreement.
008 *     Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved.
009 * Description: // Detail description about the function of this module,
010 *             // interfaces with the other modules, and dependencies.
011 * Revision History:
012 * Date                         Author                        Action
013 * 2017/04/01                   PAX                     Create/Add/Modify/Delete
014 * ===========================================================================================
015 */
016package com.pax.dal.entity;
017
018import android.graphics.Rect;
019
020
021public class LivenessDetectResult {
022    /**
023     * <div class="zh">人脸图片。JPG格式,200K以内。</div> <div class="en">Pictures of faces. JPG format, less than 200K.</div>
024     */
025    private byte[] imageData;
026    /**
027     * <div class="zh">活检评分。0.0~1.0。</div> <div class="en">Score of liveness detection. 0.0~1.0 .</div>
028     */
029    private double matchScore;
030    /**
031     * <div class="zh">时间戳。</div> <div class="en">Timestamp.</div>
032     */
033    private String timestamp;
034
035    /**
036     * <div class="zh">人脸框坐标。</div> <div class="en">The coordinates of face rectangle.</div>
037     */
038    private Rect rect;
039
040    /**
041     * <div class="zh">0:人脸质量好。1:存在多人脸。</div> <div class="en">0: Good face quality. 1: There are multiple faces.</div>
042     */
043    private int quality;
044
045    public LivenessDetectResult(byte[] imageData, double matchScore, String timestamp, Rect rect, int quality) {
046        this.imageData = imageData;
047        this.matchScore = matchScore;
048        this.timestamp = timestamp;
049        this.rect = rect;
050        this.quality = quality;
051    }
052
053    /**
054     * <div class="zh">获取人脸图片。</div> <div class="en">Get the pictures of faces.</div>
055     *
056     * @return <div class="zh">人脸图片。JPG格式,200K以内。</div> <div class="en">Pictures of faces. JPG format, less than 200K.</div>
057     */
058    public byte[] getImageData() {
059        return imageData;
060    }
061
062    /**
063     * <div class="zh">获取活体检测评分。</div> <div class="en">Get the score of liveness detect.</div>
064     *
065     * @return <div class="zh">活检评分。0.0~1.0。</div> <div class="en">Score of liveness detection. 0.0~1.0 .</div>
066     */
067    public double getMatchScore() {
068        return matchScore;
069    }
070
071    /**
072     * <div class="zh">获取时间戳。</div> <div class="en">Get the timestamp.</div>
073     *
074     * @return <div class="zh">时间戳。</div> <div class="en">Timestamp.</div>
075     */
076    public String getTimestamp() {
077        return timestamp;
078    }
079
080    /**
081     * <div class="zh">获取人脸框坐标。</div> <div class="en">Get the coordinates of face rectangle.</div>
082     *
083     * @return <div class="zh">人脸框坐标。</div> <div class="en">The coordinates of face rectangle.</div>
084     */
085    public Rect getRect() {
086        return rect;
087    }
088
089    /**
090     * <div class="zh">获取人脸质量。</div> <div class="en">Get face quality.</div>
091     *
092     * @return <div class="zh">0:人脸质量好。1:存在多人脸。</div> <div class="en">0: Good face quality. 1: There are multiple faces.</div>
093     */
094    public int getQuality() {
095        return quality;
096    }
097}