在调试的时候利用下面这个函数将 Camera AP 部分所设置的参数全部 dump 出来了,真是多啊!
这里仅限于 MTK 平台,MTK 自己在相机这块添加了许多功能,所以看起来就有一大堆的参数。
调用此 dumpParameters() 函数可以打印出所有相机的参数出来。
public static void dumpParameters (Parameters parameters) {
String flattened = parameters. flatten();
StringTokenizer tokenizer = new StringTokenizer(flattened, ";" );
Log.d(TAG , "Dump all camera parameters:" );
while (tokenizer.hasMoreElements()) {
Log. d(TAG, tokenizer.nextToken());
}
}
相机参数简单介绍:
D/CAM_Util(25287): Dump all camera parameters:
D/CAM_Util(25287): zoom=0 //变焦参数,为0表示未变焦
D/CAM_Util(25287): fb-smooth-level-max=4 // 磨皮等级设置,最高为4级
D/CAM_Util(25287): max-num-detected-faces-hw=15 //硬件支持的最多可以检测人脸张数 15张
D/CAM_Util(25287): cap-mode=normal //拍照模式
D/CAM_Util(25287): aflamp-mode-values=off,on,auto //暂时不知道
D/CAM_Util(25287): whitebalance=auto //白平衡参数,自动白平衡
D/CAM_Util(25287): afeng-min-focus-step=0 //暂时未知
D/CAM_Util(25287): preview-format-values=yuv420sp,yuv420p,yuv420i-yyuvyy-3plane //预览数据格式
D/CAM_Util(25287): rotation=0 //预览数据旋转角度
D/CAM_Util(25287): jpeg-thumbnail-quality=100 //照片缩略图压缩比
D/CAM_Util(25287): preview-format=yuv420sp //当前预览数据格式
D/CAM_Util(25287): iso-speed=auto //iso设置,当前是自动iso
D/CAM_Util(25287): flash-mode-values=off,on,auto,red-eye,torch //闪光灯各项设置值
D/CAM_Util(25287): hue-values=low,middle,high //色度设置值
D/CAM_Util(25287): aflamp-mode=off //暂时未知
D/CAM_Util(25287): cshot-indicator-supported=true //暂时未知
D/CAM_Util(25287): preview-frame-rate=30 //当前预览帧率
D/CAM_Util(25287): jpeg-thumbnail-width=160 //照片缩略图宽度为 160个像素
D/CAM_Util(25287): video-size=640x480 //当前录像尺寸
D/CAM_Util(25287): scene-mode-values=auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,hdr //当前支持的场景模式
D/CAM_Util(25287): preview-fps-range-values=(5000,60000) //暂时未知
D/CAM_Util(25287): contrast-values=low,middle,high //当前支持的对比度设置
D/CAM_Util(25287): preview-size-values=176x144,320x240,352x288,480x320,480x368,640x480,720x480,800x480,800x600,864x480,960x540,1280x720,1920x1080 //当前支持的拍照预览尺寸
D/CAM_Util(25287): preview-fps-range=5000,60000 //当前未知
D/CAM_Util(25287): min-exposure-compensation=-12 //最小曝光补偿设置值
D/CAM_Util(25287): antibanding=50hz //防牛顿环频率设置
D/CAM_Util(25287): max-num-focus-areas=1 //最大支持的对焦区域,为1表示只支持单点对焦
D/CAM_Util(25287): vertical-view-angle=49 //暂时未知
D/CAM_Util(25287): fb-smooth-level-min=-4 //人脸美化平滑等级最小值
D/CAM_Util(25287): fb-skin-color=0 //人脸美化皮肤颜色设置值
D/CAM_Util(25287): video-stabilization-supported=true //是否支持视频防抖
D/CAM_Util(25287): brightness_value=-34 //拍照亮度设置
D/CAM_Util(25287): saturation-values=low,middle,high //饱和度设置
D/CAM_Util(25287): eng-flash-duty-value=-1 //暂时未知
D/CAM_Util(25287): edge=middle //暂时未知
D/CAM_Util(25287): picture-format-values=jpeg //照片压缩格式
D/CAM_Util(25287): iso-speed-values=auto,100,200,400,800,1600 //当前支持的iso设置值
D/CAM_Util(25287): exposure-compensation-step=0.25 //曝光补偿步径值
D/CAM_Util(25287): eng-flash-duty-min=0 //暂时未知
D/CAM_Util(25287): picture-size=4160x3120 //当前设置的照片尺寸
D/CAM_Util(25287): saturation=middle //饱和度
D/CAM_Util(25287): whitebalance-values=auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight,twilight,shade //当前支持的白平衡设置
D/CAM_Util(25287): picture-format=jpeg //图片格式
D/CAM_Util(25287): cshot-indicator=true //暂时未知
D/CAM_Util(25287): afeng-max-focus-step=0 //暂时未知
D/CAM_Util(25287): preferred-preview-size-for-video=1920x1080 //推荐的视频录制尺寸
D/CAM_Util(25287): hue=middle //色度
D/CAM_Util(25287): recording-hint=true //录像指示器
D/CAM_Util(25287): eng-focus-fullscan-frame-interval-max=65535 //暂时未知
D/CAM_Util(25287): video-stabilization=false //是否开启录像防抖
D/CAM_Util(25287): zoom-supported=true //是否支持变焦
D/CAM_Util(25287): fb-smooth-level=0 //当前人脸美化平滑等级最小值
D/CAM_Util(25287): fb-sharp=0 //人脸美化锐度
D/CAM_Util(25287): contrast=middle //对比度
D/CAM_Util(25287): scene-mode=auto //场景模式为自动
D/CAM_Util(25287): jpeg-quality=100 //照片压缩比例为100%,即为未压缩
D/CAM_Util(25287): burst-num=1 //当前拍摄张数
D/CAM_Util(25287): eng-flash-duty-max=9 //暂时未知
D/CAM_Util(25287): video-size-values=176x144,480x320,640x480,864x480,1280x720,1920x1080 //当前支持的录像尺寸
D/CAM_Util(25287): preview-size=800x600 //录像预览尺寸
D/CAM_Util(25287): focal-length=3.5 //镜头焦距
D/CAM_Util(25287): eng-focus-fullscan-frame-interval-min=0 //暂时未知
D/CAM_Util(25287): cap-mode-values=normal,face_beauty,continuousshot,smileshot,autorama,mav,asd,motiontrack //当前平台支持的拍照模式
D/CAM_Util(25287): preview-frame-rate-values=15,24,30 //当前平台支持的预览帧率 fps
D/CAM_Util(25287): max-num-metering-areas=9 //当前平台支持的最大测光区域为9块
D/CAM_Util(25287): fb-sharp-max=4 //人脸美化锐度最大值
D/CAM_Util(25287): sensor-type=252 //传感器类型
D/CAM_Util(25287): focus-mode-values=auto,macro,infinity,continuous-picture,continuous-video,manual,fullscan
//当前平台支持的对焦模式
D/CAM_Util(25287): fb-sharp-min=-4 //人脸美化锐度最小值
D/CAM_Util(25287): jpeg-thumbnail-size-values=0x0,160x128,320x240 //当前平台支持的照片缩略图尺寸
D/CAM_Util(25287): zoom-ratios=100,114,132,151,174,200,229,263,303,348,400 //当前平台支持的变焦比例,最大4倍
D/CAM_Util(25287): picture-size-values=320x240,640x480,1024x768,1280x720,1280x768,1280x960,1600x1200,1920x1088,2048x1536,2560x1440,2560x1920,3264x2448,3328x1872,2880x1728,3600x2160,4096x2304,4096x3072,4160x3120 //当前摄像头支持的所有拍照尺寸
D/CAM_Util(25287): edge-values=low,middle,high //暂时未知
D/CAM_Util(25287): horizontal-view-angle=61 //暂时未知
D/CAM_Util(25287): brightness=middle //亮度设置
D/CAM_Util(25287): jpeg-thumbnail-height=128 //照片缩略图高 128pixel
D/CAM_Util(25287): eng-flash-step-max=0 //暂时未知
D/CAM_Util(25287): doc_level=-1 //自定义参数,美颜等级
D/CAM_Util(25287): smooth-zoom-supported=true //是否支持平滑变焦
D/CAM_Util(25287): capfname=/sdcard/DCIM/cap00 //暂时未知,貌似是照片存储路径
D/CAM_Util(25287): zsd-mode=off //零秒快拍模式是否有开启
D/CAM_Util(25287): focus-mode=auto //对焦模式,auto表示自动对焦
D/CAM_Util(25287): fb-skin-color-max=4 //人脸美化皮肤颜色最大值
D/CAM_Util(25287): auto-whitebalance-lock-supported=true //自动白平衡锁定支持
D/CAM_Util(25287): fb-skin-color-min=-4 //人脸美化皮肤颜色最小值
D/CAM_Util(25287): video-frame-format=yuv420p //录像数据格式
D/CAM_Util(25287): max-num-detected-faces-sw=0 //软件检测到的人脸张数,0表示未检测到
D/CAM_Util(25287): max-exposure-compensation=12 //最大曝光补偿等级
D/CAM_Util(25287): max-num-ot=1 //暂时未知
D/CAM_Util(25287): video-snapshot-supported=true //录像的时候是否支持拍照
D/CAM_Util(25287): exposure-compensation=0 //当前曝光补偿值
D/CAM_Util(25287): brightness-values=low,middle,high //亮度设置值
D/CAM_Util(25287): flash-mode=off //闪光灯设置 -关
D/CAM_Util(25287): effect-values=none,mono,negative,sepia,aqua,whiteboard,blackboard //当前平台支持的滤镜设置
D/CAM_Util(25287): eng-flash-step-min=0 //暂时未知
D/CAM_Util(25287): max-zoom=10 //最大变焦倍数 ?
D/CAM_Util(25287): effect=none //当前未开启任何滤镜效果
D/CAM_Util(25287): focus-distances=0.95,1.9,Infinity //对焦距离 ?
D/CAM_Util(25287): mtk-cam-mode=0 //相机模式设置
D/CAM_Util(25287): zsd-mode-values=off,on //零秒快拍设置值
D/CAM_Util(25287): auto-exposure-lock-supported=true //是否支持自动曝光锁定
D/CAM_Util(25287): antibanding-values=off,50hz,60hz,auto //防牛顿环频率设置
今天看到android developer 网页上也有介绍相机部分的相关参数和标准接口,附上链接如下:
http://developer.android.com/reference/android/hardware/Camera.Parameters.html
转自: http://blog.csdn.net/fulinwsuafcie/article/details/19133299