Package inputOutput
Class LivestreamSource
java.lang.Object
inputOutput.AbstractImageSource
inputOutput.LivestreamSource
provides the livestream footage from a webcam, ultrasound device or any other
suitable devices.
-
Field Summary
Fields inherited from class inputOutput.AbstractImageSource
exit, fps, frameMatrix, isConnected
-
Method Summary
Modifier and TypeMethodDescriptionboolean
closes connection to the device and setsisConnected = false
static LivestreamSource
forDevice
(int id) org.opencv.core.Mat
Transmits the matrix of the pictureboolean
initializes a new VideoCapture object using thedeviceID
.
-
Method Details
-
forDevice
-
openConnection
public boolean openConnection()initializes a new VideoCapture object using thedeviceID
. The webcam (or other video devices) is opened.- Specified by:
openConnection
in classAbstractImageSource
- 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 classAbstractImageSource
- Returns:
frameMatrix
-
closeConnection
public boolean closeConnection()closes connection to the device and setsisConnected = false
- Specified by:
closeConnection
in classAbstractImageSource
- Returns:
isConnected = false
-