class CCamera::CCameraHistogram : 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).
The data generated can be fed to some exposure based algorithm, or directly displayed in the viewfinder. It also allows the client to get and set the properties of a histogram.
The client selects histogram parameters calling PrepareHistogramL() . It can then start and stop receiving notifications from the ECam implementation by calling StartHistogramL() and StopHistogramL() . The client application using this API should provide MCameraObserver2 interface to be signalled, with event KUidECamEventCameraHistogram, when histogram data is available to be retrieved from the ECam implementation. The client can then retrieve the histogram data from the ECam implementation calling HistograDataL().
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 | |
---|---|
~CCameraHistogram () | |
IMPORT_C void | DestroyHistogramL ( TUint ) |
IMPORT_C void | GetActiveHistogramsL ( RArray < TUint > &) |
IMPORT_C void | GetDSAHistogramPropertiesL ( TUint , TPoint &, TSize &, TRgb &) |
IMPORT_C MHistogramBuffer & | HistogramDataL () |
IMPORT_C MHistogramBuffer & | HistogramDataL ( TUint ) |
IMPORT_C CCamera::CCameraHistogram * | NewL ( CCamera &) |
IMPORT_C TUint | PrepareDSAHistogramL ( CCamera::CCameraHistogram::THistogramType , const TPoint &, const TSize &, const TRgb &) |
IMPORT_C TUint | PrepareHistogramL ( CCamera::CCameraHistogram::THistogramType ) |
IMPORT_C void | StartHistogramL ( TUint ) |
IMPORT_C void | StopHistogramL ( TUint ) |
IMPORT_C TUint32 | SupportedHistograms () |
IMPORT_C void | UpdateDSAHistogramPropertiesL ( TUint , const TPoint &, const TSize &, const TRgb &) |
Private Member Functions | |
---|---|
CCameraHistogram ( CCamera &) | |
void | ConstructL () |
Public Member Enumerations | |
---|---|
enum |
THistogramType
{
EHistNone = 0x0000, ELuminance = 0x0001, EAverageRGB = 0x0002, ERedComponent = 0x0004, EBlueComponent = 0x0008, EGreenComponent = 0x0010 } |
Private Attributes | |
---|---|
MCameraHistogram * | iImpl |
CCamera & | iOwner |
CCameraHistogram | ( | CCamera & | aOwner | ) | [private] |
use CCamera::CCameraV2Histogram::CCameraV2Histogram(CCamera& aOwner)
Constructor for the CCamera::CCameraHistogram class.
CCamera & aOwner | A reference to the camera object for which a camera histogram object is to be created. |
IMPORT_C | ~CCameraHistogram | ( | ) |
use CCamera::CCameraV2Histogram::~CCameraV2Histogram()
Destructor for the CCamera::CCameraHistogram class.
void | ConstructL | ( | ) | [private] |
use void CCamera::CCameraV2Histogram::ConstructL(const MImplementationFactory& aImplFactory)
CCameraHistogram second phase constructor.
This function used to initialise internal state of the object. It uses reference to the camera to retrieve histogram interface pointer.
IMPORT_C void | DestroyHistogramL | ( | TUint | aHistHandle | ) |
only one histogram is available per buffer with the usage of MHistogramV2Buffer and CCameraV2Histogram .
Destroys a histogram on the ECam implementation and releases its handle.
TUint aHistHandle | The handle identifying the histogram on the ECam implementation. |
IMPORT_C void | GetActiveHistogramsL | ( | RArray < TUint > & | aActiveHistograms | ) |
use void CCamera::CCameraV2Histogram::GetHistogramStateL(TBool& aIsHistogramActive)
Gets a list of all histograms that are active on the ECam implementation. A histogram is in an active state if StartHistogramL() has been called on it.
IMPORT_C void | GetDSAHistogramPropertiesL | ( | TUint | aHistHandle, |
TPoint & | aPosition, | |||
TSize & | aSize, | |||
TRgb & | aColor | |||
) |
use void CCamera::CCameraV2Histogram::GetDirectHistogramPropertiesL
Gets the properties of a direct histogram.
If the method leaves, the reference arguments are not guaranteed to be valid.
TUint aHistHandle | The handle on the ECam implementation of the direct histogram whose properties are to be retrieved. |
TPoint & aPosition | A reference to a TPoint object that will receive the position (in pixels) of the histogram on the screen. |
TSize & aSize | A reference to a TSize object that will receive the size of the histogram in pixels. |
TRgb & aColor | A reference to a TRgb object that will receive the colour and alpha blending of the histogram. |
IMPORT_C MHistogramBuffer & | HistogramDataL | ( | ) |
use MCaptureImageObserver , MCaptureVideoObserver , MDirectViewFinderObserver , and MClientViewFinderObserver which have callback functions which notify the client about availability of histogram data. These are sent when CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL() . If CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
Returns to the client the histogram data for all the histograms generated by the ECam implementation.
The client application using this API should provide MCameraObserver2 interface to be signalled when histogram data is available to be retrieved from the ECAM implementation.
IMPORT_C MHistogramBuffer & | HistogramDataL | ( | TUint | aHistHandle | ) |
use MCaptureImageObserver , MCaptureVideoObserver , MDirectViewFinderObserver , and MClientViewFinderObserver which have callback functions which notify the client about availability of histogram data. These are sent when CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL() . If CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
Returns the data for a single histogram from the ECam implementation to the client.
The client application using this API should provide MCameraObserver2 interface to be signalled when histogram data is available to be retrieved from the ECAM implementation.
TUint aHistHandle | The handle on the ECam implementation of the histogram whose data is to be retrieved. |
IMPORT_C CCamera::CCameraHistogram * | NewL | ( | CCamera & | aCamera | ) | [static] |
use static CCamera::CCameraV2Histogram * CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory)
Factory function that creates a new camera histogram object on the heap.
Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
CCamera & aCamera | A reference to the camera object for which a camera histogram object is to be created. |
IMPORT_C TUint | PrepareDSAHistogramL | ( | CCamera::CCameraHistogram::THistogramType | aType, |
const TPoint & | aPosition, | |||
const TSize & | aSize, | |||
const TRgb & | aColor | |||
) |
use void CCamera::CCameraV2Histogram::PrepareDirectHistogramL
Request to prepare a direct histogram.
A Direct histogram is directly embedded into the viewfinder.
CCamera::CCameraHistogram::THistogramType aType | The type of histogram to be prepared. This must be one of the supported histogram types returned by SupportedHistograms(). |
const TPoint & aPosition | The position on the screen (in pixels) where the histogram is to be displayed. |
const TSize & aSize | The size of histogram in pixels. |
const TRgb & aColor | The colour and alpha blending with which the histogram will be displayed. |
IMPORT_C TUint | PrepareHistogramL | ( | CCamera::CCameraHistogram::THistogramType | aType | ) |
use void CCamera::CCameraV2Histogram::PrepareClientHistogramL
Request to prepare a non direct 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.
CCamera::CCameraHistogram::THistogramType aType | The type of histogram to be prepared. This must be one of the supported histogram types returned by SupportedHistograms(). |
IMPORT_C void | StartHistogramL | ( | TUint | aHistHandle | ) |
use void CCamera::CCameraV2Histogram::StartHistogram()
Request to start getting histogram notifications.
TUint aHistHandle | The handle identifying the histogram on the ECam implementation. |
IMPORT_C void | StopHistogramL | ( | TUint | aHistHandle | ) |
use void CCamera::CCameraV2Histogram::StopHistogram()
Request to stop getting histogram notifications.
TUint aHistHandle | The handle identifying the histogram on the ECam implementation. |
IMPORT_C TUint32 | SupportedHistograms | ( | ) |
use void CCamera::CCameraV2Histogram::GetSupportedHistogramsL(TUint& aSupportedHistogramType)
Gets a list of the types of histograms the ECam implementation supports.
IMPORT_C void | UpdateDSAHistogramPropertiesL | ( | TUint | aHistHandle, |
const TPoint & | aPosition, | |||
const TSize & | aSize, | |||
const TRgb & | aColor | |||
) |
use void CCamera::CCameraV2Histogram::UpdateDirectHistogramPropertiesL
Updates the properties of a direct histogram.
TUint aHistHandle | The handle identifying the histogram on the ECam implementation. |
const TPoint & aPosition | The new position on the screen (in pixels) where the histogram is to be displayed. |
const TSize & aSize | The new size of histogram in pixels. |
const TRgb & aColor | The new colour and alpha blending with which the histogram will be displayed. |
Supported histogram types.
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. |
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.