文档管理中心
API参考相机能力com.huawei.camera.camerakitClass SummaryRequestKey

RequestKey

展开

Class Info

定义模式中允许设置的参数。

一般而言,完整的工作流分为下面几步:

通过ModeCharacteristics.getSupportedParameters() 获取当前模式支持的所有的可设置的参数,这个方法返回的参数列表中的值都会定义在RequestKey

开发者也可以通过ModeCharacteristics.getParameterRange(CaptureRequest.Key)传入指定的参数来查询当前参数支持的取值范围,如果返回值是长度为0的列表,说明这个参数在当前模式下不支持。比如想要查询滤镜是否支持ModeCharacteristics.getParameterRange(RequestKey.HW_FILTER_EFFECT)。

如果参数定义的类型是布尔型,比如HW_MIRROR, 通过上述Range查询的结果只会是元素为True,长度为1的列表。推荐采用ModeCharacteristics.getSupportedParameters()查询参数的设置只能通过通过Mode.setParameter(CaptureRequest.Key, Object)或是 Mode.setParameters(Map),需要注意参数可设置的值范围。详细方法可参考Mode

Since:

2019-06-28

Public Field Summary

展开

Modifier and Type

Field and Description

static android.hardware.camera2.CaptureRequest.Key<java.lang.Byte>

HW_AI_MOVIE

AI电影效果。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Float>

HW_APERTURE

设置大光圈功能的光圈值。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Float>

HW_EXPOSURE_COMPENSATION_VALUE

曝光补偿值下发。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Byte>

HW_FILTER_EFFECT

滤镜效果种类。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Integer>

HW_FILTER_LEVEL

滤镜效果的级别。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean>

HW_MIRROR

前置镜像翻转开关。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Byte>

HW_PORTRAIT_FAIRLIGHT

设置人像功能的人像光效。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Byte>

HW_PORTRAIT_SPOTS_BOKEH

设置人像功能的人像虚化程度。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Integer>

HW_PRO_AWB_TYPE

自动白平衡模式下发。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean>

HW_PRO_EXPOSURE_HINT

是否开启曝光提示。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Float>

HW_PRO_FOCUS_DISTANCE_VALUE

手动对焦下发。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Integer>

HW_PRO_MANUAL_WB_VALUE

手动白平衡范围。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Byte>

HW_PRO_METERING_VALUE

测光类型。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Integer>

HW_PRO_SENSOR_EXPOSURE_TIME_VALUE

曝光时长下发,下发时长是微秒数值下发的。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Integer>

HW_PRO_SENSOR_ISO_VALUE

感光度值下发。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean>

HW_SCENE_EFFECT_ENABLE

场景识别情况下:

  • 传入true表示确认当前场景识别结果,将打开底层对此场景的效果调整。
  • 传入false表示取消当前场景识别结果,在本次使用中将不再识别此场景。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean>

HW_SENSOR_HDR

硬件hdr开关。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Long>

HW_SUPER_NIGHT_EXPOSURE

设置超级夜景的手动曝光参数,单位纳秒,如果不设置或将该值设置为0,则使用自动曝光时长。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Long>

HW_SUPER_NIGHT_ISO

设置超级夜景功能的手动ISO参数,如果不设置或将该值设置为0,则使用自动ISO数值。

static android.hardware.camera2.CaptureRequest.Key<android.graphics.Rect>

HW_SUPER_SLOW_CHECK_AREA

超慢运动物体检测区域。

static android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean>

HW_VIDEO_STABILIZATION

设置视频模式下防抖功能是否开启。

Public Method Summary

展开

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Public Fields

HW_APERTURE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> HW_APERTURE

设置大光圈功能的光圈值。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PORTRAIT_FAIRLIGHT

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> HW_PORTRAIT_FAIRLIGHT

设置人像功能的人像光效。

一人像光像对场景有比较严格的限制,当前只有摄像头中只有一个位置距离合适的人脸时,拍摄的照片才会有效果。

如下场景可能会导致拍摄照片没有光效效果:

  • 预览人脸过近或者过远。
  • 预览人脸不完整。
  • 预览中多个人脸.

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map), Metadata.FairLightType

