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.
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.
// 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
If the class methods leave, the output type parameter value is not guaranteed to be valid.
Private Member Functions | |
---|---|
CCameraImageProcessing(CCamera &) | |
void | ConstructL() |
void | ConstructL(const MImplementationFactory &) |
Private Attributes | |
---|---|
MCameraImageProcessing * | iImpl |
MCameraImageProcessing2 * | iImpl2 |
MCameraImageProcessing3 * | iImpl3 |
CCamera & | iOwner |
CCameraImageProcessing | ( | CCamera & | aOwner | ) | [private] |
CCamera & aOwner |
void | ConstructL | ( | const MImplementationFactory & | aImplFactory | ) | [private] |
const MImplementationFactory & aImplFactory |
IMPORT_C CCameraImageProcessing * | CreateL | ( | CCamera & | aCamera, |
MImplementationFactory & | aImplFactory | |||
) | [static] |
CCamera & aCamera | |
MImplementationFactory & aImplFactory |
IMPORT_C void | GetActiveTransformSequenceL | ( | RArray< TUid > & | aTransformSequence | ) | const |
IMPORT_C void | GetActiveTransformationsL | ( | RArray< TUid > & | aTransformations | ) | const |
IMPORT_C void | GetColorAccentCapabilitiesL | ( | TInt | aIndex, |
TColorOperationCapabilities & | aColorAccentCapabilities | |||
) | const |
TInt aIndex | |
TColorOperationCapabilities & aColorAccentCapabilities |
IMPORT_C void | GetColorAccentEntryL | ( | TInt | aIndex, |
TColorOperationEntry & | aColorAccentParameters | |||
) | const |
TInt aIndex | |
TColorOperationEntry & aColorAccentParameters |
IMPORT_C void | GetColorSwapCapabilitiesL | ( | TInt | aIndex, |
TColorOperationCapabilities & | aColorSwapCapabilities | |||
) | const |
TInt aIndex | |
TColorOperationCapabilities & aColorSwapCapabilities |
IMPORT_C void | GetColorSwapEntryL | ( | TInt | aIndex, |
TColorOperationEntry & | aColorSwapParameters | |||
) | const |
TInt aIndex | |
TColorOperationEntry & aColorSwapParameters |
IMPORT_C void | GetConcurrentColorAccentSupportedL | ( | TInt & | aConcurrentColorAccentSupported | ) | const |
TInt & aConcurrentColorAccentSupported |
IMPORT_C void | GetConcurrentColorSwappingsSupportedL | ( | TInt & | aConcurrentColorSwappingSupported | ) | const |
TInt & aConcurrentColorSwappingSupported |
IMPORT_C void | GetCurrentRelativeOrientationOptionsL | ( | TOrientationReference & | aOrientationReference, |
TRelativeRotation & | aRelativeRotation, | |||
TRelativeMirror & | aRelativeMirror, | |||
TRelativeFlipping & | aRelativeFlipping | |||
) | const |
TOrientationReference & aOrientationReference | |
TRelativeRotation & aRelativeRotation | |
TRelativeMirror & aRelativeMirror | |
TRelativeFlipping & aRelativeFlipping |
IMPORT_C void | GetSupportedRelativeOrientationOptionsL | ( | TOrientationReference | aOrientationReference, |
TUint & | aSupportedRelativeRotation, | |||
TUint & | aSupportedRelativeMirroring, | |||
TUint & | aSupportedRelativeFlipping | |||
) | const |
TOrientationReference aOrientationReference | |
TUint & aSupportedRelativeRotation | |
TUint & aSupportedRelativeMirroring | |
TUint & aSupportedRelativeFlipping |
IMPORT_C void | GetSupportedTransformationsL | ( | RArray< TUid > & | aTransformations | ) | const |
IMPORT_C void | GetTransformationSupportedValuesL | ( | TUid | aTransformation, |
RArray< TInt > & | aValues, | |||
TValueInfo & | aInfo | |||
) | const |
TUid aTransformation | |
RArray< TInt > & aValues | |
TValueInfo & aInfo |
IMPORT_C TInt | GetTransformationValue | ( | TUid | aTransformation, |
TInt & | aTransformationValue | |||
) | const |
IMPORT_C CCameraImageProcessing * | NewL | ( | CCamera & | aCamera | ) | [static] |
CCamera & aCamera |
IMPORT_C void | RemoveColorAccentEntryL | ( | TInt | aIndex | ) |
TInt aIndex |
IMPORT_C void | SetActiveTransformSequenceL | ( | RArray< TUid > & | aTransformSequence | ) |
IMPORT_C void | SetColorAccentEntryL | ( | TInt | aIndex, |
const TColorOperationEntry & | aColorAccentParameters | |||
) |
TInt aIndex | |
const TColorOperationEntry & aColorAccentParameters |
IMPORT_C void | SetColorSwapEntryL | ( | TInt | aIndex, |
const TColorOperationEntry & | aColorSwapParameters | |||
) |
TInt aIndex | |
const TColorOperationEntry & aColorSwapParameters |
IMPORT_C void | SetRelativeOrientationOptionsL | ( | TOrientationReference | aOrientationReference, |
TRelativeRotation | aRelativeRotation, | |||
TRelativeMirror | aRelativeMirror, | |||
TRelativeFlipping | aRelativeFlipping | |||
) |
TOrientationReference aOrientationReference | |
TRelativeRotation aRelativeRotation | |
TRelativeMirror aRelativeMirror | |
TRelativeFlipping aRelativeFlipping |
IMPORT_C void | SetSourceRect | ( | const TRect & | aRect | ) |
const TRect & aRect |
IMPORT_C void | SetTransformationValue | ( | TUid | aTransformation, |
TInt | aValue | |||
) |
IMPORT_C TInt | TransformationValue | ( | TUid | aTransformation | ) | const |
TUid aTransformation |
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.
ERepresentationNone = 0x00 |
Feature is not supported |
ERepresentationSingle = 0x01 |
The given color is uniquely represented |
ERepresentationMultiple = 0x02 |
The given color represents a group of colors |
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.
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 |
Different types of contrast enhancement options. The enumeration list may be extended in future.
EContrastEnhancementNone = 0x00 |
Not Supported. |
EContrastEnhancementSwitchOff = 0x01 |
Contrast Enhancement switched off. |
EContrastEnhancementManualSwitchOn = 0x02 |
Contrast Enhacement switched On manually. |
EContrastEnhancementSwitchAuto = 0x04 |
Contrast Enhancement in auto mode. |
Settings for the supported effects
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(). |
Gamma settings
EGammaAuto = KMinTInt |
Sets the gamma adjustment automatically. |
Glare reduction settings
EGlareReductionNone = 0x0000 |
Default value. Glare reduction disabled. |
EGlareReductionBasic = 0x0001 |
most basic glare reduction. |
Mirror settings
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. |
Noise filter settings
ENoiseReductionNone = 0x0000 |
Default value. Noise reduction disabled. |
ENoiseReductionBasic = 0x0001 |
most basic noise reduction. |
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.
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. |
Different types of software-based red eye reduction options. The enumeration list may be extended in future.
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. |
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.
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. |
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.
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. |
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.
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. |
Saturation Settings
ESaturationAuto = KMinTInt |
Sets the saturation adjustment automatically. |
Sharpness Settings
ESharpnessAuto = KMinTInt |
Sets the sharpness adjustment automatically. |