Working with the Histogram

This document introduces how to work with a histogram.

Purpose

This document describes the various APIs for working with a Histogram.

Introduction

A histogram provides details about the exposure and light on a scene. You can use the histogram to adjust the screen settings accordingly.

The code in this tutorial can be found in ecamextendedfunctest.cpp.

Working with a Histogram

The high level steps to work with histogram are shown here:

Receiving Histograms

The histogram data is received as follows:

Example

The following example illustrates the sequence for working with a histogram for client viewfinder.

  1. Start a histogram.

    histogram_CVF->StartHistogram();
  2. Confirm whether a specific histogram is active.

    TBool histogramActive = EFalse;
    histogram_CVF->GetHistogramStateL(histogramActive);
  3. Get the current properties of a direct histogram.

    CCamera::CCameraV2Histogram::TDirectHistogramParameters histogramParameters;
    histogram_CVF->GetDirectHistogramPropertiesL(histogramParameters);
  4. Update the properties of histogram with the new values.

    CCamera::CCameraV2Histogram::TDirectHistogramParameters histogramParameters;
    histogram_CVF->UpdateDirectHistogramPropertiesL(histogramParameters);