目录

class info
com.huawei.hms.mlsdk.productvisionsearch.MLProductVisionSearch
Describes the result of product visual search. The information includes:
1. type: product type.
2. border: axis-aligned bounding rectangle, including left, top, right, and bottom. The values of left and top form the upper-left corner coordinates of the bounding rectangle, and the values of right and bottom form the lower-right corner coordinates. Currently, there is no gradient.
3. productList: product information list, which is sorted by confidence in descending order.

Public Constructor Summary

Constructor name
MLProductVisionSearch(String type, Rect border, List<MLVisionSearchProduct> productList)Constructor.

Public Method Summary

Return typeMethod name
RectgetBorder()
List<MLVisionSearchProduct>getProductList()
StringgetType()

Public Constructors

Method
MLProductVisionSearch(String type, Rect border, List<MLVisionSearchProduct> productList)
Constructor.

Parameters

Parameter nameParameter desc
typeProduct type. 
borderAxis-aligned bounding rectangle, including left, top, right, and bottom. The values of left and top form the upper-left corner coordinates of the bounding rectangle, and the values of right and bottom form the lower-right corner coordinates. Currently, there is no gradient.
productListProduct information list.

Public Methods

Method
public Rect getBorder()
Obtains the axis-aligned bounding rectangle of a product in an image. The area is a rectangle that involves four values: left, top, right, and bottom. The values of left and top form the upper-left corner coordinates of the rectangle, and the values of right and bottom form the lower-right corner coordinates of the rectangle.

Return

Typedesc
RectReturns the axis-aligned bounding rectangle of a product in an image.
Method
public List<MLVisionSearchProduct> getProductList()
Obtains the product information list.

Return

Typedesc
List<MLVisionSearchProduct>Returns the product information list.
Method
public String getType()
Obtains the product type. 

Return

Typedesc
StringReturns the product type.