CCamera::CCameraImageProcessing Class Reference

class CCamera::CCameraImageProcessing : public CBase

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:

This class is not intended for sub-classing and used to standardise existing varieties of implementations.

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
		// Lets 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 
		// transformations 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.

		RArray<TUid> suppTransforms; // array of supported transformations
		CleanupClosePushL(suppTransforms);

		imageProcess->GetSupportedTransformationsL(suppTransfUids);
		 ...
		// if the gamma is supported 
		TInt gammaCorrection = 200; // gamma correction of 2.0
		imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection);
		...
		// pop stack to close the RArray
Note:

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

Inherits from

  • CCamera::CCameraImageProcessing
Public Member Functions
~CCameraImageProcessing()
IMPORT_C voidCancelColorAccentL()
IMPORT_C voidCancelColorSwappingL()
IMPORT_C CCameraImageProcessing *CreateL(CCamera &, MImplementationFactory &)
IMPORT_C voidGetActiveTransformSequenceL(RArray< TUid > &)
IMPORT_C voidGetActiveTransformationsL(RArray< TUid > &)
IMPORT_C voidGetColorAccentCapabilitiesL(TInt, TColorOperationCapabilities &)
IMPORT_C voidGetColorAccentEntryL(TInt, TColorOperationEntry &)
IMPORT_C voidGetColorSwapCapabilitiesL(TInt, TColorOperationCapabilities &)
IMPORT_C voidGetColorSwapEntryL(TInt, TColorOperationEntry &)
IMPORT_C voidGetConcurrentColorAccentSupportedL(TInt &)
IMPORT_C voidGetConcurrentColorSwappingsSupportedL(TInt &)
IMPORT_C voidGetCurrentRelativeOrientationOptionsL(TOrientationReference &, TRelativeRotation &, TRelativeMirror &, TRelativeFlipping &)
IMPORT_C voidGetSourceRect(TRect &)
IMPORT_C voidGetSupportedRelativeOrientationOptionsL(TOrientationReference, TUint &, TUint &, TUint &)
IMPORT_C voidGetSupportedTransformationsL(RArray< TUid > &)
IMPORT_C voidGetTransformationSupportedValuesL(TUid, RArray< TInt > &, TValueInfo &)
IMPORT_C TIntGetTransformationValue(TUid, TInt &)
IMPORT_C CCameraImageProcessing *NewL(CCamera &)
IMPORT_C voidRemoveColorAccentEntryL(TInt)
IMPORT_C voidRemoveColorSwapEntryL(TInt)
IMPORT_C voidSetActiveTransformSequenceL(RArray< TUid > &)
IMPORT_C voidSetColorAccentEntryL(TInt, const TColorOperationEntry &)
IMPORT_C voidSetColorSwapEntryL(TInt, const TColorOperationEntry &)
IMPORT_C voidSetRelativeOrientationOptionsL(TOrientationReference, TRelativeRotation, TRelativeMirror, TRelativeFlipping)
IMPORT_C voidSetSourceRect(const TRect &)
IMPORT_C voidSetTransformationValue(TUid, TInt)
IMPORT_C voidStartColorAccentL()
IMPORT_C voidStartColorSwappingL()
IMPORT_C TIntTransformationValue(TUid)
Private Member Functions
CCameraImageProcessing(CCamera &)
voidConstructL()
voidConstructL(const MImplementationFactory &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTColorOperationRepresentation { ERepresentationNone = 0x00, ERepresentationSingle = 0x01, ERepresentationMultiple = 0x02 }
enumTColorOperationRgbGroupingMode { ERgbGroupingNone = 0x00, ERgbGroupingFixed = 0x01, ERgbGroupingAutomatic = 0x02, ERgbGroupingSignificantBits = 0x04, ERgbGroupingUniform = 0x08 }
enumTContrastEnhancement { EContrastEnhancementNone = 0x00, EContrastEnhancementSwitchOff = 0x01, EContrastEnhancementManualSwitchOn = 0x02, EContrastEnhancementSwitchAuto = 0x04 }
enumTEffect {
EEffectNone = 0x00000000, EEffectNegative = 0x00000001, EEffectMonochrome = 0x00000002, EEffectSolarize = 0x00000004, EEffectSepia = 0x00000008, EEffectEmboss = 0x00000010, EEffectRedEyeReduction = 0x00000020, EEffectVivid = 0x00000040, EEffectNeutral = 0x00000080, EEffectLowSharpening = 0x00000100, EEffectNatural = 0x00000200, EEffectCine = 0x00000400, EEffectOldFilm = 0x00000800, EEffectColorSwap = 0x00001000, EEffectColorAccent = 0x00002000
}
enumTGamma { EGammaAuto = KMinTInt }
enumTGlareReduction { EGlareReductionNone = 0x0000, EGlareReductionBasic = 0x0001 }
enumTHue { EHueAuto = KMinTInt }
enumTMirror { EMirrorNone = 0x00000000, EMirrorHorizontal = 0x00000001, EMirrorVertical = 0x00000002, EMirrorBoth = 0x00000003 }
enumTNoiseReduction { ENoiseReductionNone = 0x0000, ENoiseReductionBasic = 0x0001 }
enumTOrientationReference { EOrientationReferenceCameraSensorOrientation, EOrientationReferenceTiltOrientation }
enumTRedEyeReduction { ERedEyeReductionNone = 0x00, ERedEyeReductionSwitchOff = 0x01, ERedEyeReductionManualSwitchOn = 0x02, ERedEyeReductionSwitchAuto = 0x04 }
enumTRelativeFlipping { ERelativeFlippingNone = 0x00, ERelativeFlippingHorizontal = 0x10, ERelativeFlippingVertical = 0x20 }
enumTRelativeMirror { ERelativeMirrorNone = 0x00, ERelativeMirrorHorizontalAxis = 0x10, ERelativeMirrorVerticalAxis = 0x20 }
enumTRelativeRotation { ERelativeRotation0Degrees = 0x00, ERelativeRotation90DegreesClockwise = 0x01, ERelativeRotation180DegreesClockwise = 0x02, ERelativeRotation270DegreesClockwise = 0x04 }
enumTSaturation { ESaturationAuto = KMinTInt }
enumTSharpness { ESharpnessAuto = KMinTInt }
Private Attributes
MCameraImageProcessing *iImpl
MCameraImageProcessing2 *iImpl2
MCameraImageProcessing3 *iImpl3
CCamera &iOwner

Constructor & Destructor Documentation

CCameraImageProcessing(CCamera &)

CCameraImageProcessing(CCamera &aOwner)[private]

Parameters

CCamera & aOwner

~CCameraImageProcessing()

IMPORT_C~CCameraImageProcessing()

Member Functions Documentation

CancelColorAccentL()

IMPORT_C voidCancelColorAccentL()

CancelColorSwappingL()

IMPORT_C voidCancelColorSwappingL()

ConstructL()

voidConstructL()[private]

ConstructL(const MImplementationFactory &)

voidConstructL(const MImplementationFactory &aImplFactory)[private]

Parameters

const MImplementationFactory & aImplFactory

CreateL(CCamera &, MImplementationFactory &)

IMPORT_C CCameraImageProcessing *CreateL(CCamera &aCamera,
MImplementationFactory &aImplFactory
)[static]

Parameters

CCamera & aCamera
MImplementationFactory & aImplFactory

GetActiveTransformSequenceL(RArray< TUid > &)

IMPORT_C voidGetActiveTransformSequenceL(RArray< TUid > &aTransformSequence)const

Parameters

RArray< TUid > & aTransformSequence

GetActiveTransformationsL(RArray< TUid > &)

IMPORT_C voidGetActiveTransformationsL(RArray< TUid > &aTransformations)const

Parameters

RArray< TUid > & aTransformations

GetColorAccentCapabilitiesL(TInt, TColorOperationCapabilities &)

IMPORT_C voidGetColorAccentCapabilitiesL(TIntaIndex,
TColorOperationCapabilities &aColorAccentCapabilities
)const

Parameters

TInt aIndex
TColorOperationCapabilities & aColorAccentCapabilities

GetColorAccentEntryL(TInt, TColorOperationEntry &)

IMPORT_C voidGetColorAccentEntryL(TIntaIndex,
TColorOperationEntry &aColorAccentParameters
)const

Parameters

TInt aIndex
TColorOperationEntry & aColorAccentParameters

GetColorSwapCapabilitiesL(TInt, TColorOperationCapabilities &)

IMPORT_C voidGetColorSwapCapabilitiesL(TIntaIndex,
TColorOperationCapabilities &aColorSwapCapabilities
)const

Parameters

TInt aIndex
TColorOperationCapabilities & aColorSwapCapabilities

GetColorSwapEntryL(TInt, TColorOperationEntry &)

IMPORT_C voidGetColorSwapEntryL(TIntaIndex,
TColorOperationEntry &aColorSwapParameters
)const

Parameters

TInt aIndex
TColorOperationEntry & aColorSwapParameters

GetConcurrentColorAccentSupportedL(TInt &)

IMPORT_C voidGetConcurrentColorAccentSupportedL(TInt &aConcurrentColorAccentSupported)const

Parameters

TInt & aConcurrentColorAccentSupported

GetConcurrentColorSwappingsSupportedL(TInt &)

IMPORT_C voidGetConcurrentColorSwappingsSupportedL(TInt &aConcurrentColorSwappingSupported)const

Parameters

TInt & aConcurrentColorSwappingSupported

GetCurrentRelativeOrientationOptionsL(TOrientationReference &, TRelativeRotation &, TRelativeMirror &, TRelativeFlipping &)

IMPORT_C voidGetCurrentRelativeOrientationOptionsL(TOrientationReference &aOrientationReference,
TRelativeRotation &aRelativeRotation,
TRelativeMirror &aRelativeMirror,
TRelativeFlipping &aRelativeFlipping
)const

Parameters

TOrientationReference & aOrientationReference
TRelativeRotation & aRelativeRotation
TRelativeMirror & aRelativeMirror
TRelativeFlipping & aRelativeFlipping

GetSourceRect(TRect &)

IMPORT_C voidGetSourceRect(TRect &aRect)const

Parameters

TRect & aRect

GetSupportedRelativeOrientationOptionsL(TOrientationReference, TUint &, TUint &, TUint &)

IMPORT_C voidGetSupportedRelativeOrientationOptionsL(TOrientationReferenceaOrientationReference,
TUint &aSupportedRelativeRotation,
TUint &aSupportedRelativeMirroring,
TUint &aSupportedRelativeFlipping
)const

Parameters

TOrientationReference aOrientationReference
TUint & aSupportedRelativeRotation
TUint & aSupportedRelativeMirroring
TUint & aSupportedRelativeFlipping

GetSupportedTransformationsL(RArray< TUid > &)

IMPORT_C voidGetSupportedTransformationsL(RArray< TUid > &aTransformations)const

Parameters

RArray< TUid > & aTransformations

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

IMPORT_C voidGetTransformationSupportedValuesL(TUidaTransformation,
RArray< TInt > &aValues,
TValueInfo &aInfo
)const

Parameters

TUid aTransformation
RArray< TInt > & aValues
TValueInfo & aInfo

GetTransformationValue(TUid, TInt &)

IMPORT_C TIntGetTransformationValue(TUidaTransformation,
TInt &aTransformationValue
)const

Parameters

TUid aTransformation
TInt & aTransformationValue

NewL(CCamera &)

IMPORT_C CCameraImageProcessing *NewL(CCamera &aCamera)[static]

Parameters

CCamera & aCamera

RemoveColorAccentEntryL(TInt)

IMPORT_C voidRemoveColorAccentEntryL(TIntaIndex)

Parameters

TInt aIndex

RemoveColorSwapEntryL(TInt)

IMPORT_C voidRemoveColorSwapEntryL(TIntaIndex)

Parameters

TInt aIndex

SetActiveTransformSequenceL(RArray< TUid > &)

IMPORT_C voidSetActiveTransformSequenceL(RArray< TUid > &aTransformSequence)

Parameters

RArray< TUid > & aTransformSequence

SetColorAccentEntryL(TInt, const TColorOperationEntry &)

IMPORT_C voidSetColorAccentEntryL(TIntaIndex,
const TColorOperationEntry &aColorAccentParameters
)

Parameters

TInt aIndex
const TColorOperationEntry & aColorAccentParameters

SetColorSwapEntryL(TInt, const TColorOperationEntry &)

IMPORT_C voidSetColorSwapEntryL(TIntaIndex,
const TColorOperationEntry &aColorSwapParameters
)

Parameters

TInt aIndex
const TColorOperationEntry & aColorSwapParameters

SetRelativeOrientationOptionsL(TOrientationReference, TRelativeRotation, TRelativeMirror, TRelativeFlipping)

IMPORT_C voidSetRelativeOrientationOptionsL(TOrientationReferenceaOrientationReference,
TRelativeRotationaRelativeRotation,
TRelativeMirroraRelativeMirror,
TRelativeFlippingaRelativeFlipping
)

Parameters

TOrientationReference aOrientationReference
TRelativeRotation aRelativeRotation
TRelativeMirror aRelativeMirror
TRelativeFlipping aRelativeFlipping

SetSourceRect(const TRect &)

IMPORT_C voidSetSourceRect(const TRect &aRect)

Parameters

const TRect & aRect

SetTransformationValue(TUid, TInt)

IMPORT_C voidSetTransformationValue(TUidaTransformation,
TIntaValue
)

Parameters

TUid aTransformation
TInt aValue

StartColorAccentL()

IMPORT_C voidStartColorAccentL()

StartColorSwappingL()

IMPORT_C voidStartColorSwappingL()

TransformationValue(TUid)

IMPORT_C TIntTransformationValue(TUidaTransformation)const

Parameters

TUid aTransformation

Member Enumerations Documentation

Enum TColorOperationRepresentation

Used for color swap and color accent feature in TEffect. It describes whether the given source or target color represents itself or a group of color.

Enumerators

ERepresentationNone = 0x00

Feature is not supported

ERepresentationSingle = 0x01

The given color is uniquely represented

ERepresentationMultiple = 0x02

The given color represents a group of colors

Enum TColorOperationRgbGroupingMode

Used for color swap and color accent feature in TEffect. It describes the type of grouping for source and target colors when they represent a group of color.

Enumerators

ERgbGroupingNone = 0x00

Feature is not supported

ERgbGroupingFixed = 0x01

This means no neighbourhood colors are considered

ERgbGroupingAutomatic = 0x02

This means neighbourhood colors are to be automatically decided by the implementation or hardware

ERgbGroupingSignificantBits = 0x04

This means neighbourhood colors for source have to be decided by ignoring few starting bits. Used for source only

ERgbGroupingUniform = 0x08

This means colors in target are obtained as some uniform proportion using source. Used for target only

Enum TContrastEnhancement

Different types of contrast enhancement options. The enumeration list may be extended in future.

Enumerators

EContrastEnhancementNone = 0x00

Not Supported.

EContrastEnhancementSwitchOff = 0x01

Contrast Enhancement switched off.

EContrastEnhancementManualSwitchOn = 0x02

Contrast Enhacement switched On manually.

EContrastEnhancementSwitchAuto = 0x04

Contrast Enhancement in auto mode.

Enum TEffect

Settings for the supported effects

Enumerators

EEffectNone = 0x00000000

Effects off is default, always supported

EEffectNegative = 0x00000001

Negative visual effect.

EEffectMonochrome = 0x00000002

Black and white visual effect.

EEffectSolarize = 0x00000004

Solarization visual effect.

EEffectSepia = 0x00000008

Sepia visual effect.

EEffectEmboss = 0x00000010

Emboss visual effect.

EEffectRedEyeReduction = 0x00000020

Red eye glare reduction visual effect.

EEffectVivid = 0x00000040

Vivid colour visual effect.

EEffectNeutral = 0x00000080

Neutral colour visual effect.

EEffectLowSharpening = 0x00000100

Selective sharpening visual effect.

EEffectNatural = 0x00000200

Natural visual effect.

This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().

EEffectCine = 0x00000400

Cine visual effect.

This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().

EEffectOldFilm = 0x00000800

Old film visual effect.

This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().

EEffectColorSwap = 0x00001000

Color swap visual effect.

This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().

EEffectColorAccent = 0x00002000

Where a list of color can be kept as they are and the rest converted to gray.

This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().

Enum TGamma

Gamma settings

Enumerators

EGammaAuto = KMinTInt

Sets the gamma adjustment automatically.

Enum TGlareReduction

Glare reduction settings

Enumerators

EGlareReductionNone = 0x0000

Default value. Glare reduction disabled.

EGlareReductionBasic = 0x0001

most basic glare reduction.

Enum THue

Hue Settings

Enumerators

EHueAuto = KMinTInt

Sets the hue adjustment automatically.

Enum TMirror

Mirror settings

Enumerators

EMirrorNone = 0x00000000

Default value. Mirroring is disabled.

EMirrorHorizontal = 0x00000001

Mirror along horizontal axis.

EMirrorVertical = 0x00000002

Mirror along vertical axis.

EMirrorBoth = 0x00000003

Mirror along horizontal and vertical axis.

Enum TNoiseReduction

Noise filter settings

Enumerators

ENoiseReductionNone = 0x0000

Default value. Noise reduction disabled.

ENoiseReductionBasic = 0x0001

most basic noise reduction.

Enum TOrientationReference

Used to provide different types of references for orientation of images retrieved. These references are the various means by the orientation of an image can be defined. Client needs to choose a particular TOrientationReference and specify any relative rotation, mirroring and flipping on top of it.

This enumeration has nothing to do with absolute rotation. Uid KUidECamEventImageProcessingTransformRotate is used for absolute rotation purposes.

The enumeration list may be extended in future.

Enumerators

EOrientationReferenceCameraSensorOrientation

The retrieved images will follow the camera sensor orientation. This orientation would be relative to the current screen mode as given by the reference screen.

EOrientationReferenceTiltOrientation

The retrieved images will get oriented as per the tilt sensor information. So,the orientation would be relative to the current screen mode as given by the reference screen.

Enum TRedEyeReduction

Different types of software-based red eye reduction options. The enumeration list may be extended in future.

Enumerators

ERedEyeReductionNone = 0x00

Not Supported.

ERedEyeReductionSwitchOff = 0x01

Software based Red Eye Reduction can be switched off(disabled).

ERedEyeReductionManualSwitchOn = 0x02

Software based Red Eye Reduction can be switched on (enabled).

ERedEyeReductionSwitchAuto = 0x04

Software based Red Eye Reduction can be put to auto mode.

Enum TRelativeFlipping

Used to describe the various relative flipping. The term 'relative' means that the flipping is applied after the image undergoes orientation as given by TOrientationReference.

The enumeration list may be extended in future.

Enumerators

ERelativeFlippingNone = 0x00

No flipping.

ERelativeFlippingHorizontal = 0x10

Used to flip an image horizontally. This is applied on top of orientation reference and is relative to current reference screen.

ERelativeFlippingVertical = 0x20

Used to flip an image vertically. This is applied on top of orientation reference and is relative to current reference screen.

Enum TRelativeMirror

Used to describe the various relative mirroring. The term 'relative' means that the mirroring is applied after the image undergoes orientation as given by TOrientationReference.

The enumeration list may be extended in future.

Enumerators

ERelativeMirrorNone = 0x00

No mirroring.

ERelativeMirrorHorizontalAxis = 0x10

Used to mirror an image about the horizontal axis. This is applied on top of orientation reference and is relative to current reference screen.

ERelativeMirrorVerticalAxis = 0x20

Used to mirror an image about the vertical axis. This is applied on top of orientation reference and is relative to current reference screen.

Enum TRelativeRotation

Used to describe the various relative rotation. The term 'relative' means that the rotation is applied after the image undergoes orientation as given by TOrientationReference.

The enumeration list may be extended in future.

Enumerators

ERelativeRotation0Degrees = 0x00

Zero degree Rotation applied on top of orientation reference and is relative to current reference screen.

ERelativeRotation90DegreesClockwise = 0x01

90 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen.

ERelativeRotation180DegreesClockwise = 0x02

180 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen.

ERelativeRotation270DegreesClockwise = 0x04

270 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen.

Enum TSaturation

Saturation Settings

Enumerators

ESaturationAuto = KMinTInt

Sets the saturation adjustment automatically.

Enum TSharpness

Sharpness Settings

Enumerators

ESharpnessAuto = KMinTInt

Sets the sharpness adjustment automatically.

Member Data Documentation

MCameraImageProcessing * iImpl

MCameraImageProcessing *iImpl[private]

MCameraImageProcessing2 * iImpl2

MCameraImageProcessing2 *iImpl2[private]

MCameraImageProcessing3 * iImpl3

MCameraImageProcessing3 *iImpl3[private]

CCamera & iOwner

CCamera &iOwner[private]