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 TypeMethodDescriptionbooleancloses connection to the device and setsisConnected = falsestatic LivestreamSourceforDevice(int id) org.opencv.core.MatTransmits the matrix of the picturebooleaninitializes 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:
openConnectionin classAbstractImageSource- Returns:
- whether the connection was successful or not
-
getNextMat
public org.opencv.core.Mat getNextMat()Transmits the matrix of the picture- Specified by:
getNextMatin classAbstractImageSource- Returns:
frameMatrix
-
closeConnection
public boolean closeConnection()closes connection to the device and setsisConnected = false- Specified by:
closeConnectionin classAbstractImageSource- Returns:
isConnected = false
-