public class VisionManager extends Object
Example operations include connecting to or disconnecting from HUAWEI HiAI Engine services, and obtaining detection method instances.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static void |
destroy() |
Disconnects from HUAWEI HiAI Engine services.
|
static IBarcodeDetector |
getBarcodeDetector(Context context) |
Obtains an
IBarcodeDetector instance. |
static IDocRefine |
getDocRefine(Context context) |
Obtains an
IDocRefine instance. |
static IImageSuperResolution |
getSisr(Context context) |
Obtains an
IImageSuperResolution instance. |
static ITextDetector |
getTextDetector(Context context) |
Obtains an
ITextDetector instance. |
static ITxtImageSuperResolution |
getTisr(Context context) |
Obtains an
ITxtImageSuperResolution instance. |
static int |
init(Context context,
ConnectionCallback connectionCallback) |
Initializes HUAWEI HiAI Engine services.
|
public static int init(Context context, ConnectionCallback connectionCallback)
context - Indicates the HarmonyOS context.connectionCallback - Indicates a callback to asynchronously initialize HUAWEI HiAI Engine services.HwHiAIResultCode.public static void destroy()
public static IImageSuperResolution getSisr(Context context)
IImageSuperResolution instance.context - Indicates the HarmonyOS context.IImageSuperResolution instance.public static ITxtImageSuperResolution getTisr(Context context)
ITxtImageSuperResolution instance.context - Indicates the HarmonyOS context.ITxtImageSuperResolution instance.public static IDocRefine getDocRefine(Context context)
IDocRefine instance.context - Indicates the HarmonyOS context.IDocRefine instance.public static ITextDetector getTextDetector(Context context)
ITextDetector instance.context - Indicates the HarmonyOS context.ITextDetector instance.public static IBarcodeDetector getBarcodeDetector(Context context)
IBarcodeDetector instance.
The parameter value is passed by the caller, and the value range is determined by the variable type.
context - Indicates the HarmonyOS context.IBarcodeDetector instance.