1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Defines the image analyze type. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @atomicservice 27 * @since 12 28 */ 29declare enum ImageAnalyzerType { 30 /** 31 * Image analyze type subject. 32 * 33 * @syscap SystemCapability.ArkUI.ArkUI.Full 34 * @atomicservice 35 * @since 12 36 */ 37 SUBJECT = 0, 38 39 /** 40 * Image analyze type text. 41 * 42 * @syscap SystemCapability.ArkUI.ArkUI.Full 43 * @atomicservice 44 * @since 12 45 */ 46 TEXT, 47 48 /** 49 * Image analyze type object lookup. 50 * 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @atomicservice 53 * @since 12 54 */ 55 OBJECT_LOOKUP, 56} 57 58/** 59 * Image analyzer controller. 60 * 61 * @syscap SystemCapability.ArkUI.ArkUI.Full 62 * @atomicservice 63 * @since 12 64 */ 65declare class ImageAnalyzerController { 66 /** 67 * Constructor. 68 * 69 * @syscap SystemCapability.ArkUI.ArkUI.Full 70 * @atomicservice 71 * @since 12 72 */ 73 constructor(); 74 75 /** 76 * Get image analyzer support types. 77 * 78 * @returns { ImageAnalyzerType[] } 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @atomicservice 81 * @since 12 82 */ 83 getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; 84} 85 86/** 87 * Image analyzer config. 88 * 89 * @interface ImageAnalyzerConfig 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @atomicservice 92 * @since 12 93 */ 94declare interface ImageAnalyzerConfig { 95 /** 96 * Image analyze types. 97 * 98 * @type { ImageAnalyzerType[] } 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @atomicservice 101 * @since 12 102 */ 103 types: ImageAnalyzerType[]; 104} 105 106/** 107 * Image ai options. 108 * 109 * @interface ImageAIOptions 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @atomicservice 112 * @since 12 113 */ 114declare interface ImageAIOptions { 115 /** 116 * Image analyze types. 117 * 118 * @type { ?ImageAnalyzerType[] } 119 * @syscap SystemCapability.ArkUI.ArkUI.Full 120 * @atomicservice 121 * @since 12 122 */ 123 types?: ImageAnalyzerType[]; 124 125 /** 126 * Image analyze types. 127 * 128 * @type { ?ImageAnalyzerController } 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @atomicservice 131 * @since 12 132 */ 133 aiController?: ImageAnalyzerController; 134}