openharmony 鸿蒙 capi-oh-camera-camera-rect

2026-08-25 浏览 (1)

Camera_Rect

typedef struct Camera_Rect {...} Camera_Rect

Overview

The struct 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 Secondary Processing of Preview Streams (C/C++).

Since: 11

Related module: OH_Camera

Header file: camera.h

Summary

Member Variables

NameDescription
int32_t topLeftXX coordinate of the top-left corner of the rectangle, in the range of [0, 1].
int32_t topLeftYY coordinate of the top-left corner of the rectangle, in the range of [0, 1].
int32_t widthWidth of the rectangle, in the range of [0, 1].
int32_t heightHeight of the rectangle, in the range of [0, 1].

你可能感兴趣的鸿蒙文章

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/Zims6gVW