微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > Symbian 摄像头编程预研

Symbian 摄像头编程预研

时间:10-08 来源:互联网 点击:

ch = 0x0040,

/** User configurable mode */

EWBManual = 0x0080

};

具体不做展开,可以通过调用CCamera::WhiteBalance和CCamera::SetWhiteBalanceL两个方法来进行对白平衡参数的获取和设置。

焦距(放大倍数)

在CameraInfo里面涉及焦距的参数真不少,iMinZoom、iMaxZoom、iMaxDigitalZoom、iMinZoomFactor、iMaxZoomFactor、iMaxDigitalZoomFactor

这几个参数值其实很困惑我的,特别是iMaxDigitalZoom,不知道是干嘛用的,这个值只能先不管了。根据CCamer提供了四个关于Zoom的如下四个函数

/**

Sets the digital zoom factor.

This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom inclusive.

May leave with KErrNotSupported if the zoom factor is out of range.

@param aDigitalZoomFactor

The required digital zoom factor.

*/

virtual void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0)=0;

/**

Gets the currently set digital zoom factor.

@return The currently set digital zoom factor.

*/

virtual TInt DigitalZoomFactor() const=0;

/**

Sets the zoom factor.

This must be in the range of TCameraInfo::iMinZoom to TCameraInfo::iMaxZoom

inclusive. May leave with KErrNotSupported if the specified zoom factor is

out of range.

@param aZoomFactor

Required zoom factor.

*/

virtual void SetZoomFactorL(TInt aZoomFactor = 0)=0;

/**

Gets the currently set zoom factor.

@return The currently set zoom factor.

*/

virtual TInt ZoomFactor() const=0;

可以猜测分别表示数码变焦和光学变焦。

另外,经过对N81和E71的参数比较,N81的iMaxDigitalZoomFactor是20.0,而E71是4.0,正好对应N81的20倍数码变焦,E71的4倍数码变焦。因为很多手机摄像头镜头都不支持光学变焦,所以在这里对我们有用的也就是只需要通过DigitalZoomFactor和 SetDigitalZoomFactorL两个函数在iMaxDigitalZoomFactor范围内设置数码变焦值就可以了。

图像格式和图像尺寸参数

iImageFormatsSupported和iNumImageSizesSupported两个参数分别用以表明摄像头拍照时所支持的图像格式和图像尺寸数量,具体支持的图像格式如下枚举值定义

enum TFormat

{

/** 8 bit greyscale values, 0=black, 255=white. */

EFormatMonochrome = 0x0001,

/** Packed RGB triplets, 4 bits per pixel with red in the least significant bits

and the 4 most significant bits unused. */

EFormat16bitRGB444 = 0x0002,

/** Packed RGB triplets, 5 bits per pixel for red and blue and 6 bits for green,

with red in the least significant bits. */

EFormat16BitRGB565 = 0x0004,

/** Packed RGB triplets, 8 bits per pixel with red in the least significant bits

and the 8 most significant bits unused. */

EFormat32BitRGB888 = 0x0008,

/** JFIF JPEG. */

EFormatJpeg = 0x0010,

/** EXIF JPEG */

EFormatExif = 0x0020,

/** CFbsBitmap object with display mode EColor4K. */

EFormatFbsBitmapColor4K = 0x0040,

/** CFbsBitmap object with display mode EColor64K. */

EFormatFbsBitmapColor64K = 0x0080,

/** CFbsBitmap object with display mode EColor16M. */

EFormatFbsBitmapColor16M = 0x0100,

/** Implementation dependent. */

EFormatUserDefined = 0x0200,

/** 4:2:0 format, 8 bits per sample, Y00Y01Y10Y11UV. */

EFormatYUV420Interleaved = 0x0400,

/** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0...V0... */

EFormatYUV420Planar = 0x0800,

/** 4:2:2 format, 8 bits per sample, UY0VY1. */

EFormatYUV422 = 0x1000,

/** 4:2:2 format, 8 bits per sample, Y1VY0U. */

EFormatYUV422Reversed = 0x2000,

/** 4:4:4 format, 8 bits per sample, Y00U00V00 Y01U01V01... */

EFormatYUV444 = 0x4000,

/** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0V0... */

EFormatYUV420SemiPlanar = 0x8000,

/** CFbsBitmap object with display mode EColor16MU. */

EFormatFbsBitmapColor16MU = 0x00010000

};

因为N81主摄像头的iImageFormatsSupported值为480(也即0x01E0),所以支持的格式为EFormatExif、EFormatFbsBitmapColor4K、 EFormatFbsBitmapColor64K和 EFormatFbsBitmapColor16M四种。

每一种格式又有对应的各种不同的尺寸,而具体支持的尺寸数则有iNumImageSizesSupported来限定,如上N81的iNumImageSizes

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top