Class CamService

java.lang.Object
dev.ioliver.services.CamService

public class CamService extends Object
The CamService class provides a service for capturing frames from a camera using the OpenCV library. It initializes the camera, reads frames, and processes them using a callback function.
  • Constructor Details

    • CamService

      public CamService(int camIndex, CamService.FrameProcessorCb cb)
      Constructs a new CamService instance with the specified camera index and frame processing callback.
      Parameters:
      camIndex - The index of the camera to be used for capturing frames.
      cb - The callback function for processing frames.
      Throws:
      RuntimeException - If the camera fails to open.