Class VisionBackends
java.lang.Object
com.codename1.ai.vision.VisionBackends
Vision backend selectors. auto() chooses Apple Vision on iOS and
ML Kit on Android. Feature-specific ML Kit methods are separate so one
selector never adds unrelated OCR, barcode, face, pose, labeling, or
segmentation pods.
Each ML Kit selector call is also a build-time dependency marker. The methods intentionally return the same runtime backend id but must remain distinct so the builder can include only the selected feature. Pass the selector that corresponds to the analyzer being constructed; for example, the face-detection selector cannot satisfy a text recognizer and that mismatched analyzer reports unsupported.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VisionBackendSelects Apple Vision/Core Image without adding a third-party dependency.static VisionBackendauto()static VisionBackendSelects ML Kit for barcode scanning on iOS.static VisionBackendSelects ML Kit for face detection on iOS.static VisionBackendSelects ML Kit for image labeling on iOS.static VisionBackendSelects ML Kit for pose detection on iOS.static VisionBackendSelects ML Kit for selfie segmentation on iOS.static VisionBackendSelects ML Kit for text recognition on iOS.
-
Method Details
-
auto
- Returns:
- the dependency-minimal platform default
-
appleVision
Selects Apple Vision/Core Image without adding a third-party dependency.- Returns:
- Apple-native backend selector
-
mlKitTextRecognition
Selects ML Kit for text recognition on iOS. Android already uses ML Kit for the automatic backend.- Returns:
- the ML Kit backend selector
-
mlKitBarcodeScanning
Selects ML Kit for barcode scanning on iOS.- Returns:
- the ML Kit backend selector
-
mlKitFaceDetection
Selects ML Kit for face detection on iOS.- Returns:
- the ML Kit backend selector
-
mlKitImageLabeling
Selects ML Kit for image labeling on iOS.- Returns:
- the ML Kit backend selector
-
mlKitPoseDetection
Selects ML Kit for pose detection on iOS.- Returns:
- the ML Kit backend selector
-
mlKitSelfieSegmentation
Selects ML Kit for selfie segmentation on iOS.- Returns:
- the ML Kit backend selector
-