更新记录

1.0.8(2024-06-23)

更新OpenCV类库版本

1.0.7(2024-06-20)

更新OpenCV类库版本。

1.0.6(2024-06-18)

更新OpenCV类库版本。

查看更多

平台兼容性

uni-app

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
- - - - 4.4 × -
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 快应用-华为 快应用-联盟
× × × × × × - × × × ×

uni-app x

Chrome Safari Android iOS 鸿蒙 微信小程序
- - 5.0 × - ×

概述

XF-opencvUTS实现对图片的比对识别基本操作。

插件接口

templateMatching

查找图片A在图片B中的位置坐标

uni-app项目中(nvue)调用示例:

import { templateMatching } from "@/uni_modules/XF-opencvUTS"

templateMatching({
  sourcePath: "/storage/emulated/0/template.bmp",
  smallPath: "/storage/emulated/0/11.png",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { templateMatching } from "@/uni_modules/XF-opencvUTS";
import { MatchingOptions } from "@/uni_modules/XF-opencvUTS/utssdk/interface.uts";

let options = {
  sourcePath: "/storage/emulated/0/template.bmp",
  smallPath: "/storage/emulated/0/11.png",
  complete: (res : any) => {
    console.log(res)
  }
} as MatchingOptions;
templateMatching(options);

可用性

Android系统

可提供的1.0.0及更高版本

templateMatchingByBase64

查找图片A在图片B中的位置坐标(内测)

uni-app项目中(nvue)调用示例:

import { templateMatchingByBase64 } from "@/uni_modules/XF-opencvUTS"

templateMatchingByBase64({
  sourceBase64: "",
  smallBase64: "",
  complete: (res) => {
        console.log(res)
  }
});

uni-app x项目(uvue)中调用示例:

import { templateMatchingByBase64 } from "@/uni_modules/XF-opencvUTS";
import { MatchingByBase64Options } from "@/uni_modules/XF-opencvUTS/utssdk/interface.uts";

let options = {
  sourceBase64: "",
  smallBase64: "",
  complete: (res : any) => {
    console.log(res)
  }
} as MatchingByBase64Options;
templateMatchingByBase64(options);

可用性

Android系统

可提供的1.0.0及更高版本

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问