QtMultiMedia 之 CameraExposure

QtMultiMedia 之 CameraExposure

翻译:qyvlik

5.5.1

用来控制 Camera 曝光设置的接口。

属性

  • aperture : real

  • exposureCompensation : real

  • exposureMode : enumeration

  • iso : int

  • manualAperture : real

  • manualIso : real

  • manualShutterSpeed : real

  • meteringMode : enumeration

  • shutterSpeed : real

  • spotMeteringPoint : QPointF

方法

  • setAutoAperture()

  • setAutoIsoSensitivity()

  • setAutoShutterSpeed()

详细描述

CameraExposure allows you to adjust exposure related settings like aperture and shutter speed, metering and ISO speed.

It should not be constructed separately, instead the exposure property of the a Camera should be used.

CameraExposure 允许你调整曝光相关的设置,例如光圈,快门速度,测光模式,和 ISO (感光度)大小。

CameraExposure 只能通过 Camera::exposure 使用,不可直接创建。

Camera {
    id: camera

    exposure.exposureCompensation: -1.0
    exposure.exposureMode: Camera.ExposurePortrait
}

Several settings have both an automatic and a manual mode. In the automatic modes the camera software itself will decide what a reasonable setting is, but in most cases these settings can be overridden with a specific manual setting.

大部分设置都有自动模式和手动模式。在自动模式下,相机软件会自己决定使用合理的设置。这些自动模式设置不能覆盖手动模式设置。

For example, to select automatic shutter speed selection:

例如设置自动快门速度:

    camera.exposure.setAutoShutterSpeed()

Or for a specific shutter speed:

或者指定快门速度:

    camera.exposure.manualShutterSpeed = 0.01 // 10ms

You can only choose one or the other mode.

你只能二者取其一。

属性文档

aperture : real

This property holds the current lens aperture as an F number (the ratio of the focal length to effective aperture diameter).

保存最近一次的光圈值 F

exposureCompensation : real

This property holds the adjustment value for the automatically calculated exposure. The value is in EV units.

曝光补偿,自动计算曝光值进行调整。 EV 单位。

exposureMode : enumeration

This property holds the camera exposure mode.

曝光模式。

The mode can be one of the following:

ValueDescription
Camera.ExposureManualManual mode.
Camera.ExposureAutoAutomatic mode.
Camera.ExposureNightNight mode.
Camera.ExposureBacklightBacklight exposure mode.
Camera.ExposureSpotlightSpotlight exposure mode.
Camera.ExposureSportsSpots exposure mode.
Camera.ExposureSnowSnow exposure mode.
Camera.ExposureBeachBeach exposure mode.
Camera.ExposureLargeApertureUse larger aperture with small depth of field.
Camera.ExposureSmallApertureUse smaller aperture.
Camera.ExposurePortraitPortrait exposure mode.
Camera.ExposureActionAction exposure mode. Since 5.5
Camera.ExposureLandscapeLandscape exposure mode. Since 5.5
Camera.ExposureNightPortraitNight portrait exposure mode. Since 5.5
Camera.ExposureTheatreTheatre exposure mode. Since 5.5
Camera.ExposureSunsetSunset exposure mode. Since 5.5
Camera.ExposureSteadyPhotoSteady photo exposure mode. Since 5.5
Camera.ExposureFireworksFireworks exposure mode. Since 5.5
Camera.ExposurePartyParty exposure mode. Since 5.5
Camera.ExposureCandlelightCandlelight exposure mode. Since 5.5
Camera.ExposureBarcodeBarcode exposure mode. Since 5.5
Camera.ExposureModeVendorThe base value for device specific exposure modes.

模式可能是如下的:

描述
Camera.ExposureManual手动模式
Camera.ExposureAuto自动模式
Camera.ExposureNight夜间模式
Camera.ExposureBacklight背光模式
Camera.ExposureSpotlightSpotlight exposure mode.
Camera.ExposureSports运动模式
Camera.ExposureSnow雪景模式
Camera.ExposureBeach沙滩模式
Camera.ExposureLargeAperture模糊景深,大光圈模式
Camera.ExposureSmallAperture小光圈
Camera.ExposurePortrait人脸模式
Camera.ExposureAction动作模式
Camera.ExposureLandscape风景模式
Camera.ExposureNightPortrait夜晚肖像模式
Camera.ExposureTheatre电影模式 Since 5.5
Camera.ExposureSunset黄昏模式 Since 5.5
Camera.ExposureSteadyPhoto固定图片曝光模式 Since 5.5
Camera.ExposureFireworks烟花模式 Since 5.5
Camera.ExposureParty聚会模式 Since 5.5
Camera.ExposureCandlelight烛光模式 Since 5.5
Camera.ExposureBarcode条形码模式 Since 5.5
Camera.ExposureModeVendor(我母鸡啊)The base value for device specific exposure modes.

iso : int

This property holds the sensor’s ISO sensitivity value.

设置 ISO 感光度。

manualAperture : real

This property holds the aperture (F number) value for capturing photos.

If the value is less than zero, the camera automatically determines an appropriate aperture value.

aperture, setAutoAperture()

保存了捕获图片后的光圈值 F

如果光圈值小于 0,那么相机会自动设置光圈值。

manualIso : real

This property holds the ISO settings for capturing photos.

If a negative value is specified, the camera will automatically determine an appropriate value.

See also iso and setAutoIsoSensitivity().

保存了捕获图片后的 ISO 值。

如果设置了错误的值,相机将会自动调整一个合适的值。

manualShutterSpeed : real

This property holds the shutter speed value (in seconds). If the value is less than zero, the camera automatically determines an appropriate shutter speed.

shutterSpeed, setAutoShutterSpeed()

设置手动的快门速度(秒),如果小于 0,将会自动设置一个合适的值。

meteringMode : enumeration

This property holds the camera metering mode (how exposure is balanced).

测光模式。

The mode can be one of the following:

描述
Camera.MeteringMatrixA matrix of sample points is used to measure exposure.
Camera.MeteringAverageAn average is used to measure exposure.
Camera.MeteringSpotA specific location (spotMeteringPoint) is used to measure exposure.

可能为如下几种:

描述
Camera.MeteringMatrix使用样本的矩阵来测量曝光
Camera.MeteringAverage使用平均值来测量曝光
Camera.MeteringSpot使用指定值(spotMeteringPoint)来测量曝光

shutterSpeed : real

This property holds the camera’s current shutter speed value in seconds. To affect the shutter speed you can use the manualShutterSpeed property and setAutoShutterSpeed().

保存最近一次快门速度(秒)。通过 manualShutterSpeedsetAutoShutterSpeed() 修改快门速度。

spotMeteringPoint : QPointF

The property holds the frame coordinates of the point to use for exposure metering. This point is only used in spot metering mode, and it typically defaults to the center (0.5, 0.5).

大体就是设置某个点为测试光源吧。。。。。。一般为中间点 (0.5, 0.5)

方法文档

setAutoAperture()

Turn on auto aperture selection. The manual aperture value is reset to -1.0

打开自动光圈。手动光圈值重设为 -1.0

setAutoIsoSensitivity()

Turn on auto ISO sensitivity selection. The manual ISO value is reset to -1.

打开自动感光度。手动感光度重设为 -1

setAutoShutterSpeed()

Turn on auto shutter speed selection. The manual shutter speed value is reset to -1.0.

打开自动快门速度。手动快门速度重设为 -1.0

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值