public class Camera
extends java.lang.Object
Constructor and Description |
---|
Camera(int index,
boolean autoUpdate)
Creates a new Camera.
|
Modifier and Type | Method and Description |
---|---|
double |
getExposure()
Gets the exposure of this Camera.
|
double |
getFPS()
Gets the FPS of this Camera.
|
Image |
getImage()
Gets the current Image on this Camera.
|
double |
getRaw(int propid)
Gets the value of an OpenCV property.
|
boolean |
isAutoUpdating()
Checks if this Camera is auto updating its frames.
|
boolean |
isOpen()
Checks if this Camera is open.
|
boolean |
isUpdatingEnabled()
Checks if the auto updating for this Camera is enabled.
|
void |
onEachFrame(java.util.function.Consumer<Image> c)
Sets the code that runs every time a frame is processed.
|
void |
open()
Opens this Camera.
|
void |
release()
Releases this Camera.
|
boolean |
setExposure(double d)
Sets the exposure of this Camera.
|
boolean |
setFPS(double d)
Sets the FPS of this Camera.
|
boolean |
setRaw(int propid,
double val)
Sets the value of an OpenCV property.
|
void |
setUpdatingEnabled(boolean u)
Sets if the auto updating for this Camera is enabled.
|
public Camera(int index, boolean autoUpdate)
index
- The ID of the Camera, 0-indexed. If there is only one Camera available, it should be ID 0.autoUpdate
- If this Camera should keep the frames served by Camera.getImage() up to date.public boolean isUpdatingEnabled()
public void setUpdatingEnabled(boolean u)
u
- The new status of the auto updating.public boolean isOpen()
public boolean isAutoUpdating()
public void onEachFrame(java.util.function.Consumer<Image> c)
c
- The code to be run.public Image getImage()
public void open()
public void release()
public double getFPS()
public boolean setFPS(double d)
d
- The new FPS.public double getExposure()
public boolean setExposure(double d)
d
- The new exposure.public double getRaw(int propid)
propid
- The property ID. Should be a variable defined in Videoio.public boolean setRaw(int propid, double val)
propid
- The property ID. Should be a variable defined in Videoio.val
- The value to set the property to.