CCamera::CCameraV2Histogram Class Reference

class CCamera::CCameraV2Histogram : public CBase

This class allows the client to get histogram data in a specified format for an image (for example, luminance based histogram, average colour value histogram, etc).

Histogram may be created for still images, video, viewfinders and snapshot. Further different types of histogram may be created for any of the imaging modes.

The data generated can be fed to some exposure based algorithm, or directly displayed on the screen. It also allows the client to get and set the properties of a histogram.

The client selects histogram parameters calling PrepareClientHistogramL or PrepareDirectHistogramL. It can then start and stop receiving notifications from the ECam implementation by calling StartHistogram() and StopHistogram(). The client application using this API shall provide the interfaces: MCaptureImageObserver, MCaptureVideoObserver, MDirectViewFinderObserver and MClientViewFinderObserver in order to receive notifications about direct histogram display or client histogram data availablility.

Implementation shall use MHistogramV2Buffer in order to provide client histogram data.

Note:

This class provides a standardised client interface for the camera histogram. Classes cannot be derived from it.

If the class methods leave, the output type parameter value is not guaranteed to be valid.

Inherits from

  • CCamera::CCameraV2Histogram

Constructor & Destructor Documentation

CCameraV2Histogram(CCamera &)

CCameraV2Histogram(CCamera &aOwner)[private]

Constructor for the CCamera::CCameraV2Histogram class.

Parameters

CCamera & aOwnerA reference to the camera object for which a camera histogram object is to be created.

~CCameraV2Histogram()

IMPORT_C~CCameraV2Histogram()

Destructor for the CCamera::CCameraV2Histogram class.

Member Functions Documentation

ConstructL(const MImplementationFactory &)

voidConstructL(const MImplementationFactory &aImplFactory)[private]

CCameraV2Histogram second phase constructor

Function used to initialise internal state of the object specifically for a camera mode, for example, still image, video, snapshot and specific viewfinder.

This may be used in other possible cases as well.

leave
KErrNoMemory Out of memory; or any other error code as well.
Note:

This method is supposed to be used by this class only.

Parameters

const MImplementationFactory & aImplFactoryA constant reference to the MImplementationFactory derived object.

CreateL(CCamera &, MImplementationFactory &)

IMPORT_C CCamera::CCameraV2Histogram *CreateL(CCamera &aCamera,
MImplementationFactory &aImplFactory
)[private, static]

Factory function that creates a new camera histogram object specifically for a camera mode, for example, still image, video, snapshot and specific viewfinder.

leave
KErrNoMemory if out of memory; also any system wide error.
leave
KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.
Note:

This method is supposed to be used by internal ECAM components only.

Parameters

CCamera & aCameraA reference to the camera object for which a camera histogram object is to be created.
MImplementationFactory & aImplFactoryA reference to the MImplementationFactory derived object.

GetDirectHistogramPropertiesL(TDirectHistogramParameters &)

IMPORT_C voidGetDirectHistogramPropertiesL(TDirectHistogramParameters &aDirectHistogramParameters)const

Retrieves the currently used parameters for the direct histogram.

leave
May leave with any error code.

Parameters

TDirectHistogramParameters & aDirectHistogramParametersRetrieves the parameters currently being used for the direct histogram.

GetDirectHistogramSupportInfoL(TBool &)

IMPORT_C voidGetDirectHistogramSupportInfoL(TBool &aIsDirectHistogramSupported)const

Informs whether or not the direct histogram is supported.

leave
May leave with any error code.

Parameters

TBool & aIsDirectHistogramSupportedETrue implies that direct histogram is supported. EFalse implies that direct histogram is not supported.

GetHistogramStateL(TBool &)

IMPORT_C voidGetHistogramStateL(TBool &aIsHistogramActive)const

Informs whether the histogram is currently active or not. A histogram is in an active state if StartHistogram() has been called on it and has not been yet stopped.

leave
May leave with any error code.

Parameters

TBool & aIsHistogramActiveETrue indicates that the histogram is active. EFalse indicates that the histogram is inactive.

GetSupportedHistogramsL(TUint &)

IMPORT_C voidGetSupportedHistogramsL(TUint &aSupportedHistogramType)const

Retrieves a list of the supported types of histograms.

leave
May leave with any error code.
CCamera::CCameraV2Histogram::THistogramType

Parameters

TUint & aSupportedHistogramTypeA reference to bit field representing the supported types of histograms as given by CCamera:: CCameraV2Histogram::THistogramType

PrepareClientHistogramL(THistogramType)

IMPORT_C voidPrepareClientHistogramL(THistogramTypeaType)

Request to prepare a client based histogram.

Note:

A direct histogram is directly embedded into the viewfinder. If a non direct histogram is requested the histogram data will be passed to the camera client.

leave
May leave with any error code.
Note:

Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms per object is an invalid case.

PrepareDSAHistogramL

Parameters

THistogramType aTypeThe type of histogram to be prepared. This must be one of the supported histogram types given by GetSupportedHistogramsL.

PrepareDirectHistogramL(const TDirectHistogramParameters &)

IMPORT_C voidPrepareDirectHistogramL(const TDirectHistogramParameters &aDirectHistogramParameters)

Prepares the direct histogram.

leave
May leave with any error code.
Note:

Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms per object is an invalid case.

PrepareClientHistogramL

Parameters

const TDirectHistogramParameters & aDirectHistogramParametersThe parameters required to prepare the direct histogram.

StartHistogram()

IMPORT_C voidStartHistogram()

Request to start getting histogram notifications.

Note:

Histogram should have been prepared before calling this method.

Histogram notifications are sent to the client by using relevant callbacks for image capture, video capture and viewfinders.

MCaptureImageObserver MCaptureVideoObserver MDirectViewFinderObserver MClientViewFinderObserver

StopHistogram()

IMPORT_C voidStopHistogram()

Request to stop generating histogram.

UpdateDirectHistogramPropertiesL(const TDirectHistogramParameters &)

IMPORT_C voidUpdateDirectHistogramPropertiesL(const TDirectHistogramParameters &aDirectHistogramParameters)

Update the parameters for the direct histogram.

leave
May leave with any error code.

Parameters

const TDirectHistogramParameters & aDirectHistogramParametersThe desired parameters which have to be used to update the direct histogram.

Member Enumerations Documentation

Enum THistogramType

Supported histogram types. The enumeration list may be extended in future.

Enumerators

EHistNone = 0x0000

No histogram has been specified.

ELuminance = 0x0001

Luminance based histogram.

EAverageRGB = 0x0002

The histogram is based on the average value of all three RGB colour components.

ERedComponent = 0x0004

The histogram is based on the value of the red colour component.

EBlueComponent = 0x0008

The histogram is based on the value of the blue colour component.

EGreenComponent = 0x0010

The histogram is based on the value of the green colour component.

EOverExposure = 0x0020

Qualitative Histogram to mark over exposed parts of image.

EUnderExposure = 0x0040

Qualitative Histogram to mark under exposed parts of image.

Member Data Documentation

MCameraV2Histogram * iImpl

MCameraV2Histogram *iImpl[private]

CCamera & iOwner

CCamera &iOwner[private]