18 lines
401 B
Kotlin
18 lines
401 B
Kotlin
package com.example.animalrating.ml
|
|
|
|
import android.graphics.Bitmap
|
|
import androidx.camera.core.ImageAnalysis
|
|
import androidx.camera.core.ImageProxy
|
|
|
|
class CowAnalyzer(
|
|
private val listener: CowListener
|
|
) : ImageAnalysis.Analyzer {
|
|
|
|
interface CowListener {
|
|
fun onFrame(imageProxy: ImageProxy)
|
|
}
|
|
|
|
override fun analyze(image: ImageProxy) {
|
|
listener.onFrame(image)
|
|
}
|
|
} |