HW_PORTRAIT_SPOTS_BOKEH

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> HW_PORTRAIT_SPOTS_BOKEH

设置人像功能的人像虚化程度。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_SENSOR_HDR

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> HW_SENSOR_HDR

硬件hdr开关。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_MIRROR

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> HW_MIRROR

前置镜像翻转开关。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_AI_MOVIE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> HW_AI_MOVIE

AI电影效果。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map), Metadata.AiMovieEffectType

HW_FILTER_EFFECT

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> HW_FILTER_EFFECT

滤镜效果种类。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map), Metadata.FilterEffectType

HW_FILTER_LEVEL

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HW_FILTER_LEVEL

滤镜效果的级别.

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_SUPER_NIGHT_ISO

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> HW_SUPER_NIGHT_ISO

设置超级夜景功能的手动ISO参数,如果不设置或将该值设置为0,则使用自动ISO数值。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_SUPER_NIGHT_EXPOSURE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> HW_SUPER_NIGHT_EXPOSURE

设置超级夜景的手动曝光参数,单位纳秒,如果不设置或将该值设置为0,则使用自动曝光时长。

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_SUPER_SLOW_CHECK_AREA

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<android.graphics.Rect> HW_SUPER_SLOW_CHECK_AREA

超慢运动物体检测区域:

检测区域的坐标是基于中心坐标系,用户在设置之前需将正方形区域的坐标转化为中心坐标系;用户坐标系中, 使用的应当是以预览方向的左上角为顶点的坐标系,用户在此坐标系下构建一个边长为分辨率宽高较短边三分之 之一以上的正方形;在支持7680fps的手机上,支持边长比例范围是三分之一至一,其他机型建议用户只设置为三 分之一长度即可,多于和少于这个比例都会被矫正为三分之一若是下发了有效的检测区域即Mode.setParameter(CaptureRequest.Key, Object)返回0,则超慢录制为自动模式, 即可调用Mode.startRecording(File),然后进行运动检测,完成一次录制;否则,则为手动模式,调用 Mode.startRecording(File),直接完成一次录制。

使用限制:若想要超慢工作在自动模式,即运动检测录制,必须每一次录制前都进行有效区域的下发,否则录制默认都是手动模式。

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_SCENE_EFFECT_ENABLE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> HW_SCENE_EFFECT_ENABLE

场景识别情况下: 传入true表示确认当前场景识别结果,将打开底层对此场景的效果调整。 传入false表示取消当前场景识别结果,在本次使用中将不再识别此场景。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_VIDEO_STABILIZATION

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> HW_VIDEO_STABILIZATION

设置视频模式下防抖功能是否开启。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), ModeCharacteristics.getParameterRange(CaptureRequest.Key), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_METERING_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Byte> HW_PRO_METERING_VALUE

测光类型。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_SENSOR_ISO_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HW_PRO_SENSOR_ISO_VALUE

感光度值下发。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_SENSOR_EXPOSURE_TIME_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HW_PRO_SENSOR_EXPOSURE_TIME_VALUE

曝光时长下发,下发时长是微秒数值下发的。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_EXPOSURE_COMPENSATION_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> HW_EXPOSURE_COMPENSATION_VALUE

曝光补偿值下发。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_FOCUS_DISTANCE_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> HW_PRO_FOCUS_DISTANCE_VALUE

手动对焦下发。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_AWB_TYPE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HW_PRO_AWB_TYPE

自动白平衡模式下发。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_MANUAL_WB_VALUE

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> HW_PRO_MANUAL_WB_VALUE

手动白平衡范围。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

HW_PRO_EXPOSURE_HINT

展开

Field

public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> HW_PRO_EXPOSURE_HINT

是否开启曝光提示。

Since:

API版本 VersionInfo.API_LEVEL_1以上

See Also:

ModeCharacteristics.getSupportedParameters(), Mode.setParameter(CaptureRequest.Key, Object), Mode.setParameters(Map)

在 API参考 中进行搜索
请输入您想要搜索的关键词