DetectionTaskCallback
Stay organized with collections
Save and categorize content based on your preferences.
Interface for defining a post-processing action to be executed for each detection.This is
used by CameraXSource
for the pipeline to feed camera frames to detectors and invoke callbacks that are set by
developers. Developers must override the
onDetectionTaskReceived(Task)
callback in order to receive detection tasks.
Public Methods
public abstract void onDetectionTaskReceived (Task<ResultT> detectionTask)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`DetectionTaskCallback` is an interface used to define actions performed after each detection within the CameraXSource pipeline."],["Developers need to override the `onDetectionTaskReceived` method to get detection tasks from the `CameraXSource`."],["`CameraXSource` uses this interface to feed camera frames to detectors and trigger developer-set callbacks."]]],["The `DetectionTaskCallback` interface defines post-processing for each detection using `CameraXSource`. Developers must implement `onDetectionTaskReceived(Task)` to receive these tasks. `CameraXSource` uses this callback to feed camera frames to detectors. The `onDetectionTaskReceived` method, the only method in the interface, is called by `CameraXSource` to deliver a detection task to the callback. This enables developers to define actions for each detected item within the camera frame pipeline.\n"]]