williamr@2
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
/**
|
williamr@2
|
17 |
@file
|
williamr@2
|
18 |
@publishedAll
|
williamr@2
|
19 |
@released
|
williamr@2
|
20 |
*/
|
williamr@2
|
21 |
#ifndef ECAMIMAGEPROCESSING_H
|
williamr@2
|
22 |
#define ECAMIMAGEPROCESSING_H
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <e32base.h>
|
williamr@2
|
25 |
#include <gdi.h>
|
williamr@2
|
26 |
#include <ecam.h>
|
williamr@2
|
27 |
#include <ecamadvsettingsuids.hrh>
|
williamr@2
|
28 |
#include <ecam/ecamconstants.h>
|
williamr@2
|
29 |
|
williamr@4
|
30 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
|
williamr@4
|
31 |
#include <ecamimageprocessingconst.h>
|
williamr@4
|
32 |
#include <ecamimageprocessingdef.h>
|
williamr@4
|
33 |
#endif
|
williamr@4
|
34 |
|
williamr@4
|
35 |
|
williamr@2
|
36 |
class MCameraImageProcessing;
|
williamr@2
|
37 |
class MCameraImageProcessing2;
|
williamr@2
|
38 |
class MCameraImageProcessing3;
|
williamr@2
|
39 |
|
williamr@2
|
40 |
class MImplementationFactory;
|
williamr@2
|
41 |
|
williamr@2
|
42 |
/**
|
williamr@2
|
43 |
The current Version of the TColorOperationCapabilities class.
|
williamr@2
|
44 |
|
williamr@2
|
45 |
*/
|
williamr@2
|
46 |
static const TUint KECamColorOperationCapabilitiesCurrentVersion = 1;
|
williamr@2
|
47 |
|
williamr@2
|
48 |
/**
|
williamr@2
|
49 |
The current Version of the TBitsIgnore class.
|
williamr@2
|
50 |
|
williamr@2
|
51 |
*/
|
williamr@2
|
52 |
static const TUint KECamBitsIgnoreCurrentVersion = 1;
|
williamr@2
|
53 |
|
williamr@2
|
54 |
/**
|
williamr@2
|
55 |
The current Version of the TColorOperationEntry class.
|
williamr@2
|
56 |
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
static const TUint KECamColorOperationEntryCurrentVersion = 1;
|
williamr@2
|
59 |
|
williamr@2
|
60 |
|
williamr@2
|
61 |
/* General purpose constants */
|
williamr@2
|
62 |
|
williamr@2
|
63 |
/**
|
williamr@2
|
64 |
Uid used to identify the CCamera Post Processing API.
|
williamr@2
|
65 |
Such image operations are performed on the acquired image by the camera itself.
|
williamr@2
|
66 |
@see CCamera::CCameraPresets
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
static const TUid KECamImageProcessingUid = {KECamImageProcessingUidValue};
|
williamr@2
|
69 |
|
williamr@2
|
70 |
/** Transformations */
|
williamr@2
|
71 |
/* Adjustments */
|
williamr@2
|
72 |
/** Brightness adjustment - recognized range [-100:100] */
|
williamr@2
|
73 |
static const TUid KUidECamEventImageProcessingAdjustBrightness = {KUidECamEventImageProcessingAdjustBrightnessUidValue};
|
williamr@2
|
74 |
/** Contrast adjustment - recognized range [-100:100] */
|
williamr@2
|
75 |
static const TUid KUidECamEventImageProcessingAdjustContrast = {KUidECamEventImageProcessingAdjustContrastUidValue};
|
williamr@2
|
76 |
/** Gamma adjustment - recognized range [0:1000] */
|
williamr@2
|
77 |
static const TUid KUidECamEventImageProcessingAdjustGamma = {KUidECamEventImageProcessingAdjustGammaUidValue};
|
williamr@2
|
78 |
/** Sharpness adjustment - recognized range [-100:100] */
|
williamr@2
|
79 |
static const TUid KUidECamEventImageProcessingAdjustSharpness = {KUidECamEventImageProcessingAdjustSharpnessUidValue};
|
williamr@2
|
80 |
/** Saturation adjustment - recognized range [-100:100] */
|
williamr@2
|
81 |
static const TUid KUidECamEventtImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue};
|
williamr@2
|
82 |
static const TUid KUidECamEventImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue};
|
williamr@2
|
83 |
/** Hue adjustment - recognized range [-100:100] */
|
williamr@2
|
84 |
static const TUid KUidECamEventtImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue};
|
williamr@2
|
85 |
static const TUid KUidECamEventImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue};
|
williamr@2
|
86 |
|
williamr@2
|
87 |
|
williamr@2
|
88 |
/** Effect value */
|
williamr@2
|
89 |
static const TUid KUidECamEventImageProcessingEffect = {KUidECamEventImageProcessingEffectUidValue};
|
williamr@2
|
90 |
|
williamr@2
|
91 |
/* Transforms */
|
williamr@2
|
92 |
/** Crop */
|
williamr@2
|
93 |
static const TUid KUidECamEventImageProcessingTransformCrop = {KUidECamEventImageProcessingTransformCropUidValue};
|
williamr@2
|
94 |
/** Rotation */
|
williamr@2
|
95 |
static const TUid KUidECamEventImageProcessingTransformRotate = {KUidECamEventImageProcessingTransformRotateUidValue};
|
williamr@2
|
96 |
/** Mirroring */
|
williamr@2
|
97 |
static const TUid KUidECamEventImageProcessingTransformMirror = {KUidECamEventImageProcessingTransformMirrorUidValue};
|
williamr@2
|
98 |
/** Rescale */
|
williamr@2
|
99 |
static const TUid KUidECamEventImageProcessingTransformScale = {KUidECamEventImageProcessingTransformScaleUidValue};
|
williamr@2
|
100 |
/** origin subset */
|
williamr@2
|
101 |
static const TUid KUidECamEventImageProcessingSourceRect = {KUidECamEventImageProcessingSourceRectUidValue};
|
williamr@2
|
102 |
/** Noise reduction */
|
williamr@2
|
103 |
static const TUid KUidECamEventImageProcessingNoiseReduction = {KUidECamEventImageProcessingNoiseReductionUidValue};
|
williamr@2
|
104 |
/** Glare removal */
|
williamr@2
|
105 |
static const TUid KUidECamEventImageProcessingGlareRemoval = {KUidECamEventImageProcessingGlareRemovalUidValue};
|
williamr@2
|
106 |
|
williamr@2
|
107 |
/** Default value for image processing */
|
williamr@2
|
108 |
static const TInt KECamImageProcessingDefaultValue = 0;
|
williamr@2
|
109 |
|
williamr@2
|
110 |
/**
|
williamr@2
|
111 |
Uid used to indicate completion of StartColorSwap
|
williamr@2
|
112 |
|
williamr@2
|
113 |
*/
|
williamr@2
|
114 |
static const TUid KUidECamEventCIPStartColorSwap = {KUidECamEventCIPStartColorSwapUidValue};
|
williamr@2
|
115 |
|
williamr@2
|
116 |
/**
|
williamr@2
|
117 |
Uid used to indicate completion of StartColorAccent
|
williamr@2
|
118 |
|
williamr@2
|
119 |
*/
|
williamr@2
|
120 |
static const TUid KUidECamEventCIPStartColorAccent = {KUidECamEventCIPStartColorAccentUidValue};
|
williamr@2
|
121 |
|
williamr@2
|
122 |
|
williamr@2
|
123 |
/**
|
williamr@2
|
124 |
This class is used to perform image processing operations on the camera.
|
williamr@2
|
125 |
These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also
|
williamr@2
|
126 |
able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. .
|
williamr@2
|
127 |
When an operation selection is complete, all clients are notified with the respective event UID.
|
williamr@2
|
128 |
|
williamr@2
|
129 |
As often cameras may support only a subset of discrete values of the allowed range,
|
williamr@2
|
130 |
the API allows the client to retrieve those and use them explicitly.
|
williamr@2
|
131 |
|
williamr@2
|
132 |
@note This class is not intended for sub-classing and used to standardise existing
|
williamr@2
|
133 |
varieties of implementations.
|
williamr@2
|
134 |
|
williamr@2
|
135 |
@note it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively
|
williamr@2
|
136 |
activates the transformations. Whilst for effects and adjustments there is always a value, transforms
|
williamr@2
|
137 |
may have a dependency on other parameters and
|
williamr@2
|
138 |
crop - requires setting of source rectangle.
|
williamr@2
|
139 |
scale - will use setting of source rectangle, and the magnification factor is
|
williamr@2
|
140 |
determined by the source rectangle and the output size. This is always magnification.
|
williamr@2
|
141 |
if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor
|
williamr@2
|
142 |
and set to integer.
|
williamr@2
|
143 |
mirror - values of TMirror type.
|
williamr@2
|
144 |
rotation - the angle in degrees.
|
williamr@2
|
145 |
noise reduction - TNoiseReduction.
|
williamr@2
|
146 |
glare removal - TGlareReduction.
|
williamr@2
|
147 |
|
williamr@2
|
148 |
Example
|
williamr@2
|
149 |
|
williamr@2
|
150 |
@code
|
williamr@2
|
151 |
// Lets assume that an application would need to check whether gamma correction is
|
williamr@2
|
152 |
// supported on a particular platform. After obtaining a valid pointer to the interface,
|
williamr@2
|
153 |
// it would call GetSupportedTransformationsL() to obtain the list of the supported
|
williamr@2
|
154 |
// transformations and check whether KUidECamEventImageProcessingAdjustGamma
|
williamr@2
|
155 |
// is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200);
|
williamr@2
|
156 |
// to set the new value. A notification will be generated to the client to indicate success.
|
williamr@2
|
157 |
|
williamr@2
|
158 |
RArray<TUid> suppTransforms; // array of supported transformations
|
williamr@2
|
159 |
CleanupClosePushL(suppTransforms);
|
williamr@2
|
160 |
|
williamr@2
|
161 |
imageProcess->GetSupportedTransformationsL(suppTransfUids);
|
williamr@2
|
162 |
...
|
williamr@2
|
163 |
// if the gamma is supported
|
williamr@2
|
164 |
TInt gammaCorrection = 200; // gamma correction of 2.0
|
williamr@2
|
165 |
imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection);
|
williamr@2
|
166 |
...
|
williamr@2
|
167 |
// pop stack to close the RArray
|
williamr@2
|
168 |
@endcode
|
williamr@2
|
169 |
|
williamr@2
|
170 |
@note If the class methods leave, the output type parameter value is not guaranteed to be valid.
|
williamr@2
|
171 |
|
williamr@2
|
172 |
@publishedAll
|
williamr@2
|
173 |
@released
|
williamr@2
|
174 |
*/
|
williamr@2
|
175 |
class CCamera::CCameraImageProcessing : public CBase
|
williamr@2
|
176 |
{
|
williamr@2
|
177 |
|
williamr@2
|
178 |
// so can use internal factory functions etc.
|
williamr@2
|
179 |
friend class CCamera;
|
williamr@2
|
180 |
|
williamr@2
|
181 |
public:
|
williamr@2
|
182 |
|
williamr@2
|
183 |
/** Gamma settings */
|
williamr@2
|
184 |
enum TGamma
|
williamr@2
|
185 |
{
|
williamr@2
|
186 |
/** Sets the gamma adjustment automatically. */
|
williamr@2
|
187 |
EGammaAuto = KMinTInt
|
williamr@2
|
188 |
};
|
williamr@2
|
189 |
/** Sharpness Settings */
|
williamr@2
|
190 |
enum TSharpness
|
williamr@2
|
191 |
{
|
williamr@2
|
192 |
/** Sets the sharpness adjustment automatically. */
|
williamr@2
|
193 |
ESharpnessAuto = KMinTInt
|
williamr@2
|
194 |
};
|
williamr@2
|
195 |
/** Saturation Settings */
|
williamr@2
|
196 |
enum TSaturation
|
williamr@2
|
197 |
{
|
williamr@2
|
198 |
/** Sets the saturation adjustment automatically. */
|
williamr@2
|
199 |
ESaturationAuto = KMinTInt
|
williamr@2
|
200 |
};
|
williamr@2
|
201 |
/** Hue Settings */
|
williamr@2
|
202 |
enum THue
|
williamr@2
|
203 |
{
|
williamr@2
|
204 |
/** Sets the hue adjustment automatically. */
|
williamr@2
|
205 |
EHueAuto = KMinTInt
|
williamr@2
|
206 |
};
|
williamr@2
|
207 |
|
williamr@2
|
208 |
/** Settings for the supported effects */
|
williamr@2
|
209 |
enum TEffect
|
williamr@2
|
210 |
{
|
williamr@2
|
211 |
/** Effects off is default, always supported */
|
williamr@2
|
212 |
EEffectNone = 0x00000000,
|
williamr@2
|
213 |
/** Negative visual effect. */
|
williamr@2
|
214 |
EEffectNegative = 0x00000001,
|
williamr@2
|
215 |
/** Black and white visual effect. */
|
williamr@2
|
216 |
EEffectMonochrome = 0x00000002,
|
williamr@2
|
217 |
/** Solarization visual effect. */
|
williamr@2
|
218 |
EEffectSolarize = 0x00000004,
|
williamr@2
|
219 |
/** Sepia visual effect. */
|
williamr@2
|
220 |
EEffectSepia = 0x00000008,
|
williamr@2
|
221 |
/** Emboss visual effect. */
|
williamr@2
|
222 |
EEffectEmboss = 0x00000010,
|
williamr@2
|
223 |
/** Red eye glare reduction visual effect. */
|
williamr@2
|
224 |
EEffectRedEyeReduction = 0x00000020,
|
williamr@2
|
225 |
/** Vivid colour visual effect. */
|
williamr@2
|
226 |
EEffectVivid = 0x00000040,
|
williamr@2
|
227 |
/** Neutral colour visual effect. */
|
williamr@2
|
228 |
EEffectNeutral = 0x00000080,
|
williamr@2
|
229 |
/** Selective sharpening visual effect. */
|
williamr@2
|
230 |
EEffectLowSharpening = 0x00000100,
|
williamr@2
|
231 |
/**
|
williamr@2
|
232 |
Natural visual effect.
|
williamr@2
|
233 |
|
williamr@2
|
234 |
This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or
|
williamr@2
|
235 |
CCamera::NewDuplicate2L().
|
williamr@2
|
236 |
|
williamr@2
|
237 |
*/
|
williamr@2
|
238 |
EEffectNatural = 0x00000200,
|
williamr@2
|
239 |
/**
|
williamr@2
|
240 |
Cine visual effect.
|
williamr@2
|
241 |
|
williamr@2
|
242 |
This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or
|
williamr@2
|
243 |
CCamera::NewDuplicate2L().
|
williamr@2
|
244 |
|
williamr@2
|
245 |
*/
|
williamr@2
|
246 |
EEffectCine = 0x00000400,
|
williamr@2
|
247 |
/**
|
williamr@2
|
248 |
Old film visual effect.
|
williamr@2
|
249 |
|
williamr@2
|
250 |
This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or
|
williamr@2
|
251 |
CCamera::NewDuplicate2L().
|
williamr@2
|
252 |
|
williamr@2
|
253 |
*/
|
williamr@2
|
254 |
EEffectOldFilm = 0x00000800,
|
williamr@2
|
255 |
/**
|
williamr@2
|
256 |
Color swap visual effect.
|
williamr@2
|
257 |
|
williamr@2
|
258 |
This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or
|
williamr@2
|
259 |
CCamera::NewDuplicate2L().
|
williamr@2
|
260 |
|
williamr@2
|
261 |
*/
|
williamr@2
|
262 |
EEffectColorSwap = 0x00001000,
|
williamr@2
|
263 |
/**
|
williamr@2
|
264 |
Where a list of color can be kept as they are and the rest converted to gray.
|
williamr@2
|
265 |
|
williamr@2
|
266 |
This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or
|
williamr@2
|
267 |
CCamera::NewDuplicate2L().
|
williamr@2
|
268 |
|
williamr@2
|
269 |
*/
|
williamr@2
|
270 |
EEffectColorAccent = 0x00002000
|
williamr@2
|
271 |
};
|
williamr@2
|
272 |
|
williamr@2
|
273 |
/** Mirror settings */
|
williamr@2
|
274 |
enum TMirror
|
williamr@2
|
275 |
{
|
williamr@2
|
276 |
/** Default value. Mirroring is disabled. */
|
williamr@2
|
277 |
EMirrorNone = 0x00000000,
|
williamr@2
|
278 |
/** Mirror along horizontal axis. */
|
williamr@2
|
279 |
EMirrorHorizontal = 0x00000001,
|
williamr@2
|
280 |
/** Mirror along vertical axis. */
|
williamr@2
|
281 |
EMirrorVertical = 0x00000002,
|
williamr@2
|
282 |
/** Mirror along horizontal and vertical axis. */
|
williamr@2
|
283 |
EMirrorBoth = 0x00000003
|
williamr@2
|
284 |
};
|
williamr@2
|
285 |
|
williamr@2
|
286 |
/** Noise filter settings */
|
williamr@2
|
287 |
enum TNoiseReduction
|
williamr@2
|
288 |
{
|
williamr@2
|
289 |
/** Default value. Noise reduction disabled. */
|
williamr@2
|
290 |
ENoiseReductionNone = 0x0000,
|
williamr@2
|
291 |
/** most basic noise reduction. */
|
williamr@2
|
292 |
ENoiseReductionBasic = 0x0001
|
williamr@2
|
293 |
};
|
williamr@2
|
294 |
|
williamr@2
|
295 |
/** Glare reduction settings */
|
williamr@2
|
296 |
enum TGlareReduction
|
williamr@2
|
297 |
{
|
williamr@2
|
298 |
/** Default value. Glare reduction disabled. */
|
williamr@2
|
299 |
EGlareReductionNone = 0x0000,
|
williamr@2
|
300 |
/** most basic glare reduction. */
|
williamr@2
|
301 |
EGlareReductionBasic = 0x0001
|
williamr@2
|
302 |
};
|
williamr@2
|
303 |
|
williamr@2
|
304 |
/**
|
williamr@2
|
305 |
Used for color swap and color accent feature in TEffect. It describes whether the given source
|
williamr@2
|
306 |
or target color represents itself or a group of color.
|
williamr@2
|
307 |
|
williamr@2
|
308 |
*/
|
williamr@2
|
309 |
enum TColorOperationRepresentation
|
williamr@2
|
310 |
{
|
williamr@2
|
311 |
/** Feature is not supported */
|
williamr@2
|
312 |
ERepresentationNone = 0x00,
|
williamr@2
|
313 |
/** The given color is uniquely represented */
|
williamr@2
|
314 |
ERepresentationSingle = 0x01,
|
williamr@2
|
315 |
/** The given color represents a group of colors */
|
williamr@2
|
316 |
ERepresentationMultiple = 0x02
|
williamr@2
|
317 |
};
|
williamr@2
|
318 |
|
williamr@2
|
319 |
/**
|
williamr@2
|
320 |
Used for color swap and color accent feature in TEffect. It describes the type of grouping for
|
williamr@2
|
321 |
source and target colors when they represent a group of color.
|
williamr@2
|
322 |
|
williamr@2
|
323 |
*/
|
williamr@2
|
324 |
enum TColorOperationRgbGroupingMode
|
williamr@2
|
325 |
{
|
williamr@2
|
326 |
/** Feature is not supported */
|
williamr@2
|
327 |
ERgbGroupingNone = 0x00,
|
williamr@2
|
328 |
/** This means no neighbourhood colors are considered */
|
williamr@2
|
329 |
ERgbGroupingFixed = 0x01,
|
williamr@2
|
330 |
/** This means neighbourhood colors are to be automatically decided by the implementation or hardware */
|
williamr@2
|
331 |
ERgbGroupingAutomatic = 0x02,
|
williamr@2
|
332 |
/** This means neighbourhood colors for source have to be decided by ignoring few starting bits. Used for source only */
|
williamr@2
|
333 |
ERgbGroupingSignificantBits = 0x04,
|
williamr@2
|
334 |
/** This means colors in target are obtained as some uniform proportion using source. Used for target only */
|
williamr@2
|
335 |
ERgbGroupingUniform = 0x08
|
williamr@2
|
336 |
};
|
williamr@2
|
337 |
|
williamr@2
|
338 |
/**
|
williamr@2
|
339 |
Used to provide different types of references for orientation of images retrieved. These references are the various
|
williamr@2
|
340 |
means by the orientation of an image can be defined. Client needs to choose a particular TOrientationReference and
|
williamr@2
|
341 |
specify any relative rotation, mirroring and flipping on top of it.
|
williamr@2
|
342 |
|
williamr@2
|
343 |
This enumeration has nothing to do with absolute rotation. Uid KUidECamEventImageProcessingTransformRotate is used
|
williamr@2
|
344 |
for absolute rotation purposes.
|
williamr@2
|
345 |
|
williamr@2
|
346 |
The enumeration list may be extended in future.
|
williamr@2
|
347 |
|
williamr@2
|
348 |
@publishedPartner
|
williamr@2
|
349 |
@prototype
|
williamr@2
|
350 |
*/
|
williamr@2
|
351 |
enum TOrientationReference
|
williamr@2
|
352 |
{
|
williamr@2
|
353 |
/** The retrieved images will follow the camera sensor orientation. This orientation would be relative
|
williamr@2
|
354 |
to the current screen mode as given by the reference screen. */
|
williamr@2
|
355 |
EOrientationReferenceCameraSensorOrientation,
|
williamr@2
|
356 |
|
williamr@2
|
357 |
/** The retrieved images will get oriented as per the tilt sensor information.
|
williamr@2
|
358 |
So,the orientation would be relative to the current screen mode as given by the reference screen. */
|
williamr@2
|
359 |
EOrientationReferenceTiltOrientation
|
williamr@2
|
360 |
};
|
williamr@2
|
361 |
|
williamr@2
|
362 |
/**
|
williamr@2
|
363 |
Used to describe the various relative rotation. The term 'relative' means that the rotation is applied after the
|
williamr@2
|
364 |
image undergoes orientation as given by TOrientationReference.
|
williamr@2
|
365 |
|
williamr@2
|
366 |
The enumeration list may be extended in future.
|
williamr@2
|
367 |
|
williamr@2
|
368 |
@publishedPartner
|
williamr@2
|
369 |
@prototype
|
williamr@2
|
370 |
*/
|
williamr@2
|
371 |
enum TRelativeRotation
|
williamr@2
|
372 |
{
|
williamr@2
|
373 |
/** Zero degree Rotation applied on top of orientation reference and is relative to current reference screen. */
|
williamr@2
|
374 |
ERelativeRotation0Degrees = 0x00,
|
williamr@2
|
375 |
/** 90 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
|
williamr@2
|
376 |
ERelativeRotation90DegreesClockwise = 0x01,
|
williamr@2
|
377 |
/** 180 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
|
williamr@2
|
378 |
ERelativeRotation180DegreesClockwise = 0x02,
|
williamr@2
|
379 |
/** 270 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
|
williamr@2
|
380 |
ERelativeRotation270DegreesClockwise = 0x04
|
williamr@2
|
381 |
};
|
williamr@2
|
382 |
|
williamr@2
|
383 |
/**
|
williamr@2
|
384 |
Used to describe the various relative mirroring. The term 'relative' means that the mirroring is applied after the
|
williamr@2
|
385 |
image undergoes orientation as given by TOrientationReference.
|
williamr@2
|
386 |
|
williamr@2
|
387 |
The enumeration list may be extended in future.
|
williamr@2
|
388 |
|
williamr@2
|
389 |
@publishedPartner
|
williamr@2
|
390 |
@prototype
|
williamr@2
|
391 |
*/
|
williamr@2
|
392 |
enum TRelativeMirror
|
williamr@2
|
393 |
{
|
williamr@2
|
394 |
/** No mirroring. */
|
williamr@2
|
395 |
ERelativeMirrorNone = 0x00,
|
williamr@2
|
396 |
/** Used to mirror an image about the horizontal axis. This is applied on top of orientation reference and is
|
williamr@2
|
397 |
relative to current reference screen. */
|
williamr@2
|
398 |
ERelativeMirrorHorizontalAxis = 0x10,
|
williamr@2
|
399 |
/** Used to mirror an image about the vertical axis. This is applied on top of orientation reference and is
|
williamr@2
|
400 |
relative to current reference screen. */
|
williamr@2
|
401 |
ERelativeMirrorVerticalAxis = 0x20
|
williamr@2
|
402 |
};
|
williamr@2
|
403 |
|
williamr@2
|
404 |
/**
|
williamr@2
|
405 |
Used to describe the various relative flipping. The term 'relative' means that the flipping is applied after the
|
williamr@2
|
406 |
image undergoes orientation as given by TOrientationReference.
|
williamr@2
|
407 |
|
williamr@2
|
408 |
The enumeration list may be extended in future.
|
williamr@2
|
409 |
|
williamr@2
|
410 |
@publishedPartner
|
williamr@2
|
411 |
@prototype
|
williamr@2
|
412 |
*/
|
williamr@2
|
413 |
enum TRelativeFlipping
|
williamr@2
|
414 |
{
|
williamr@2
|
415 |
/** No flipping. */
|
williamr@2
|
416 |
ERelativeFlippingNone = 0x00,
|
williamr@2
|
417 |
/** Used to flip an image horizontally. This is applied on top of orientation reference and is relative to current
|
williamr@2
|
418 |
reference screen. */
|
williamr@2
|
419 |
ERelativeFlippingHorizontal = 0x10,
|
williamr@2
|
420 |
/** Used to flip an image vertically. This is applied on top of orientation reference and is relative to current
|
williamr@2
|
421 |
reference screen. */
|
williamr@2
|
422 |
ERelativeFlippingVertical = 0x20
|
williamr@2
|
423 |
};
|
williamr@2
|
424 |
|
williamr@2
|
425 |
/**
|
williamr@2
|
426 |
Different types of contrast enhancement options.
|
williamr@2
|
427 |
The enumeration list may be extended in future.
|
williamr@2
|
428 |
|
williamr@2
|
429 |
@publishedPartner
|
williamr@2
|
430 |
@prototype
|
williamr@2
|
431 |
*/
|
williamr@2
|
432 |
enum TContrastEnhancement
|
williamr@2
|
433 |
{
|
williamr@2
|
434 |
/** Not Supported. */
|
williamr@2
|
435 |
EContrastEnhancementNone =0x00,
|
williamr@2
|
436 |
/** Contrast Enhancement switched off. */
|
williamr@2
|
437 |
EContrastEnhancementSwitchOff =0x01,
|
williamr@2
|
438 |
/** Contrast Enhacement switched On manually. */
|
williamr@2
|
439 |
EContrastEnhancementManualSwitchOn =0x02,
|
williamr@2
|
440 |
/** Contrast Enhancement in auto mode. */
|
williamr@2
|
441 |
EContrastEnhancementSwitchAuto =0x04
|
williamr@2
|
442 |
};
|
williamr@2
|
443 |
|
williamr@2
|
444 |
/**
|
williamr@2
|
445 |
Different types of software-based red eye reduction options.
|
williamr@2
|
446 |
The enumeration list may be extended in future.
|
williamr@2
|
447 |
|
williamr@2
|
448 |
@publishedPartner
|
williamr@2
|
449 |
@prototype
|
williamr@2
|
450 |
*/
|
williamr@2
|
451 |
enum TRedEyeReduction
|
williamr@2
|
452 |
{
|
williamr@2
|
453 |
/** Not Supported. */
|
williamr@2
|
454 |
ERedEyeReductionNone =0x00,
|
williamr@2
|
455 |
/** Software based Red Eye Reduction can be switched off(disabled). */
|
williamr@2
|
456 |
ERedEyeReductionSwitchOff =0x01,
|
williamr@2
|
457 |
/** Software based Red Eye Reduction can be switched on (enabled). */
|
williamr@2
|
458 |
ERedEyeReductionManualSwitchOn =0x02,
|
williamr@2
|
459 |
/** Software based Red Eye Reduction can be put to auto mode. */
|
williamr@2
|
460 |
ERedEyeReductionSwitchAuto =0x04
|
williamr@2
|
461 |
};
|
williamr@2
|
462 |
|
williamr@2
|
463 |
/**
|
williamr@2
|
464 |
Color operation capabilities characterizing both color swap and color accent feature
|
williamr@2
|
465 |
|
williamr@2
|
466 |
*/
|
williamr@2
|
467 |
class TColorOperationCapabilities
|
williamr@2
|
468 |
{
|
williamr@2
|
469 |
public:
|
williamr@2
|
470 |
/**
|
williamr@2
|
471 |
Constructor.
|
williamr@2
|
472 |
Sets the size of this class in iSize.
|
williamr@2
|
473 |
*/
|
williamr@2
|
474 |
IMPORT_C TColorOperationCapabilities();
|
williamr@2
|
475 |
|
williamr@2
|
476 |
IMPORT_C TInt Size() const;
|
williamr@2
|
477 |
IMPORT_C TUint Version() const;
|
williamr@2
|
478 |
|
williamr@2
|
479 |
private:
|
williamr@2
|
480 |
//for future expansion
|
williamr@2
|
481 |
TUint iSize:24;
|
williamr@2
|
482 |
TUint iVersion:8;
|
williamr@2
|
483 |
|
williamr@2
|
484 |
// reserved for future expansion
|
williamr@2
|
485 |
TInt iReserved;
|
williamr@2
|
486 |
|
williamr@2
|
487 |
public:
|
williamr@2
|
488 |
/** The source color representation that the server supports.
|
williamr@2
|
489 |
The supported representations are held as a bitwise logical OR of the relevant individual modes
|
williamr@2
|
490 |
defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. */
|
williamr@2
|
491 |
TUint iSupportedSourceRepresentation;
|
williamr@2
|
492 |
|
williamr@2
|
493 |
/** The target color representation that the server supports.
|
williamr@2
|
494 |
The supported representations are held as a bitwise logical OR of the relevant individual modes
|
williamr@2
|
495 |
defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation.
|
williamr@2
|
496 |
Not applicable for color accent */
|
williamr@2
|
497 |
TUint iSupportedTargetRepresentation;
|
williamr@2
|
498 |
|
williamr@2
|
499 |
/** The source color Rgb grouping modes that the server supports.
|
williamr@2
|
500 |
The modes are held as a bitwise logical OR of the relevant individual modes
|
williamr@2
|
501 |
defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. */
|
williamr@2
|
502 |
TUint iSupportedSourceRgbGroupingMode;
|
williamr@2
|
503 |
|
williamr@2
|
504 |
/** The target color Rgb grouping modes that the server supports.
|
williamr@2
|
505 |
The modes are held as a bitwise logical OR of the relevant individual modes
|
williamr@2
|
506 |
defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode.
|
williamr@2
|
507 |
Not applicable for color accent */
|
williamr@2
|
508 |
TUint iSupportedTargetRgbGroupingMode;
|
williamr@2
|
509 |
|
williamr@2
|
510 |
/** This indicates whether the mapping mode and Rgb grouping mode uniform for every color entry */
|
williamr@2
|
511 |
TBool iIsCapabilityUniform;
|
williamr@2
|
512 |
};
|
williamr@2
|
513 |
|
williamr@2
|
514 |
/**
|
williamr@2
|
515 |
Class used to control the number of bits to ignore for Red, Green, Blue or Alpha.
|
williamr@2
|
516 |
This may be used when deciding for neighbourhood for source color in case of color swap and color accent feature
|
williamr@2
|
517 |
|
williamr@2
|
518 |
*/
|
williamr@2
|
519 |
class TBitsIgnore
|
williamr@2
|
520 |
{
|
williamr@2
|
521 |
public:
|
williamr@2
|
522 |
/**
|
williamr@2
|
523 |
Constructor.
|
williamr@2
|
524 |
Sets the size of this class in iSize.
|
williamr@2
|
525 |
*/
|
williamr@2
|
526 |
IMPORT_C TBitsIgnore();
|
williamr@2
|
527 |
|
williamr@2
|
528 |
IMPORT_C TInt Size() const;
|
williamr@2
|
529 |
IMPORT_C TUint Version() const;
|
williamr@2
|
530 |
|
williamr@2
|
531 |
private:
|
williamr@2
|
532 |
//for future expansion
|
williamr@2
|
533 |
TUint iSize:24;
|
williamr@2
|
534 |
TUint iVersion:8;
|
williamr@2
|
535 |
|
williamr@2
|
536 |
// for future use
|
williamr@2
|
537 |
TUint iReservedBits:16;
|
williamr@2
|
538 |
|
williamr@2
|
539 |
public:
|
williamr@2
|
540 |
/** This gives the no. of bits to ignore for Red color. Varies from 0 to 8.
|
williamr@2
|
541 |
Any other value should be an error */
|
williamr@2
|
542 |
TUint iRedBitsIgnore:4;
|
williamr@2
|
543 |
|
williamr@2
|
544 |
/** This gives the no. of bits to ignore for Green color. Varies from 0 to 8.
|
williamr@2
|
545 |
Any other value should be an error */
|
williamr@2
|
546 |
TUint iGreenBitsIgnore:4;
|
williamr@2
|
547 |
|
williamr@2
|
548 |
/** This gives the no. of bits to ignore for Blue color. Varies from 0 to 8.
|
williamr@2
|
549 |
Any other value should be an error */
|
williamr@2
|
550 |
TUint iBlueBitsIgnore:4;
|
williamr@2
|
551 |
|
williamr@2
|
552 |
/** This gives the no. of bits to ignore for Alpha. Varies from 0 to 8.
|
williamr@2
|
553 |
Any other value should be an error */
|
williamr@2
|
554 |
TUint iAlphaBitsIgnore:4;
|
williamr@2
|
555 |
};
|
williamr@2
|
556 |
|
williamr@2
|
557 |
/**
|
williamr@2
|
558 |
Color operation parameters characterizing both color swap and color accent feature; and for a particular entry.
|
williamr@2
|
559 |
|
williamr@2
|
560 |
*/
|
williamr@2
|
561 |
class TColorOperationEntry
|
williamr@2
|
562 |
{
|
williamr@2
|
563 |
public:
|
williamr@2
|
564 |
/**
|
williamr@2
|
565 |
Constructor.
|
williamr@2
|
566 |
Sets the size of this class in iSize.
|
williamr@2
|
567 |
*/
|
williamr@2
|
568 |
IMPORT_C TColorOperationEntry();
|
williamr@2
|
569 |
|
williamr@2
|
570 |
IMPORT_C TInt Size() const;
|
williamr@2
|
571 |
IMPORT_C TUint Version() const;
|
williamr@2
|
572 |
|
williamr@2
|
573 |
private:
|
williamr@2
|
574 |
//for future expansion
|
williamr@2
|
575 |
TUint iSize:24;
|
williamr@2
|
576 |
TUint iVersion:8;
|
williamr@2
|
577 |
|
williamr@2
|
578 |
// reserved for future expansion
|
williamr@2
|
579 |
TInt iReserved;
|
williamr@2
|
580 |
|
williamr@2
|
581 |
public:
|
williamr@2
|
582 |
/** The source color (rgb triplet) which is changed to target color in case of Color Swap operation
|
williamr@2
|
583 |
and remains unaffected in case of Color Accent operation */
|
williamr@2
|
584 |
TRgb iSourceColor;
|
williamr@2
|
585 |
|
williamr@2
|
586 |
/** The target color (rgb triplet) which replaces the source color in case of Color Swap operation.
|
williamr@2
|
587 |
Redundant for Color Accent operation */
|
williamr@2
|
588 |
TRgb iTargetColor;
|
williamr@2
|
589 |
|
williamr@2
|
590 |
/** This defines whether the given source color represents itself or a group of colors */
|
williamr@2
|
591 |
TColorOperationRepresentation iSourceColorRepresentation;
|
williamr@2
|
592 |
|
williamr@2
|
593 |
/** This defines whether the given target color represents itself or a group of colors in case of
|
williamr@2
|
594 |
Color Swap operation. Redundant for Color Accent operation */
|
williamr@2
|
595 |
TColorOperationRepresentation iTargetColorRepresentation;
|
williamr@2
|
596 |
|
williamr@2
|
597 |
/** This defines the type of grouping for multiple representation of source color */
|
williamr@2
|
598 |
TColorOperationRgbGroupingMode iColorOperationSourceRgbGroupingMode;
|
williamr@2
|
599 |
|
williamr@2
|
600 |
/** This defines the type of grouping for multiple representation of target color in case of
|
williamr@2
|
601 |
Color Swap operation. Redundant for Color Accent operation */
|
williamr@2
|
602 |
TColorOperationRgbGroupingMode iColorOperationTargetRgbGroupingMode;
|
williamr@2
|
603 |
|
williamr@2
|
604 |
/** This gives the number of bits to ignore in case ERgbGroupingSignificantBits is used for
|
williamr@2
|
605 |
multiple representation of source color. For any other case, no. of bits ignored for red, green,
|
williamr@2
|
606 |
blue or alpha should be 0 */
|
williamr@2
|
607 |
TBitsIgnore iNumBitsIgnored;
|
williamr@2
|
608 |
|
williamr@2
|
609 |
/** This gives the entry status of every color operation entry. If entry is not set or removed,
|
williamr@2
|
610 |
this is ENotActive. And if entry is set, then this is EDiscreteSteps */
|
williamr@2
|
611 |
TValueInfo iEntryStatus;
|
williamr@2
|
612 |
};
|
williamr@2
|
613 |
|
williamr@2
|
614 |
public:
|
williamr@2
|
615 |
|
williamr@2
|
616 |
IMPORT_C static CCameraImageProcessing* NewL(CCamera& aCamera);
|
williamr@2
|
617 |
|
williamr@2
|
618 |
IMPORT_C static CCameraImageProcessing* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory);
|
williamr@2
|
619 |
|
williamr@2
|
620 |
IMPORT_C void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const;
|
williamr@2
|
621 |
|
williamr@2
|
622 |
IMPORT_C void GetActiveTransformationsL(RArray<TUid>& aTransformations) const;
|
williamr@2
|
623 |
|
williamr@2
|
624 |
IMPORT_C void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const;
|
williamr@2
|
625 |
|
williamr@2
|
626 |
IMPORT_C TInt TransformationValue(TUid aTransformation) const;
|
williamr@2
|
627 |
|
williamr@2
|
628 |
IMPORT_C TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const;
|
williamr@2
|
629 |
|
williamr@2
|
630 |
IMPORT_C void SetTransformationValue(TUid aTransformation, TInt aValue);
|
williamr@2
|
631 |
|
williamr@2
|
632 |
IMPORT_C void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const;
|
williamr@2
|
633 |
|
williamr@2
|
634 |
IMPORT_C void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence);
|
williamr@2
|
635 |
|
williamr@2
|
636 |
IMPORT_C void SetSourceRect(const TRect& aRect);
|
williamr@2
|
637 |
|
williamr@2
|
638 |
IMPORT_C void GetSourceRect(TRect& aRect) const;
|
williamr@2
|
639 |
|
williamr@2
|
640 |
IMPORT_C ~CCameraImageProcessing();
|
williamr@2
|
641 |
|
williamr@2
|
642 |
IMPORT_C void GetConcurrentColorSwappingsSupportedL(TInt& aConcurrentColorSwappingSupported) const;
|
williamr@2
|
643 |
|
williamr@2
|
644 |
IMPORT_C void GetColorSwapCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorSwapCapabilities) const;
|
williamr@2
|
645 |
|
williamr@2
|
646 |
IMPORT_C void SetColorSwapEntryL(TInt aIndex, const TColorOperationEntry& aColorSwapParameters);
|
williamr@2
|
647 |
|
williamr@2
|
648 |
IMPORT_C void RemoveColorSwapEntryL(TInt aIndex);
|
williamr@2
|
649 |
|
williamr@2
|
650 |
IMPORT_C void GetColorSwapEntryL(TInt aIndex, TColorOperationEntry& aColorSwapParameters) const;
|
williamr@2
|
651 |
|
williamr@2
|
652 |
IMPORT_C void StartColorSwappingL();
|
williamr@2
|
653 |
|
williamr@2
|
654 |
IMPORT_C void CancelColorSwappingL();
|
williamr@2
|
655 |
|
williamr@2
|
656 |
IMPORT_C void GetConcurrentColorAccentSupportedL(TInt& aConcurrentColorAccentSupported) const;
|
williamr@2
|
657 |
|
williamr@2
|
658 |
IMPORT_C void GetColorAccentCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorAccentCapabilities) const;
|
williamr@2
|
659 |
|
williamr@2
|
660 |
IMPORT_C void SetColorAccentEntryL(TInt aIndex, const TColorOperationEntry& aColorAccentParameters);
|
williamr@2
|
661 |
|
williamr@2
|
662 |
IMPORT_C void RemoveColorAccentEntryL(TInt aIndex);
|
williamr@2
|
663 |
|
williamr@2
|
664 |
IMPORT_C void GetColorAccentEntryL(TInt aIndex, TColorOperationEntry& aColorAccentParameters) const;
|
williamr@2
|
665 |
|
williamr@2
|
666 |
IMPORT_C void StartColorAccentL();
|
williamr@2
|
667 |
|
williamr@2
|
668 |
IMPORT_C void CancelColorAccentL();
|
williamr@2
|
669 |
|
williamr@2
|
670 |
IMPORT_C void GetSupportedRelativeOrientationOptionsL(TOrientationReference aOrientationReference,
|
williamr@2
|
671 |
TUint& aSupportedRelativeRotation, TUint& aSupportedRelativeMirroring, TUint& aSupportedRelativeFlipping) const;
|
williamr@2
|
672 |
|
williamr@2
|
673 |
IMPORT_C void GetCurrentRelativeOrientationOptionsL(TOrientationReference& aOrientationReference,
|
williamr@2
|
674 |
TRelativeRotation& aRelativeRotation, TRelativeMirror& aRelativeMirror, TRelativeFlipping& aRelativeFlipping) const;
|
williamr@2
|
675 |
|
williamr@2
|
676 |
IMPORT_C void SetRelativeOrientationOptionsL(TOrientationReference aOrientationReference,
|
williamr@2
|
677 |
TRelativeRotation aRelativeRotation, TRelativeMirror aRelativeMirror, TRelativeFlipping aRelativeFlipping);
|
williamr@2
|
678 |
|
williamr@2
|
679 |
private:
|
williamr@2
|
680 |
CCameraImageProcessing(CCamera& aOwner);
|
williamr@2
|
681 |
void ConstructL();
|
williamr@2
|
682 |
void ConstructL(const MImplementationFactory& aImplFactory);
|
williamr@2
|
683 |
|
williamr@2
|
684 |
private:
|
williamr@2
|
685 |
CCamera& iOwner;
|
williamr@2
|
686 |
MCameraImageProcessing* iImpl; // not owned
|
williamr@2
|
687 |
MCameraImageProcessing2* iImpl2; //not owned
|
williamr@2
|
688 |
MCameraImageProcessing3* iImpl3; //not owned
|
williamr@2
|
689 |
};
|
williamr@2
|
690 |
#endif//ECAMIMAGEPROCESSING_H
|
williamr@4
|
691 |
|
williamr@4
|
692 |
|
williamr@4
|
693 |
|