public class CameraControlOptions
extends java.lang.Object
Those options are general in the sense that they can be used for a simple preview as well as for a new picture or a new video.
The default, min and max values of those options are defined according to informations given in official documentation (RaspberryPi/Camera)
PreviewConfig
,
PictureConfig
,
VideoConfig
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BRIGHTNESS
Default brightness value.
|
static int |
DEFAULT_CONTRAST
Deault contrast value.
|
static int |
DEFAULT_EV_COMPENSATION
Default EV compensation value.
|
static int |
DEFAULT_SATURATION
Default saturation value.
|
static int |
DEFAULT_SHARPNESS
Default sharpness value.
|
static int |
MAX_BRIGHTNESS
Maximum brightness value.
|
static int |
MAX_CONTRAST
Maximum contrast value.
|
static int |
MAX_EV_COMPENSATION
Maximum EV compensation value.
|
static int |
MAX_ISO
Maximum ISO value.
|
static int |
MAX_SATURATION
Maximum saturation value.
|
static int |
MAX_SHARPNESS
Maximum sharpness value.
|
static int |
MIN_BRIGHTNESS
Minimum brightness value.
|
static int |
MIN_CONTRAST
Minimum contrast value.
|
static int |
MIN_EV_COMPENSATION
Minimum EV compensation value.
|
static int |
MIN_ISO
Minimum ISO value.
|
static int |
MIN_SATURATION
Minimum saturation value.
|
static int |
MIN_SHARPNESS
Minimum sharpness value.
|
Constructor and Description |
---|
CameraControlOptions() |
Modifier and Type | Method and Description |
---|---|
void |
annotate(boolean annotationTime,
boolean annotationDate,
java.lang.String annotationTxt)
Add some text and/or metadata to the picture.
|
protected java.lang.String |
getOptions()
Get the options to add to command line requests, regarding
camera control options.
|
void |
setAWBMode(AWBMode awbMode)
Set the Automatic White Balance (AWB) mode.
|
void |
setBrightness(int brightness)
Set the brightness of the image.
|
void |
setCameraMode(CameraMode cameraMode)
Sets a specified sensor mode, disabling the automatic selection.
|
void |
setContrast(int contrast)
Set the contrast of the image.
|
void |
setEVCompensation(int evCompensation)
Set the EV compensation of the image.
|
void |
setExposureMode(ExposureMode exposureMode)
Set the exposure mode.
|
void |
setHorizontalFlip(boolean active)
Flips the preview and saved image horizontally.
|
void |
setImageEffect(ImageEffect imageEffect)
Set an effect to be applied to the image.
|
void |
setISO(int iso)
Sets the ISO to be used for captures.
|
void |
setRotationDegree(RotationDegree rotationDegree)
Sets the rotation of the image in viewfinder and resulting image.
|
void |
setSaturation(int saturation)
Set the colour saturation of the image.
|
void |
setSharpness(int sharpness)
Set the sharpness of the image.
|
void |
setVerticalFlip(boolean active)
Flips the preview and saved image vertically.
|
public static final int DEFAULT_SHARPNESS
public static final int MAX_SHARPNESS
public static final int MIN_SHARPNESS
public static final int DEFAULT_CONTRAST
public static final int MAX_CONTRAST
public static final int MIN_CONTRAST
public static final int DEFAULT_BRIGHTNESS
public static final int MAX_BRIGHTNESS
public static final int MIN_BRIGHTNESS
public static final int DEFAULT_SATURATION
public static final int MAX_SATURATION
public static final int MIN_SATURATION
public static final int MAX_ISO
public static final int MIN_ISO
public static final int DEFAULT_EV_COMPENSATION
public static final int MAX_EV_COMPENSATION
public static final int MIN_EV_COMPENSATION
public void setSharpness(int sharpness)
sharpness
- the new sharpness value, in the -100..100 interval.public void setContrast(int contrast)
contrast
- the new contrast value, in the -100..100 interval.public void setBrightness(int brightness)
brightness
- the new brightness value, in the 0..100 interval.public void setSaturation(int saturation)
saturation
- the new saturation value, in the -100..100 interval.public void setISO(int iso)
iso
- the new ISO value, in the 100..800 interval.public void setEVCompensation(int evCompensation)
evCompensation
- the new EV compensation value, in the -10..10 interval.public void setExposureMode(ExposureMode exposureMode)
exposureMode
- the new exposure mode.public void setAWBMode(AWBMode awbMode)
awbMode
- the new automatic white balance mode.public void setImageEffect(ImageEffect imageEffect)
imageEffect
- the new effected to be applied to the image.public void setRotationDegree(RotationDegree rotationDegree)
rotationDegree
- the new rotation to be applied to the image.public void setHorizontalFlip(boolean active)
active
- true to flip the image horizontally. False otherwise.public void setVerticalFlip(boolean active)
active
- true to flip the image vertically. False otherwise.public void setCameraMode(CameraMode cameraMode)
cameraMode
- the new camera mode to be applied on the image.public void annotate(boolean annotationTime, boolean annotationDate, java.lang.String annotationTxt)
annotationTime
- true to add time on the picture. False otherwise.annotationDate
- true to add date on the picture. False otherwise.annotationTxt
- the text to add on the picture. null if unusedprotected java.lang.String getOptions()