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.
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.
Public Member Functions | |
---|---|
~CCameraV2Histogram () | |
IMPORT_C void | GetDirectHistogramPropertiesL ( TDirectHistogramParameters &) |
IMPORT_C void | GetDirectHistogramSupportInfoL ( TBool &) |
IMPORT_C void | GetHistogramStateL ( TBool &) |
IMPORT_C void | GetSupportedHistogramsL ( TUint &) |
IMPORT_C void | PrepareClientHistogramL ( THistogramType ) |
IMPORT_C void | PrepareDirectHistogramL (const TDirectHistogramParameters &) |
IMPORT_C void | StartHistogram () |
IMPORT_C void | StopHistogram () |
IMPORT_C void | UpdateDirectHistogramPropertiesL (const TDirectHistogramParameters &) |
Private Member Functions | |
---|---|
CCameraV2Histogram ( CCamera &) | |
void | ConstructL (const MImplementationFactory &) |
IMPORT_C CCamera::CCameraV2Histogram * | CreateL ( CCamera &, MImplementationFactory &) |
Public Member Enumerations | |
---|---|
enum |
THistogramType
{
EHistNone = 0x0000, ELuminance = 0x0001, EAverageRGB = 0x0002, ERedComponent = 0x0004, EBlueComponent = 0x0008, EGreenComponent = 0x0010, EOverExposure = 0x0020, EUnderExposure = 0x0040 } |
Private Attributes | |
---|---|
MCameraV2Histogram * | iImpl |
CCamera & | iOwner |
CCameraV2Histogram | ( | CCamera & | aOwner | ) | [private] |
Constructor for the CCamera::CCameraV2Histogram class.
CCamera & aOwner | A reference to the camera object for which a camera histogram object is to be created. |
IMPORT_C | ~CCameraV2Histogram | ( | ) |
Destructor for the CCamera::CCameraV2Histogram class.
void | ConstructL | ( | 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.
This method is supposed to be used by this class only.
const MImplementationFactory & aImplFactory | A constant reference to the MImplementationFactory derived object. |
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.
This method is supposed to be used by internal ECAM components only.
CCamera & aCamera | A reference to the camera object for which a camera histogram object is to be created. |
MImplementationFactory & aImplFactory | A reference to the MImplementationFactory derived object. |
IMPORT_C void | GetDirectHistogramPropertiesL | ( | TDirectHistogramParameters & | aDirectHistogramParameters | ) | const |
Retrieves the currently used parameters for the direct histogram.
TDirectHistogramParameters & aDirectHistogramParameters | Retrieves the parameters currently being used for the direct histogram. |
IMPORT_C void | GetDirectHistogramSupportInfoL | ( | TBool & | aIsDirectHistogramSupported | ) | const |
Informs whether or not the direct histogram is supported.
TBool & aIsDirectHistogramSupported | ETrue implies that direct histogram is supported. EFalse implies that direct histogram is not supported. |
IMPORT_C void | GetHistogramStateL | ( | 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.
TBool & aIsHistogramActive | ETrue indicates that the histogram is active. EFalse indicates that the histogram is inactive. |
IMPORT_C void | GetSupportedHistogramsL | ( | TUint & | aSupportedHistogramType | ) | const |
Retrieves a list of the supported types of histograms.
TUint & aSupportedHistogramType | A reference to bit field representing the supported types of histograms as given by CCamera:: CCameraV2Histogram::THistogramType |
IMPORT_C void | PrepareClientHistogramL | ( | THistogramType | aType | ) |
Request to prepare a client based histogram.
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.
Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms per object is an invalid case.
THistogramType aType | The type of histogram to be prepared. This must be one of the supported histogram types given by GetSupportedHistogramsL. |
IMPORT_C void | PrepareDirectHistogramL | ( | const TDirectHistogramParameters & | aDirectHistogramParameters | ) |
Prepares the direct histogram.
Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms per object is an invalid case.
const TDirectHistogramParameters & aDirectHistogramParameters | The parameters required to prepare the direct histogram. |
IMPORT_C void | StartHistogram | ( | ) |
Request to start getting histogram notifications.
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.
IMPORT_C void | UpdateDirectHistogramPropertiesL | ( | const TDirectHistogramParameters & | aDirectHistogramParameters | ) |
Update the parameters for the direct histogram.
const TDirectHistogramParameters & aDirectHistogramParameters | The desired parameters which have to be used to update the direct histogram. |
Supported histogram types. The enumeration list may be extended in future.
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. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.