MCameraImageProcessing Class Reference

class MCameraImageProcessing

Mixin class for implementation by providers of the Image Processing Camera Extension API.

This class is used to perform image processing operations on the camera. These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. . When an operation selection is complete, all clients are notified with the respective event UID.

As often cameras may support only a subset of discrete values of the allowed range, the API allows the client to retrieve those and use them explicitly.

Note:

it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively activates the transformations. Whilst for effects and adjustments there is always a value, transforms may have a dependency on other parameters and crop - requires setting of source rectangle. scale - will use setting of source rectangle, and the magnification factor is determined by the source rectangle and the output size. This is always magnification. if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor and set to integer. mirror - values of TMirror type. rotation - the angle in degrees. noise reduction - TNoiseReduction. glare removal - TGlareReduction.

Example Let's assume that an application would need to check whether gamma correction is supported on a particular platform. After obtaining a valid pointer to the interface, it would call GetSupportedTransformationsL() to obtain the list of the supported tranformations and check whether KUidECamEventImageProcessingAdjustGamma is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200); to set the new value. A notification will be generated to the client to indicate success.

Member Functions Documentation

GetActiveTransformSequenceL(RArray< TUid > &)

void GetActiveTransformSequenceL ( RArray < TUid > & aTransformSequence ) const [pure virtual]

Get the sequence of all active transforms, ordered in order of execution.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aTransformSequence an empty array to be populated with sequence of transform UIDs, where transform entries with smaller index are executed earlier.

GetActiveTransformationsL(RArray< TUid > &)

void GetActiveTransformationsL ( RArray < TUid > & aTransformations ) const [pure virtual]

Get currently active transformations on the camera.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aTransformations An empty RArray of TUids to store the UIDs of the supported transformations.

GetSourceRect(TRect &)

void GetSourceRect ( TRect & aRect ) const [pure virtual]

Get the source rectangle for KUidECamEventImageProcessingTransformScale or KUidECamEventImageProcessingTransformCrop. The coordinates should fall within the current image rectangle. The result is always a logical AND operation between the two rectangles.

Parameters

TRect & aRect a reference to a TRect object to hold the current source rectangle coordinates. If it has not been set, the coordinates match these of the whole image.

GetSupportedTransformationsL(RArray< TUid > &)

void GetSupportedTransformationsL ( RArray < TUid > & aTransformations ) const [pure virtual]

Get all transformations supported on the camera.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aTransformations An empty RArray of TUids to store the UIDs of the supported transformations.

GetTransformationSupportedValuesL(TUid, RArray< TInt > &, TValueInfo &)

void GetTransformationSupportedValuesL ( TUid aTransformation,
RArray < TInt > & aValues,
TValueInfo & aInfo
) const [pure virtual]

Get all values supported by an active transformation.

Note:

depending on the value of aInfo parameter, same array of values may describe different set of values. When camera device doesn't support this, empty array should be returned and TValueInfo should be ENotActive, and the corresponding getter/setters for this feature should not be used.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

TUid aTransformation The UID of active transform for which values are requested.
RArray < TInt > & aValues An array of integers to represent the values for the requested transformation.
TValueInfo & aInfo Additional information describing the returned array of values.

GetTransformationValue(TUid, TInt &)

TInt GetTransformationValue ( TUid aTransformation,
TInt & aTransformationValue
) const [pure virtual]

Get the current value of a transformation

Parameters

TUid aTransformation The UID of the transformation
TInt & aTransformationValue Reference to the integer value of the tranformation.

Release()

void Release ( ) [pure virtual]

Releases the interface.

SetActiveTransformSequenceL(RArray< TUid > &)

void SetActiveTransformSequenceL ( RArray < TUid > & aTransformSequence ) [pure virtual]

Set the order of all active transform in terms of execution. The transforms with smaller index are executed earlier.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aTransformSequence The list of ordered transforms, where transforms with smaller index are executed earlier.

SetSourceRect(const TRect &)

void SetSourceRect ( const TRect & aRect ) [pure virtual]

Set the source rectangle for KUidECamEventImageProcessingTransformScale or KUidECamEventImageProcessingTransformCrop. The coordinates should fall within the current image rectangle. The result is always a logical AND operation between the two rectangles.

Parameters

const TRect & aRect a reference to TRect object which describes the coordinates of the area of interest.

SetTransformationValue(TUid, TInt)

void SetTransformationValue ( TUid aTransformation,
TInt aValue
) [pure virtual]

Set new value for a transformation. A notification event with the transformation UID is sent to all clients. UIDs are in the form KUidECamEventImageProcessingXXXX.

Parameters

TUid aTransformation The UID of the transformation
TInt aValue The integer value of the tranformation.

TransformationValue(TUid)

TInt TransformationValue ( TUid aTransformation ) const [pure virtual]

Use TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue);

Get the current value of a transformation

Parameters

TUid aTransformation The UID of the transformation