Capturing Image

This document introduces to the image capture feature of the Ecam component.

Purpose

This document takes you through a series of documents that provides a detailed explanation on various tasks that can be performed using still image.

Setup and Configuration Requirement

Make sure that you use continuous drive mode before capturing the images.

Get the options supported for a specific reference orientation of the camera using CCamera::CCameraImageProcessing::GetSupportedRelativeOrientationOptionsL method.

Get the options that is currently used for the orientation reference using CCameraImageProcessing::GetCurrentRelativeOrientationOptionsL method.

Set the specific option to be used with the orientation reference using CCameraImageProcessing::SetRelativeOrientationOptionsL method. Notify the client about relative custom orientation setting operation using event KUidECamEventImageProcessingTransformRelativeOrientation.

Basic camera image settings

CCamera provides functions that allow you to alter the brightness, contrast, and zoom level of the camera image. Before using such functions though, you should test that the camera supports what you want. To do this, get a TCameraInfo object using the CameraInfo() method. The object's iOptionsSupported member is a bitfield of flags that describe which options are supported by the camera.

Brightness

To change the camera image brightness:

  1. Check if brightness control is supported, by testing if the TCameraInfo::EBrightnessSupported flag is set in the options.

  2. Set the brightness using CCamera::SetBrightnessL().

    The brightness should be in the range -100 to +100, or to set the brightness automatically, use the flag CCamera::EBrightnessAuto.

Contrast

To change the camera image contrast:

  1. Check if contrast control is supported, by testing if the TCameraInfo::EContrastSupported flag is set in the options.

  2. Set the contrast using CCamera::SetContrastL().

    The contrast should be in the range -100 to +100, or to set the contrast automatically, use the flag CCamera::EContrastAuto.

Zoom

To alter the camera zoom:

  1. Test if zoom is supported, and for what range of values, by reading the minimum and maximum zoom values from the data members in TCameraInfo. A value of zero means zoom is not supported. A step of one in the zoom value corresponds to the smallest zoom change available. The camera zoom increases linearly with the zoom value until the maximum zoom value.

    A separate set of values is available for zoom and for digital zoom. TCameraInfo also has members that say what is the actual zoom factor when at minimum (non-digital only) and maximum zoom.

  2. Set the zoom using CCamera::SetDigitalZoomFactorL() or CCamera::SetZoomFactorL().

Image format

Before a client application captures still, or video, it can first specify the required image format. There may be complicated dependencies between frame sizes and formats, so the required format must be specified as follows:

  1. Select the format from those available from either the TCameraInfo::iImageFormatsSupported or the TCameraInfo::iVideoFrameFormatsSupported bitfield, for still or video images respectively.

  2. Select the required size using either CCamera::EnumerateCaptureSizes() or CCamera::EnumerateVideoFrameSizes() for still or video images respectively. Note that not all possible sizes are guaranteed to be supported for any given format. Unsupported sizes will be returned as (0,0).

  3. For video capture, select the frame rate using CCamera::EnumerateVideoFrameRates(). Again, not all rates are guaranteed to be supported, as dependencies may exist in the camera between the format, size, exposure mode and rate.

Image Capture

The Image Capture API allows you to do the following tasks:

  • Pre-image capture control

  • Capturing image

  • Post-image capture control

  • Control of burst image capture