openharmony 鸿蒙 arkts-apis-camera-i

2026-08-25 浏览 (1)

Interfaces (Others)

NOTE

The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.

CameraDevice

Describes the camera device information.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
cameraIdstringYesNoCamera ID.
Atomic service API: This API can be used in atomic services since API version 19.
cameraPositionCameraPositionYesNoCamera position.
Atomic service API: This API can be used in atomic services since API version 19.
cameraTypeCameraTypeYesNoCamera type.
Atomic service API: This API can be used in atomic services since API version 19.
connectionTypeConnectionTypeYesNoCamera connection type.
Atomic service API: This API can be used in atomic services since API version 19.
cameraOrientation12+numberYesNoCamera installation angle, which does not change as the screen rotates. The value range is [0, 360], in degrees.
Atomic service API: This API can be used in atomic services since API version 19.
hostDeviceName15+stringYesNoRemote device name. If no remote device is available, an empty value is returned.
Atomic service API: This API can be used in atomic services since API version 19.
hostDeviceType15+HostDeviceTypeYesNoRemote device type.
Atomic service API: This API can be used in atomic services since API version 19.
lensEquivalentFocalLength24+Array<number>YesYesEquivalent focal length of the camera lens.
Atomic service API: This API can be used in atomic services since API version 24.
isLogicalCamera24+booleanYesYesWhether a camera is a logical camera (consisting of multiple physical cameras). true if the camera is a logical camera, false otherwise.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
constituentCameraDevices24+Array<CameraDevice>YesYesList of physical cameras that form the logical camera.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
lensFocalLength24+numberYesYesActual focal length of the lens.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
minimumFocusDistance24+numberYesYesMinimum focus distance of the camera.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
lensDistortion24+Array<number>YesYesArray of lens distortion parameters.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
lensIntrinsicCalibration24+Array<number>YesYesArray of lens intrinsic calibration parameters.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
sensorPhysicalSize24+Array<number>YesYesPhysical dimensions (width and height) of the sensor.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
sensorPixelArraySize24+Array<number>YesYesPixel array dimensions (width and height, in pixels) of the sensor.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.
sensorColorFilterArrangement24+SensorColorFilterArrangementYesYesArrangement mode of the sensor color filter.
Model constraint: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 24.

CameraStatusInfo

Describes the camera status information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
cameraCameraDeviceNoNoCamera device.
statusCameraStatusNoNoCamera status.

FoldStatusInfo12+

Describes the fold state information about a foldable device.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
supportedCamerasArray<CameraDevice>YesNoList of cameras supported in the current fold state.
foldStatusFoldStatusYesNoFold state.

Profile

Describes the camera profile.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
formatCameraFormatYesNoOutput format.
sizeSizeYesNoResolution.
The size setting corresponds to the camera's resolution width and height, rather than the actual dimensions of the output image.

FrameRateRange

Describes the frame rate range.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
minnumberYesNoMinimum frame rate, in frames per second (fps).
maxnumberYesNoMaximum frame rate, in fps.

VideoProfile

Describes the video configuration information. It inherits from Profile.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
frameRateRangeFrameRateRangeYesNoFrame rate range, in fps.

CameraOutputCapability

Describes the camera output capability.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
previewProfilesArray<Profile>YesNoSupported preview profiles.
photoProfilesArray<Profile>YesNoSupported photo profiles.
videoProfilesArray<VideoProfile>YesNoSupported video profiles.
supportedMetadataObjectTypesArray<MetadataObjectType>YesNoSupported metadata object types.

TorchStatusInfo11+

Describes the flashlight status information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
isTorchAvailablebooleanYesNoWhether the flashlight is available. true if available, false otherwise.
isTorchActivebooleanYesNoWhether the flashlight is activated. true if activated, false otherwise.
torchLevelnumberYesNoFlashlight brightness level. The value range is [0, 1]. A larger value indicates a greater luminance.

Size

Describes the image dimensions.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
heightnumberNoNoImage height, in pixels.
widthnumberNoNoImage width, in pixels.

Point

Describes the point coordinates, which are used for focus and exposure configuration.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
xnumberNoNoX coordinate of a point.
ynumberNoNoY coordinate of a point.

CameraConcurrentInfo18+

Describes the camera's concurrency information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
deviceCameraDeviceYesNoConcurrent camera device.
typeCameraConcurrentTypeYesNoConcurrency type.
modesArray<SceneMode >YesNoScene mode.
outputCapabilitiesArray<CameraOutputCapability >YesNoOutput capabilities of the camera.

Location

Describes the geolocation information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
latitudenumberNoNoLatitude, in degrees, within the range [–90, 90].
longitudenumberNoNoLongitude, in degrees, within the range [–180, 180].
altitudenumberNoNoAltitude, in meters.

PhotoCaptureSetting

Describes the settings for taking an image.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
qualityQualityLevelNoYesImage quality (low by default).
rotationImageRotationNoYesRotation angle of the image. The default value is 0, indicating clockwise rotation.
locationLocationNoYesGeolocation information of the image (depending on the device hardware information by default).
mirrorbooleanNoYesWhether mirror photography is enabled (disabled by default). Before using this enumerated value, call isMirrorSupported to check whether mirror photography is supported. true if enabled, false otherwise.

