Skip to content

Instantly share code, notes, and snippets.

@apkelly
Last active January 17, 2019 03:31
Show Gist options
  • Save apkelly/48261589ddb923c4314fc3208ce8d427 to your computer and use it in GitHub Desktop.
Save apkelly/48261589ddb923c4314fc3208ce8d427 to your computer and use it in GitHub Desktop.
SaveFrameFaceDetector.kt
class SaveFrameFaceDetector(private val delegateDetector: Detector<Face>) : Detector<Face>() {
var lastFrame: Frame? = null
override fun detect(frame: Frame): SparseArray<Face> {
lastFrame = frame
return delegateDetector.detect(frame)
}
override fun isOperational(): Boolean {
return delegateDetector.isOperational
}
override fun setFocus(id: Int): Boolean {
return delegateDetector.setFocus(id)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment