Skip to main content

CameraModule.ConfigKey

Enum

Typed keys for camera tuning parameters.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
1 platform note
  • SnapchatNot supported — Available on SPECS only
  • SPECSFully supported
    • Restricted when the Lens uses internet-connected APIs (see Privacy Restrictions).
  • Camera Kit WebNot supported — Available on SPECS only
  • Camera Kit MobileNot supported — Available on SPECS only

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported. Restricted when the Lens uses internet-connected APIs (see Privacy Restrictions)

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not supported — Available on SPECS only.

Since Lens Scripting v368Exposes user data

Typed keys for camera tuning parameters. AutoExposureRegion may be set on a CameraModule.StreamConfig before CameraModule.StreamingSession#start and changed mid-stream via CameraModule.StreamingSession#setConfig. It has no effect on capture sessions. SnapshotMfnrEnable only applies to snapshots: set it on the CameraModule.StreamConfig passed to CameraModule.CaptureSession#start.

Value formats (the values array passed alongside the key):

  • AutoExposureRegion: [left, right, top, bottom] — four numbers in normalized image coordinates 0.0–1.0 (origin top-left), with left < right and top < bottom. An optional fifth number is a weight. Steers auto-exposure toward the region; it does not crop the image. Exposure is then set for the region, so the rest of the frame can be brighter or darker. A session sets one region. The region can stay in effect after the session stops: set [0, 1, 0, 1] before stop() to meter the whole frame again. It currently has no effect on the 2016x1512 RGB stream.
  • SnapshotMfnrEnable: [1] to enable Multi-Frame Noise Reduction (MFNR) for a snapshot/capture stream, [0] to disable — one number treated as a boolean. Only meaningful on capture streams.

Index

Remarks

Cameras always run automatic exposure. Read the exposure in use from CameraModule.MetadataKey Iso and ExposureTimeNs.

Enumeration Members

AutoExposureRegion

AutoExposureRegion: number

Exposes user dataSPECS

Auto-exposure region: [left, right, top, bottom] in 0.0–1.0, optional fifth weight.

Since

Lens Scripting Version 387


SnapshotMfnrEnable

SnapshotMfnrEnable: number

Exposes user dataSPECS

Multi-frame noise reduction for captures: [1] on, [0] off. Capture sessions only.

Since

Lens Scripting Version 384