All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.triniwiz.fancycamera.facedetection.Result.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0-alpha.17
Show newest version
package io.github.triniwiz.fancycamera.facedetection

import android.graphics.Rect
import com.google.mlkit.vision.face.Face

class Result(instance: Face) {
    val smilingProbability = instance.smilingProbability
    val leftEyeOpenProbability = instance.leftEyeOpenProbability
    val rightEyeOpenProbability = instance.rightEyeOpenProbability
    val trackingId = instance.smilingProbability
    val bounds = Bounds(instance.boundingBox)
    val headEulerAngleZ = instance.headEulerAngleZ
    val headEulerAngleY = instance.headEulerAngleY
    val headEulerAngleX = instance.headEulerAngleX


    class Bounds(rect: Rect) {
        val x: Int = rect.left

        val y: Int = rect.top

        val width: Int = rect.width()

        val height: Int = rect.height()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy