Package inputOutput

Class LivestreamSource


public class LivestreamSource extends AbstractImageSource
provides the livestream footage from a webcam, ultrasound device or any other suitable devices.
  • Method Details

    • forDevice

      public static LivestreamSource forDevice(int id)
    • openConnection

      public boolean openConnection()
      initializes a new VideoCapture object using the deviceID. The webcam (or other video devices) is opened.
      Specified by:
      openConnection in class AbstractImageSource
      Returns:
      whether the connection was successful or not
    • getNextMat

      public org.opencv.core.Mat getNextMat()
      Transmits the matrix of the picture
      Specified by:
      getNextMat in class AbstractImageSource
      Returns:
      frameMatrix
    • closeConnection

      public boolean closeConnection()
      closes connection to the device and sets isConnected = false
      Specified by:
      closeConnection in class AbstractImageSource
      Returns:
      isConnected = false