Image capture: Nokia N95 (keywords: camera, still image, format, size, size index, PrepareImageCaptureL, TCameraInfo)

Login to reply to this topic.
Thu, 2008-02-21 02:59
Joined: 2008-01-16
Forum posts: 1

In order to use high quality visual features (e.g. for text recognition) one should use image capture as opposed to video
or view finder frames. The reasons for that is a possibility for a better focus, higher resolution, using flash and
advanced image processing features available.

Before one initializes Image Capture in PowerOnComplete() function a proper combination of format and size index
should be known. Below is the table with accessible frame formats and resolutions for Nokia N95 phone (see
CCamera class).

For example, a maximum resolution available is 5M which corresponds to 2592x1944 pixels,
size index=0, fromat = EFormatExif (JPEG). However a good compromise between speed and resolution can be achieved
even with 1024x768 (size index 3) in 16 million colors format (EFormatFbsBitmapColor16M).

Table 1. Formats and resolution for frames in still image mode on Nokia N95. The data in the table correspond to
the size index (see code below)


Format / Resolution (index) 2592x1944 (0), 2048x1536 (1), 1600x1200 (2), 1024x768 (3), 640x480 (4)

-----------------------------------------------------------------------------------------------------------------------------------------------------------

EFormatExif (JPEG) 0, 1, 2, 3, 4

EFormatFbsBitmapColor4K - - - 3, 4

EFormatFbsBitmapColor64K - - - 3, 4

EFormatFbsBitmapColor16M - - - 3, 4
------------------------------------------------------------------------------------------------------------------------------------------------------------

The code below checks a combination of format and sizes:

// pick up a format you are interested in
CCamera::TFormat format = CCamera::EFormatFbsBitmapColor16M;

// get information about the camera
TCameraInfo aInfo;
iCamera->CameraInfo(aInfo);
TInt cc = aInfo.iNumImageSizesSupported;
TSize size[6];

// all non-zero sizes returned are supported for the format specified
for (TInt i=0; i < cc; i++)
{
iCamera->EnumerateCaptureSizes(size[i], i, format);
}

// now to use the format/size, say, 16M/1024x768 call in PowerOnComplete()
TRAPD(err, iCamera->PrepareImageCaptureL(CCamera::EFormatFbsBitmapColor16M, 3));
Cool


Best regards,

Vladimir

  • Login to reply to this topic.