android-Camera.Area
2016-06-28 13:57
483 查看
Camera.Area
public static class Camera.Area
extends Object
java.lang.Object | |
↳ | android.hardware.Camera.Area |
We recommend using the new
android.hardware.camera2API for new applications.
The Area class is used for choosing specific metering and focus areas for the camera to use when calculating auto-exposure, auto-white balance, and auto-focus.类是用于选择特定的计量和重点领域的相机使用计算自动曝光模式时,自动白平衡,自动对焦。
To find out how many simultaneous areas a given camera supports, use
getMaxNumMeteringAreas()and
getMaxNumFocusAreas().
If metering or focusing area selection is unsupported, these methods will return 0.找出多少同时给定相机支持领域,使用getMaxNumMeteringAreas()和getMaxNumFocusAreas()。如果计量或重点区域选择是不支持的,这些方法将返回0。
Each Area consists of a rectangle specifying its bounds, and a weight that determines its importance. The bounds are relative to the camera's current field of view. The coordinates are mapped so that (-1000, -1000) is always the top-left corner of the current
field of view, and (1000, 1000) is always the bottom-right corner of the current field of view. Setting Areas with bounds outside that range is not allowed. Areas with zero or negative width or height are not allowed.每个区域由一个矩形指定范围,和重量决定了它的重要性。范围是相对于当前视场相机的。坐标映射,以便(-1000、-1000)总是左上角的当前的视野,和(1000、1000)总是当前视场的右下角。设置边界范围之外的地区是不允许的。地区零或消极的宽度或高度是不允许的。
The weight must range from 1 to 1000, and represents a weight for every pixel in the area. This means that a large metering area with the same weight as a smaller area will have more effect in the metering result. Metering areas can overlap and the driver will
add the weights in the overlap region.重量必须从1到1000,代表了每个像素的重量。这意味着一个大计量领域相同的体重较小的区域计量结果将会有更多的影响。计量领域可以重叠,传感器将重叠区域的权重。
See also:
setFocusAreas(List)
getFocusAreas()
getMaxNumFocusAreas()
setMeteringAreas(List)
getMeteringAreas()
getMaxNumMeteringAreas()
Summary
| |
---|---|
publicRect | rect Bounds of the area.范围的区域。 |
public int | weight Weight of the area.区域的Weight。 |
|
---|
Camera.Area(Rect rect, int weight) Create an area with specified rectangle and weight.创建一个与指定的矩形面积和权重。 |
| |
---|---|
boolean | equals(Object obj) Compares objto this area. |
|
---|
From class java.lang.Object |
Fields
rect
Added in API level 14Rect rect
Bounds of the area. (-1000, -1000) represents the top-left of the camera field of view, and (1000, 1000) represents the bottom-right of the field of view. Setting bounds outside that range is not allowed. Bounds
with zero or negative width or height are not allowed.
See also:
getFocusAreas()
getMeteringAreas()
weight
Added in API level 14int weight
Weight of the area. The weight must range from 1 to 1000, and represents a weight for every pixel in the area. This means that a large metering area with the same weight as a smaller area will have more effect in
the metering result. Metering areas can overlap and the driver will add the weights in the overlap region.
See also:
getFocusAreas()
getMeteringAreas()
Public constructors
Camera.Area
Added in API level 14Camera.Area (Rect rect, int weight)
Create an area with specified rectangle and weight.
Parameters | |
---|---|
rect | Rect: the bounds of the area. |
weight | int: the weight of the area. |
Public methods
equals
Added in API level 14boolean equals (Object obj)
Compares
objto this area.
Parameters | |
---|---|
obj | Object: the object to compare this area with. |
Returns | |
---|---|
boolean | trueif the rectangle and weight of objis the same as those of this area. falseotherwise. |
相关文章推荐
- android 设置新手引导
- Android_library导出aar
- Scrollview子View为LinearLayout不够一屏留白情况
- Android inputType ,软键盘输入类型
- Android自动填写获取到的验证码
- Android Timer使用的异常:java.lang.IllegalStateException: Timer was canceled
- 获取到Android控件的高度
- 自定义圆形进度条,金额百分比
- 创建、配置Service
- android-android.graphics.Camera
- Android图片特效:黑白特效、圆角效果、高斯模糊
- Android Studio 笔记之SexyEditor,设置背景
- 关于对Android的videoView和mediaController的吐槽
- Android 软键盘属性
- android 两个应用之间的通信与调用
- Android 用HorizontalScrollView实现滑动标签tabView
- 使用 Intel HAXM 为 Android 模拟器加速,媲美真机
- android开发—第一步:android开发环境搭建
- 如何获取Android系统中申请对象的信息
- Android开发-layout布局相关属性总结