28 lines
1.2 KiB
Kotlin
28 lines
1.2 KiB
Kotlin
package com.google.mediapipe.tasks.vision.facelandmarker
|
|
class Landmark {fun x()=.5f;fun y()=.5f}
|
|
class Category {fun categoryName()="none";fun score()=0f}
|
|
class Result {
|
|
fun faceLandmarks(): List<List<Landmark>> = emptyList()
|
|
fun faceBlendshapes(): java.util.Optional<List<List<Category>>> = java.util.Optional.empty()
|
|
fun facialTransformationMatrixes(): java.util.Optional<List<FloatArray>> = java.util.Optional.empty()
|
|
}
|
|
class FaceLandmarker {
|
|
fun detectForVideo(image: com.google.mediapipe.framework.image.MPImage,now: Long)=Result()
|
|
fun close() {}
|
|
class FaceLandmarkerOptions {
|
|
companion object {fun builder()=Builder()}
|
|
class Builder {
|
|
fun setBaseOptions(b: com.google.mediapipe.tasks.core.BaseOptions)=this
|
|
fun setRunningMode(r: com.google.mediapipe.tasks.vision.core.RunningMode)=this
|
|
fun setNumFaces(n: Int)=this
|
|
fun setMinFaceDetectionConfidence(f: Float)=this
|
|
fun setMinFacePresenceConfidence(f: Float)=this
|
|
fun setMinTrackingConfidence(f: Float)=this
|
|
fun setOutputFaceBlendshapes(b: Boolean)=this
|
|
fun setOutputFacialTransformationMatrixes(b: Boolean)=this
|
|
fun build()=FaceLandmarkerOptions()
|
|
}
|
|
}
|
|
companion object {fun createFromOptions(c: android.content.Context,o: FaceLandmarkerOptions)=FaceLandmarker()}
|
|
}
|