Package edu.wpi.first.cscore
Class VideoCamera
java.lang.Object
edu.wpi.first.cscore.VideoSource
edu.wpi.first.cscore.VideoCamera
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
HttpCamera
,UsbCamera
public class VideoCamera extends VideoSource
A source that represents a video camera.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VideoCamera.WhiteBalance
White balance.Nested classes/interfaces inherited from class edu.wpi.first.cscore.VideoSource
VideoSource.ConnectionStrategy, VideoSource.Kind
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
VideoCamera(int handle)
Constructs a VideoCamera. -
Method Summary
Modifier and Type Method Description int
getBrightness()
Get the brightness, as a percentage (0-100).void
setBrightness(int brightness)
Set the brightness, as a percentage (0-100).void
setExposureAuto()
Set the exposure to auto aperture.void
setExposureHoldCurrent()
Set the exposure to hold current.void
setExposureManual(int value)
Set the exposure to manual, as a percentage (0-100).void
setWhiteBalanceAuto()
Set the white balance to auto.void
setWhiteBalanceHoldCurrent()
Set the white balance to hold current.void
setWhiteBalanceManual(int value)
Set the white balance to manual, with specified color temperature.Methods inherited from class edu.wpi.first.cscore.VideoSource
close, enumerateProperties, enumerateSinks, enumerateSources, enumerateVideoModes, equals, getActualDataRate, getActualFPS, getConfigJson, getDescription, getHandle, getKind, getKindFromInt, getLastFrameTime, getName, getProperty, getVideoMode, hashCode, isConnected, isEnabled, isValid, setConfigJson, setConnectionStrategy, setFPS, setPixelFormat, setResolution, setVideoMode, setVideoMode
-
Constructor Details
-
VideoCamera
Constructs a VideoCamera.- Parameters:
handle
- The video camera handle.
-
-
Method Details
-
setBrightness
Set the brightness, as a percentage (0-100).- Parameters:
brightness
- Brightness as a percentage (0-100).
-
getBrightness
Get the brightness, as a percentage (0-100).- Returns:
- The brightness as a percentage (0-100).
-
setWhiteBalanceAuto
Set the white balance to auto. -
setWhiteBalanceHoldCurrent
Set the white balance to hold current. -
setWhiteBalanceManual
Set the white balance to manual, with specified color temperature.- Parameters:
value
- The specified color temperature.
-
setExposureAuto
Set the exposure to auto aperture. -
setExposureHoldCurrent
Set the exposure to hold current. -
setExposureManual
Set the exposure to manual, as a percentage (0-100).- Parameters:
value
- The exposure as a percentage (0-100).
-