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 > &)

voidGetActiveTransformSequenceL(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 > & aTransformSequencean empty array to be populated with sequence of transform UIDs, where transform entries with smaller index are executed earlier.

GetActiveTransformationsL(RArray< TUid > &)

voidGetActiveTransformationsL(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 > & aTransformationsAn empty RArray of TUids to store the UIDs of the supported transformations.

GetSourceRect(TRect &)

voidGetSourceRect(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 & aRecta 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 > &)

voidGetSupportedTransformationsL(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 > & aTransformationsAn empty RArray of TUids to store the UIDs of the supported transformations.

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

voidGetTransformationSupportedValuesL(TUidaTransformation,
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 aTransformationThe UID of active transform for which values are requested.
RArray< TInt > & aValuesAn array of integers to represent the values for the requested transformation.
TValueInfo & aInfoAdditional information describing the returned array of values.

GetTransformationValue(TUid, TInt &)

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

Get the current value of a transformation

Parameters

TUid aTransformationThe UID of the transformation
TInt & aTransformationValueReference to the integer value of the tranformation.

Release()

voidRelease()[pure virtual]

Releases the interface.

SetActiveTransformSequenceL(RArray< TUid > &)

voidSetActiveTransformSequenceL(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 > & aTransformSequenceThe list of ordered transforms, where transforms with smaller index are executed earlier.

SetSourceRect(const TRect &)

voidSetSourceRect(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 & aRecta reference to TRect object which describes the coordinates of the area of interest.

SetTransformationValue(TUid, TInt)

voidSetTransformationValue(TUidaTransformation,
TIntaValue
)[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 aTransformationThe UID of the transformation
TInt aValueThe integer value of the tranformation.

TransformationValue(TUid)

TInt TransformationValue(TUidaTransformation)const [pure virtual]

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

Get the current value of a transformation

Parameters

TUid aTransformationThe UID of the transformation