Skip to content

指定imageID的主动学习 1.3.0

方法名

imageLearnWithImageID

用法

用法示例

js
module.imageLearnWithImageID({
  //图片路径或网络地址
  url: "/storage/emulated/0/food/eggplant/eggplant2.png",
  //商品标识
  skuID: "紫茄子",
  //图片ID
  imageID:"83a9d898-ffff-0fff-2d88-000000000000"
}, res => {
  console.log(res)
})

参数说明

参数名参数类型是否必填默认值参数描述
urlString图片路径或网络地址
skuIDString商品标识
imageIDString指定的图片ID

回调

回调示例

json
{
  "message": "",
  "data": {
    "skuID": "紫茄子",
    "imageID": "83a9d898-ffff-0fff-2d88-000000000000"
  },
  "code": 0
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.skuIDString商品的唯一标识
data.imageIDString学习后sdk生成的图片id
data.featureFloat[]菜品学习采集数据
data.errorCodeInteger错误码
data.boxObject菜品学习采集区域
data.box.x1Integer采集区域左上角x坐标
data.box.y1Integer采集区域左上角y坐标
data.box.x2Integer采集区域右下角x坐标
data.box.y2Integer采集区域右下角y坐标
codeInteger返回类型,0.成功,其他:失败