Package | com.distriqt.extension.camera.device |
Class | public class CameraParameters |
Inheritance | CameraParameters Object |
This class defines parameters for the Camera class.
In particular it defines available modes for aspects of camera operation, including flash modes.
You also use this class to setup the capture options, such as streaming width/height and initial capture device.
Property | Defined By | ||
---|---|---|---|
cameraMode : CameraMode
This defines the mode of the camera. | CameraParameters | ||
correctOrientation : Boolean = true
This is not yet supported!
Corrects the orientation of images and frames from the camera
based on the device orientation. | CameraParameters | ||
enableFrameBuffer : Boolean = true
If you set this to false then the camera will not capture
video frames. | CameraParameters | ||
prepareForCapture : Boolean = false
If true, the camera "still image" output will be activated
on initialisation. | CameraParameters | ||
previewMode : CameraMode
This defines the mode of the camera to use for preview frames. | CameraParameters |
Method | Defined By | ||
---|---|---|---|
Constructor
| CameraParameters |
Constant | Defined By | ||
---|---|---|---|
EXPOSURE_MODE_AUTO : String = exposure:mode:auto [static]
The device automatically adjusts the exposure once and then
changes the exposure mode to locked. | CameraParameters | ||
EXPOSURE_MODE_CONTINUOUS : String = exposure:mode:continuous [static]
The device automatically adjusts the exposure level as needed. | CameraParameters | ||
EXPOSURE_MODE_LOCKED : String = exposure:mode:locked [static]
The exposure level is fixed at its current level. | CameraParameters | ||
FLASH_MODE_AUTO : String = auto [static]
Flash mode auto, allows the camera to decide if the flash is required
| CameraParameters | ||
FLASH_MODE_OFF : String = off [static]
The flash is off
| CameraParameters | ||
FLASH_MODE_ON : String = on [static]
| CameraParameters | ||
FLASH_MODE_RED_EYE : String = red-eye [static]
| CameraParameters | ||
FLASH_MODE_TORCH : String = torch [static]
Turns the flash light on
| CameraParameters | ||
FOCUS_MODE_AUTO : String = focus:mode:auto [static]
The camera does a single scan focus then reverts to locked. | CameraParameters | ||
FOCUS_MODE_CONTINUOUS : String = focus:mode:continuous [static]
The camera continuously auto-focuses as needed
| CameraParameters | ||
FOCUS_MODE_LOCKED : String = focus:mode:locked [static]
The focal length is fixed. | CameraParameters | ||
WHITE_BALANCE_MODE_AUTO : String = white:balance:mode:auto [static]
The device performs an auto white balance operation now. | CameraParameters | ||
WHITE_BALANCE_MODE_CONTINUOUS : String = white:balance:mode:continuous [static]
The device continuously monitors white balance and adjusts when necessary. | CameraParameters | ||
WHITE_BALANCE_MODE_LOCKED : String = white:balance:mode:locked [static]
The white balance setting is locked. | CameraParameters |
cameraMode | property |
public var cameraMode:CameraMode
This defines the mode of the camera. Allows you to control the requested resolution of the captured image and video.
See also
correctOrientation | property |
public var correctOrientation:Boolean = true
This is not yet supported!
Corrects the orientation of images and frames from the camera based on the device orientation.
This is required as all images default to be taken with the camera in landscape mode so will return incorrectly rotated and sized if the device is used in a different orientation.
enableFrameBuffer | property |
public var enableFrameBuffer:Boolean = true
If you set this to false then the camera will not capture video frames.
prepareForCapture | property |
public var prepareForCapture:Boolean = false
If true, the camera "still image" output will be activated
on initialisation. This will start the process of
focus/exposure/white balance adjustment and should decrease
any delays in the first call to captureImage()
If false, you may experience a slightly larger delay on the first image capture as the hardware focus/exposure/white balance is adjusted.
Supported: iOS
previewMode | property |
public var previewMode:CameraMode
This defines the mode of the camera to use for preview frames. To keep the frame rate reasonable we suggest using something on the conservative side here.
A photo camera mode should not be used here and may introduce artifacts due to the amount of data involved.
Supported: Android
See also
CameraParameters | () | Constructor |
public function CameraParameters()
Constructor
EXPOSURE_MODE_AUTO | Constant |
public static const EXPOSURE_MODE_AUTO:String = exposure:mode:auto
The device automatically adjusts the exposure once and then changes the exposure mode to locked.
EXPOSURE_MODE_CONTINUOUS | Constant |
public static const EXPOSURE_MODE_CONTINUOUS:String = exposure:mode:continuous
The device automatically adjusts the exposure level as needed.
EXPOSURE_MODE_LOCKED | Constant |
public static const EXPOSURE_MODE_LOCKED:String = exposure:mode:locked
The exposure level is fixed at its current level.
FLASH_MODE_AUTO | Constant |
public static const FLASH_MODE_AUTO:String = auto
Flash mode auto, allows the camera to decide if the flash is required
FLASH_MODE_OFF | Constant |
public static const FLASH_MODE_OFF:String = off
The flash is off
FLASH_MODE_ON | Constant |
public static const FLASH_MODE_ON:String = on
FLASH_MODE_RED_EYE | Constant |
public static const FLASH_MODE_RED_EYE:String = red-eye
FLASH_MODE_TORCH | Constant |
public static const FLASH_MODE_TORCH:String = torch
Turns the flash light on
FOCUS_MODE_AUTO | Constant |
public static const FOCUS_MODE_AUTO:String = focus:mode:auto
The camera does a single scan focus then reverts to locked. This is suitable for a situation where you want to select a particular item on which to focus and then maintain focus on that item even if it is not the center of the scene.
FOCUS_MODE_CONTINUOUS | Constant |
public static const FOCUS_MODE_CONTINUOUS:String = focus:mode:continuous
The camera continuously auto-focuses as needed
FOCUS_MODE_LOCKED | Constant |
public static const FOCUS_MODE_LOCKED:String = focus:mode:locked
The focal length is fixed. This is useful when you want to allow the user to compose a scene then lock the focus.
WHITE_BALANCE_MODE_AUTO | Constant |
public static const WHITE_BALANCE_MODE_AUTO:String = white:balance:mode:auto
The device performs an auto white balance operation now.
WHITE_BALANCE_MODE_CONTINUOUS | Constant |
public static const WHITE_BALANCE_MODE_CONTINUOUS:String = white:balance:mode:continuous
The device continuously monitors white balance and adjusts when necessary.
WHITE_BALANCE_MODE_LOCKED | Constant |
public static const WHITE_BALANCE_MODE_LOCKED:String = white:balance:mode:locked
The white balance setting is locked.