MyImageAnalyser

class MyImageAnalyser(val context: Context, val settings: ObjectDetectorSettings = ObjectDetectorSettings(), val resultsCallback: ObjectDetectorCallbacks) : ImageAnalysis.Analyzer

This class is the main class that uses the MediaPipe logic https://ai.google.dev/edge/mediapipe/solutions/vision/object_detector/android

Constructors

Link copied to clipboard
constructor(context: Context, settings: ObjectDetectorSettings = ObjectDetectorSettings(), resultsCallback: ObjectDetectorCallbacks)

Properties

Link copied to clipboard
private val context: Context
Link copied to clipboard
private var objectDetector: ObjectDetector?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun analyze(image: ImageProxy)

Runs object detection on live streaming cameras frame-by-frame which are obtained and listened to asynchronously through the MPImageResultListener set at resultListener, which calls the resultsCallback of this MyImageAnalyser. Also read the original documentation ImageAnalysis.Analyzer.analyze

Link copied to clipboard
private fun errorListener(): ErrorListener
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private fun resultListener(): OutputHandler.ResultListener<ObjectDetectorResult, MPImage>
Link copied to clipboard
private fun setupObjectDetector()
Link copied to clipboard