Interface VisionBackend

All Superinterfaces:
AlgorithmProvider, Backend, ComputeBackend, VisionAlgorithmProvider<BufferedImage>
All Known Implementing Classes:
JavaAWTVisionBackend, JavaCVMediaBackend, MulticoreVisionBackend, NativeCPUCBindingVisionBackend, NativeCPUVisionBackend, NativeCUDAVisionBackend, NativeJavaCVMediaBackend, NativeOpenCLVisionBackend, VLCJMediaBackend

public interface VisionBackend extends ComputeBackend, VisionAlgorithmProvider<BufferedImage>
Interface for Vision Backends.
Since:
2.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getType

      default String getType()
      Description copied from interface: Backend
      Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").
      Specified by:
      getType in interface Backend
      Specified by:
      getType in interface ComputeBackend
    • createContext

      default ExecutionContext createContext()
      Description copied from interface: ComputeBackend
      Creates 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:
      createContext in interface ComputeBackend
      Returns:
      new execution context
    • getName

      default String getName()
      Description copied from interface: Backend
      Returns the display name for UI presentation.
      Specified by:
      getName in interface AlgorithmProvider
      Specified by:
      getName in interface Backend
      Specified by:
      getName in interface VisionAlgorithmProvider<BufferedImage>
    • getBackendName

      String getBackendName()
      Returns the friendly name of this backend instance.
    • getId

      default String getId()
      Description copied from interface: Backend
      Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").
      Specified by:
      getId in interface Backend
      Specified by:
      getId in interface ComputeBackend
    • getDescription

      default String getDescription()
      Description copied from interface: Backend
      Returns a description of the backend.
      Specified by:
      getDescription in interface Backend
      Specified by:
      getDescription in interface ComputeBackend
    • getPriority

      default int getPriority()
      Description copied from interface: Backend
      Returns the priority for auto-selection (higher = preferred). Used when multiple backends are available.
      Specified by:
      getPriority in interface AlgorithmProvider
      Specified by:
      getPriority in interface Backend
    • isAvailable

      default boolean isAvailable()
      Description copied from interface: Backend
      Checks if this backend is currently available (libraries loaded, etc.).

      Default implementation checks Backend.isExplicitlyDisabled() and returns false if it is.

      Specified by:
      isAvailable in interface AlgorithmProvider
      Specified by:
      isAvailable in interface Backend
    • shutdown

      default void shutdown()
      Description copied from interface: Backend
      Called 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:
      shutdown in interface AlgorithmProvider
      Specified by:
      shutdown in interface Backend
    • getAcceleratorType

      default HardwareAccelerator getAcceleratorType()
      Description copied from interface: ComputeBackend
      Returns the type of hardware accelerator used by this backend.
      Specified by:
      getAcceleratorType in interface ComputeBackend
      Returns:
      the accelerator type
    • createBackend

      default Object createBackend()
      Description copied from interface: Backend
      Creates and returns the backend instance (or returns self if it is the backend).
      Specified by:
      createBackend in interface Backend
      Specified by:
      createBackend in interface ComputeBackend
      Returns:
      The backend implementation object