harmony 鸿蒙Image Analysis Types

  • 2025-06-12
  • 浏览 (3)

Image Analysis Types

NOTE

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

ImageAnalyzerConfig

Provides AI analyzer configuration.

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

System capability: SystemCapability.ArkUI.ArkUI.Full

Name Type Mandatory Description
types ImageAnalyzerType[] Yes AI analysis types.

ImageAnalyzerType

Defines the AI analysis type. If it is not set, subject recognition and text recognition are enabled by default.

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

System capability: SystemCapability.ArkUI.ArkUI.Full

Name Value Description
SUBJECT 0 Subject recognition.
TEXT 1 Text recognition.
OBJECT_LOOKUP 2 Object lookup.

ImageAIOptions

Provides the AI analysis options.

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

System capability: SystemCapability.ArkUI.ArkUI.Full

Name Type Mandatory Description
types ImageAnalyzerType[] No AI analysis types.
aiController ImageAnalyzerController No AI analysis controller.

NOTE

The types parameter of this API has a higher priority than that of ImageAnalyzerConfig. This means that, if both parameters are set, the value set by this API takes precedence.

This API depends on device capabilities and must be used together with the enableAnalyzer API of the corresponding component (for example, the Image component).

ImageAnalyzerController

Implements an ImageAnalyzerController object, which can be bound to a supported component and then call the supported method through the controller.

System capability: SystemCapability.ArkUI.ArkUI.Full

constructor

constructor()

A constructor used to create an ImageAnalyzerController instance.

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

System capability: SystemCapability.ArkUI.ArkUI.Full

getImageAnalyzerSupportTypes

getImageAnalyzerSupportTypes(): ImageAnalyzerType[]

Obtains the analysis types supported by the corresponding component.

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

System capability: SystemCapability.ArkUI.ArkUI.Full

Return value

Type Description
ImageAnalyzerType[] Analysis type supported by the corresponding component.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArcButton

harmony 鸿蒙ArcSlider

harmony 鸿蒙Chip

harmony 鸿蒙ChipGroup

harmony 鸿蒙ComposeListItem

harmony 鸿蒙ComposeTitleBar

harmony 鸿蒙advanced.Counter

harmony 鸿蒙Dialog Box (Dialog)

harmony 鸿蒙DialogV2

harmony 鸿蒙DownloadFileButton

0  赞