Interface VisionBackend
- All Superinterfaces:
AlgorithmProvider, Backend, ComputeBackend, VisionAlgorithmProvider<BufferedImage>
- All Known Implementing Classes:
JavaAWTVisionBackend, JavaCVMediaBackend, MulticoreVisionBackend, NativeCPUCBindingVisionBackend, NativeCPUVisionBackend, NativeCUDAVisionBackend, NativeJavaCVMediaBackend, NativeOpenCLVisionBackend, VLCJMediaBackend
Interface for Vision Backends.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectCreates and returns the backend instance (or returns self if it is the backend).default ExecutionContextCreates an execution context for running operations.default HardwareAcceleratorReturns the type of hardware accelerator used by this backend.Returns the friendly name of this backend instance.default StringReturns a description of the backend.default StringgetId()Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").default StringgetName()Returns the display name for UI presentation.default intReturns the priority for auto-selection (higher = preferred).default StringgetType()Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").default booleanChecks if this backend is currently available (libraries loaded, etc.).default voidshutdown()Called when the application is shutting down or the backend is being replaced.Methods inherited from interface AlgorithmProvider
description, getMetadata, scoreMethods inherited from interface Backend
getAlgorithmProviders, getStatusMessage, isExplicitlyDisabledMethods inherited from interface ComputeBackend
supportsComplexNumbers, supportsFloatingPoint, supportsParallelOpsMethods inherited from interface VisionAlgorithmProvider
apply, createImage, getAlgorithmType
-
Method Details
-
getType
-
createContext
Description copied from interface:ComputeBackendCreates an execution context for running operations.The context should be used within a try-with-resources block to ensure proper cleanup of resources.
- Specified by:
createContextin interfaceComputeBackend- Returns:
- new execution context
-
getName
Description copied from interface:BackendReturns the display name for UI presentation.- Specified by:
getNamein interfaceAlgorithmProvider- Specified by:
getNamein interfaceBackend- Specified by:
getNamein interfaceVisionAlgorithmProvider<BufferedImage>
-
getBackendName
String getBackendName()Returns the friendly name of this backend instance. -
getId
-
getDescription
Description copied from interface:BackendReturns a description of the backend.- Specified by:
getDescriptionin interfaceBackend- Specified by:
getDescriptionin interfaceComputeBackend
-
getPriority
default int getPriority()Description copied from interface:BackendReturns the priority for auto-selection (higher = preferred). Used when multiple backends are available.- Specified by:
getPriorityin interfaceAlgorithmProvider- Specified by:
getPriorityin interfaceBackend
-
isAvailable
default boolean isAvailable()Description copied from interface:BackendChecks if this backend is currently available (libraries loaded, etc.).Default implementation checks
Backend.isExplicitlyDisabled()and returns false if it is.- Specified by:
isAvailablein interfaceAlgorithmProvider- Specified by:
isAvailablein interfaceBackend
-
shutdown
default void shutdown()Description copied from interface:BackendCalled when the application is shutting down or the backend is being replaced. Use this to release hardware resources, close file handles, or stop background threads.- Specified by:
shutdownin interfaceAlgorithmProvider- Specified by:
shutdownin interfaceBackend
-
getAcceleratorType
Description copied from interface:ComputeBackendReturns the type of hardware accelerator used by this backend.- Specified by:
getAcceleratorTypein interfaceComputeBackend- Returns:
- the accelerator type
-
createBackend
Description copied from interface:BackendCreates and returns the backend instance (or returns self if it is the backend).- Specified by:
createBackendin interfaceBackend- Specified by:
createBackendin interfaceComputeBackend- Returns:
- The backend implementation object
-