FrameShutterInfo

Describes the frame shutter information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
captureIdnumberNoNoID of this capture action.
timestampnumberNoNoTimestamp of the shutter, in milliseconds.

FrameShutterEndInfo12+

Describes the frame shutter end information during capture.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
captureIdnumberNoNoID of this capture action.

CaptureStartInfo11+

Describes the capture start information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
captureIdnumberNoNoID of this capture action.
timenumberNoNoEstimated duration when the sensor captures frames at the bottom layer in a single capture. If -1 is reported, there is no estimated duration.

CaptureEndInfo

Describes the capture end information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
captureIdnumberNoNoID of this capture action.
frameCountnumberNoNoNumber of frames captured.

AutoDeviceSwitchStatus13+

Describes the information about the automatic camera switch status.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
isDeviceSwitchedbooleanYesNoWhether the camera is automatically switched. true if auto-switched, false otherwise.
isDeviceCapabilityChangedbooleanYesNoWhether the camera capability is changed after the camera is automatically switched. true if changed, false otherwise.

Rect

Describes a rectangle. The coordinate system for the returned detection points is based on the landscape device orientation, with the charging port on the right. In this coordinate system, the top-left corner is (0, 0), and the bottom-right corner is (1, 1). Here, topLeftX and topLeftY represent the coordinates of the top-left corner of the rectangle, whereas width and height represent the width and height of the rectangle, respectively. When cropping or selecting a face region based on specific requirements, the x and y coordinates of the rectangle must be multiplied by the width and height of the actual camera preview output stream to obtain the cropped face region.

The width and height of the actual preview stream refer to the resolution of the camera output stream. For details, see size in profile.

For details about how to obtain the preview stream data, see Dual-Channel Preview (ArkTS).

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
topLeftXnumberNoNoX coordinate of the top-left corner of the rectangle, in the range of [0, 1].
topLeftYnumberNoNoY coordinate of the top-left corner of the rectangle, in the range of [0, 1].
widthnumberNoNoWidth of the rectangle, in the range of [0, 1].
heightnumberNoNoHeight of the rectangle, in the range of [0, 1].

MetadataObject

Describes the camera metadata, which is the data source of CameraInput. The metadata is obtained through metadataOutput.on('metadataObjectsAvailable').

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
typeMetadataObjectTypeYesNoMetadata object type.
timestampnumberYesNoCurrent timestamp, in nanoseconds (ns).
boundingBoxRectYesNoMetadata rectangle.

SmoothZoomInfo11+

Describes the smooth zoom information.

Atomic service API: This API can be used in atomic services since API version 19.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
durationnumberNoNoTotal duration of smooth zoom, in milliseconds.

ControlCenterStatusInfo20+

Describes the effect status information of a camera controller.

Atomic service API: This API can be used in atomic services since API version 20.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
effectTypeControlCenterEffectTypeYesNoEffect type of the camera controller.
isActivebooleanYesNoWhether the camera controller is activated. true if activated, false otherwise.

IsoInfo22+

Describes the information about the sensitivity (ISO) settings.

Atomic service API: This API can be used in atomic services since API version 22.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
isonumberYesYesISO.

CameraOcclusionDetectionResult23+

Describes the instance returned by the occlusion status callback, which indicates whether the camera lens is blocked or dirty.

Atomic service API: This API can be used in atomic services since API version 23.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
isCameraOccludedbooleanYesNoWhether the camera lens is blocked. true if blocked, false otherwise.
isCameraLensDirtybooleanYesNoWhether the camera lens is dirty. true if dirty, false otherwise.

ZoomRange24+

Describes the zoom range.

Atomic service API: This API can be used in atomic services since API version 24.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
minnumberYesNoMinimum zoom value.
maxnumberYesNoMaximum zoom value.

PhysicalAperture24+

Describes the physical aperture object.

Atomic service API: This API can be used in atomic services since API version 24.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
zoomRangeZoomRangeNoNoZoom range of a given physical aperture.
aperturesArray<number>NoNoSupported physical aperture.

ExposureInfo24+

Describes the exposure information object.

Atomic service API: This API can be used in atomic services since API version 24.

System capability: SystemCapability.Multimedia.Camera.Core

NameTypeRead-onlyOptionalDescription
exposureTimenumberYesYesExposure time, in microseconds.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks

openharmony 鸿蒙 arkts-apis-camera-OIS

openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo

openharmony 鸿蒙 capi-oh-camera-camera-frameraterange

openharmony 鸿蒙 capi-oh-camera-camera-outputcapability

openharmony 鸿蒙 arkts-apis-camera-Photo

openharmony 鸿蒙 capi-oh-camera-camera-profile

openharmony 鸿蒙 capi-oh-camera-camera-manager

openharmony 鸿蒙 capi-oh-camera-previewoutput-callbacks

openharmony 鸿蒙 arkts-apis-camera-ManualExposureQuery

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/QAgyZLHu