This document provides a detailed description of various advanced settings of Ecam component.
The advanced settings class, CCamera::CCameraAdvancedSettings, provides access to common camera hardware settings related to image acquisition for still images and video.
The high level steps to set the Camera focus mode are shown here:
Get the information about the supported focus modes on the camera using the TInt CCamera::CCameraAdvancedSettings::SupportedFocusModes() method.
Set a specific focus mode on the camera using the CCamera::CCameraAdvancedSettings::SetFocusMode() method.
Get the current focus mode on the camera using the CCamera::CCameraAdvancedSettings::FocusMode() method.
The enumerated type CCamera::CCameraAdvancedSettings::FocusMode() defines four supported focus modes:
The following example shows how to change the focus mode:
// Assigns the focus mode to be set CCamera::CCameraAdvancedSettings::TFocusMode focusMode = CCamera::CCameraAdvancedSettings::EFocusModeFixed; // Gets the supported modes TInt suppFocusModes = settings->SupportedFocusModes();// Checks if the focus mode is supported before setting it if (focusMode & suppFocusModes) { // Sets the focus mode if it is supported settings->SetFocusMode(focusMode); }
Get the supported focus range using the enumerated type CCamera::CCameraAdvancedSettings::TFocusRange. This defines eight supported focus ranges:
Enum Value |
Description |
Automatic |
|
Focus operates in close range |
|
Normal operation |
|
Extended (tele) operation |
|
Focus at larger areas at short to medium distance |
|
Optimised macro operation, where depth of field is very shallow and observation area changes quickly |
|
All objects at distances from half of the hyperfocal distance out to infinity will be in focus. This gives maximum depth of field. |
|
Infinite range, when there is a near obstacle or better focus wanted for far away objects. |
The following example shows how to change the focus range:
// Assigns the focus range to EFocusRangeHyperfocal and checks if it is supported CCamera::CCameraAdvancedSettings::TFocusRange focusRange = CCamera::CCameraAdvancedSettings::EFocusRangeHyperfocal; // Gets the supported ranges TInt suppRanges = settings->SupportedFocusRanges(); // Checks if the focus range is supported before setting it. if (focusRange & suppRanges) { // Sets the focus range if it is supported settings->SetFocusRange(focusRange); }
The result of SetFocusRange is notified to the client asynchronously through MCameraObserver2::HandleEvent() and with UID KUidECamEventCameraSettingFocusRange2.
Get the supported autofocus types using the enumerated type CCamera::CCameraAdvancedSettings::TAutoFocusType. This defines three supported focus types:
Enum |
Description |
Autofocus is switched off |
|
Operates on a single shot, consumes less power |
|
Continuous autofocus, more precise but consumes more power. This is also known as AF Servo. |
The following example shows how to change the autofocus type:
CCamera::CCameraAdvancedSettings::TAutoFocusType focusType = CCamera::CCameraAdvancedSettings::EAutoFocusTypeOff; // Gets the supported focus types TInt suppFocusTypes = settings->SupportedAutoFocusTypes(); // Checks if the focus type is supported before setting it. if (focusType & suppFocusTypes) { // Sets the focus type if it is supported settings->SetAutoFocusType(focusType); }
The result of SetAutoFocusType is notified to the client asynchronously through MCameraObserver2::HandleEvent() and with uid KUidECamEventCameraSettingAutoFocusType2.
Get the supported drive modes for the camera using the enumerated type CCamera::CCameraAdvancedSettings::TDriveMode that determines how and in what succession images are captured. This defines eight supported drive modes for the camera with the following Enum Values:
Enum Value |
Description |
Automatic |
|
Camera takes a single image or shot |
|
Camera continuously captures images as fast as it can until it is stopped or it exceeds the storage space. |
|
Camera is in bracketing mode, producing individual frames. |
|
Camera is in bracketing mode, but producing a single image. Use CCamera::CCameraAdvancedSettings::SetBracketMerge method to work in this drive mode. |
|
Camera captures a single shot after specified time period. Use CCamera::CCameraAdvancedSettings::SetTimerInterval method to work in this drive mode. |
|
Camera captures a set of images with an uniform interval between them. Use CCamera::CCameraAdvancedSettings::SetTimeLapse method to work in this drive mode. |
|
Camera captures a set of images as fast as it can in batches or bursts. Use CCamera::CCameraAdvancedSettings::SetBurstImages method to set the number of burst images before capturing the image. Note: There are chances that the actual number of images captured may be less important due to memory or image size limitations. |
The following example shows how to change the drive mode:
CCamera::CCameraAdvancedSettings::TDriveMode driveMode = CCamera::CCameraAdvancedSettings::EDriveModeSingleShot; // Gets the supported drive modes TInt suppDriveModes = settings->SupportedDriveModes(); // Checks if the drive mode is supported before setting it. if (driveMode & suppDriveModes) { // Sets the drive mode settings->(driveMode); }
The result of SetDriveMode is notified to the client asynchronously through MCameraObserver2::HandleEvent() and with uid KUidECamEventCameraSettingDriveMode.
Bracket mode is a type of drive mode, which is called using EDriveModeBracket method.
Bracket mode involves the camera taking a sequence of pictures, while automatically varying a camera setting, such as exposure, over a range of values. The enumerated type CCamera::CCameraAdvancedSettings::TBracketMode defines three supported bracket modes for the camera. The setting that is varied is called the bracket parameter, and is represented by the CCamera::CCameraAdvancedSettings::TBracketParameter enumeration, while the scale of the change to the setting to make for each new picture is called the bracket step, and is represented by the CCamera::CCameraAdvancedSettings::TBracketStep enumeration. The possible bracket modes are:
Enum Value |
Description |
Bracket mode is switched off. This is the default value. |
|
Bracket mode on. Three consecutive pictures are taken in order, with the setting at under (-1), on (0), and over (+1). |
|
Bracket mode on. Five consecutive pictures are taken in order, with the setting at under (-2), under (-1), on (0), over (+1), and over (+2). |
The following example shows how to change the bracket mode:
CCamera::CCameraAdvancedSettings::TBracketMode bracketMode = CCamera::CCameraAdvancedSettings::EBracketMode3Image; // Gets the supported bracket modes TInt suppBracketModes = settings->SupportedBracketModes(); // Checks if the bracket mode is supported before setting it. if (bracketMode & suppBracketModes) { settings->SetBracketMode(bracketMode); }
Zoom Mode
The high level steps to perform various operations in zoom mode are listed below:
Get the continuous zoom types supported by the camera using CCamera::CCameraAdvancedSettings::GetSupportedContinuousZoomTypeL method.
Start continuous zoom using CCamera::CCameraAdvancedSettings::StartContinuousZoomL() method with specified continuous zoom type and the zoom direction.
Notify the client about the extent of continuous zoom achieved using event KUidECamEvent2CameraSettingContinuousZoomPercentageCompletion. When continuous zoom reached its limit, notify the client using event KUidECamEventCameraSettingContinuousZoomReachedLimit.
Stop continuous zoom using CCamera::CCameraAdvancedSettings::StopContinuousZoom() method.
Extending Pixel Aspect Ratio
You can use the pixel aspect ratio to provide settings for PAL, NTSC and NTSC4:3. For this, you need to extend the enumeration of Enum TPixelAspectRatio as follows:
Enum Value |
Description |
TPixelAspectRatio:: EEPixelAspect16:11 |
PAL |
TPixelAspectRatio:: EEPixelAspect40:33 |
NTSC |
TPixelAspectRatio:: EEPixelAspect10:11 |
NTSC4:3 |
Use CCamera::CCameraAdvancedSettings::PixelAspectRatio() method to get the current pixel aspect ratio.
Use CCamera::CCameraAdvancedSettings::SetPixelAspectRatio() method to set the pixel aspect ratio. Notify MCameraObserver2 clients with KUidECamEventPixelAspectRatio event.
This section details the miscellaneous APIs used in CCameraAdvancedSettings class.
ISO rates : ISO indicates the sensitivity of the image sensor and is also a parameter that influences the exposure.
Get the set of camera supported ISO rates using theCCamera::CCameraAdvancedSettings::GetSupportedIsoRatesL() method. The Enum value TISORateType specifies the ISO type supported by the camera.
When camera device does not reveal the ISO supported rates, it has to be assumed that camera will work only on the permanently set value. If this value is not known, returns empty array and corresponding getter or setters for this feature should not be used in such a case.
Set the type of ISO rate and the exposure parameter or specific value using the CCamera::CCameraAdvancedSettings::SetISORateL() method.
Get the type of ISO rate, exposure parameter and the value set using the CCamera::CCameraAdvancedSettings::GetISORateL() method.
Get current ISO rate using CCamera::CCameraAdvancedSettings::IsoRate().
Get current aperture value using CCamera::CCameraAdvancedSettings::Aperture(). For example, the function returns 280 for the actual aperture of F2.8. If the value returned is Negative, indicates the error case (system wide error code) and positive represents the current aperture value.
Get the current shutter speed in microseconds using CCamera::CCameraAdvancedSettings::ShutterSpeed(). If the value returned is Negative, indicates the error case (system wide error code) and positive represents the current shutter speed.
Get all supported metering modes on this camera using CCamera::CCameraAdvancedSettings::SupportedMeteringModes().
Get all supported drive modes as bitfields of TDriveMode type using CCamera::CCameraAdvancedSettings::SupportedDriveModes().
Get the currently set flash mode using CCamera::TFlash CCamera::CCameraAdvancedSettings::FlashMode().