Advanced Settings for Focus, Drive Modes, and Bracket Modes

This document provides a detailed description of various advanced settings of Ecam component.

Introduction

The advanced settings class, CCamera::CCameraAdvancedSettings, provides access to common camera hardware settings related to image acquisition for still images and video.

Focus mode

The high level steps to set the Camera focus mode are shown here:

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);
        }

Focus range

Get the supported focus range using the enumerated type CCamera::CCameraAdvancedSettings::TFocusRange. This defines eight supported focus ranges:

Enum Value

Description

EFocusRangeAuto

Automatic

EFocusRangeMacro

Focus operates in close range

EFocusRangeMacro

Normal operation

EFocusRangeMacro

Extended (tele) operation

EFocusRangePortrait

Focus at larger areas at short to medium distance

EFocusRangeSuperMacro

Optimised macro operation, where depth of field is very shallow and observation area changes quickly

EFocusRangeHyperfocal

All objects at distances from half of the hyperfocal distance out to infinity will be in focus. This gives maximum depth of field.

EFocusRangeInfinite

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.

Autofocus types

Get the supported autofocus types using the enumerated type CCamera::CCameraAdvancedSettings::TAutoFocusType. This defines three supported focus types:

Enum

Description

EAutoFocusTypeOff

Autofocus is switched off

EAutoFocusTypeSingle

Operates on a single shot, consumes less power

EAutoFocusTypeContinuous

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.

Drive modes

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

EDriveModeAuto

Automatic

EDriveModeSingleShot

Camera takes a single image or shot

EDriveModeContinuous

Camera continuously captures images as fast as it can until it is stopped or it exceeds the storage space.

EDriveModeBracket

Camera is in bracketing mode, producing individual frames.

EDriveModeBracketMerge

Camera is in bracketing mode, but producing a single image. Use CCamera::CCameraAdvancedSettings::SetBracketMerge method to work in this drive mode.

EDriveModeTimed

Camera captures a single shot after specified time period. Use CCamera::CCameraAdvancedSettings::SetTimerInterval method to work in this drive mode.

EDriveModeTimeLapse

Camera captures a set of images with an uniform interval between them. Use CCamera::CCameraAdvancedSettings::SetTimeLapse method to work in this drive mode.

EDriveModeBurst

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 modes

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

EBracketModeOff

Bracket mode is switched off. This is the default value.

EBracketMode3Image

Bracket mode on. Three consecutive pictures are taken in order, with the setting at under (-1), on (0), and over (+1).

EBracketMode5Image

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:

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.

Miscellaneous

This section details the miscellaneous APIs used in CCameraAdvancedSettings class.

See also

Overview for the advanced settings of Camera

The Advanced Camera Settings tutorial