public class AxisCamera extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AxisCamera.ExposureControl |
static class |
AxisCamera.Resolution |
static class |
AxisCamera.Rotation |
static class |
AxisCamera.WhiteBalance |
Constructor and Description |
---|
AxisCamera(String cameraHost)
AxisCamera constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getBrightness() |
int |
getColorLevel() |
int |
getCompression() |
AxisCamera.ExposureControl |
getExposureControl() |
int |
getExposurePriority() |
edu.wpi.first.wpilibj.image.HSLImage |
getImage()
Instantiate a new image object and fill it with the latest image from the camera.
|
boolean |
getImage(edu.wpi.first.wpilibj.image.ColorImage image)
Get an image from the camera and store it in the provided image.
|
boolean |
getImage(NIVision.Image image)
Get an image from the camera and store it in the provided image.
|
int |
getMaxFPS() |
AxisCamera.Resolution |
getResolution() |
AxisCamera.Rotation |
getRotation() |
AxisCamera.WhiteBalance |
getWhiteBalance() |
boolean |
isFreshImage()
Return true if the latest image from the camera has not been retrieved by calling GetImage() yet.
|
String |
toString() |
void |
writeBrightness(int brightness)
Request a change in the brightness of the camera images.
|
void |
writeColorLevel(int colorLevel)
Request a change in the color level of the camera images.
|
void |
writeCompression(int compression)
Write the compression value to the camera.
|
void |
writeExposureControl(AxisCamera.ExposureControl exposureControl)
Request a change in the camera's exposure mode.
|
void |
writeExposurePriority(int exposurePriority)
Request a change in the exposure priority of the camera.
|
void |
writeMaxFPS(int maxFPS)
Write the maximum frames per second that the camera should send
Write 0 to send as many as possible.
|
void |
writeResolution(AxisCamera.Resolution resolution)
Write resolution value to camera.
|
void |
writeRotation(AxisCamera.Rotation rotation)
Write the rotation value to the camera.
|
void |
writeWhiteBalance(AxisCamera.WhiteBalance whiteBalance)
Request a change in the white balance on the camera.
|
public AxisCamera(String cameraHost)
cameraHost
- The host to find the camera at, typically an IP addresspublic boolean isFreshImage()
public boolean getImage(NIVision.Image image)
image
- The imaq image to store the result in. This must be an HSL or RGB image.true
upon success, false
on a failurepublic boolean getImage(edu.wpi.first.wpilibj.image.ColorImage image)
image
- The image to store the result in. This must be an HSL or RGB imagepublic edu.wpi.first.wpilibj.image.HSLImage getImage() throws edu.wpi.first.wpilibj.image.NIVisionException
edu.wpi.first.wpilibj.image.NIVisionException
public void writeBrightness(int brightness)
brightness
- valid values 0 .. 100public int getBrightness()
public void writeWhiteBalance(AxisCamera.WhiteBalance whiteBalance)
whiteBalance
- Valid values from the WhiteBalance
enum.public AxisCamera.WhiteBalance getWhiteBalance()
public void writeColorLevel(int colorLevel)
colorLevel
- valid values are 0 .. 100public int getColorLevel()
public void writeExposureControl(AxisCamera.ExposureControl exposureControl)
exposureControl
- A mode to write in the Exposure
enum.public AxisCamera.ExposureControl getExposureControl()
public void writeExposurePriority(int exposurePriority)
exposurePriority
- Valid values are 0, 50, 100.
0 = Prioritize image quality
50 = None
100 = Prioritize frame ratepublic int getExposurePriority()
public void writeMaxFPS(int maxFPS)
maxFPS
- The number of frames the camera should send in a second, exposure permitting.public int getMaxFPS()
public void writeResolution(AxisCamera.Resolution resolution)
resolution
- The camera resolution value to write to the camera.public AxisCamera.Resolution getResolution()
public void writeCompression(int compression)
compression
- Values between 0 and 100.public int getCompression()
public void writeRotation(AxisCamera.Rotation rotation)
rotation
- A value from the AxisCamera.Rotation
enumpublic AxisCamera.Rotation getRotation()
Copyright © 2015. All rights reserved.