Interface VisionAnalyzer<T>
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
BarcodeScanner, DocumentScanner, FaceDetector, ImageLabeler, PoseDetector, SelfieSegmenter, TextRecognizer
Reusable, closable on-device analyzer for still images or camera frames.
Implementations may retain native detectors and models between calls, so
create one analyzer per stream/workflow and close it when finished.
Backend creation, request scheduling, capability checks, and close are
serialized so a concurrent close cannot leave a newly created backend
attached after the analyzer has closed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases native detector/model resources; further processing fails.booleanTests the exact feature/backend pair configured for this analyzer.process(VisionImage image) Starts one asynchronous analysis without uploading the image.
-
Method Details
-
isSupported
boolean isSupported()Tests the exact feature/backend pair configured for this analyzer.- Returns:
truewhen the current target supports it
-
process
Starts one asynchronous analysis without uploading the image.- Parameters:
image- encoded or raw input- Returns:
- asynchronous typed result delivered on the EDT
-
close
void close()Releases native detector/model resources; further processing fails.- Specified by:
closein interfaceAutoCloseable
-