We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesML Kitmlsdk.landmarkMLRemoteLandmark

MLRemoteLandmark

class info
com.huawei.hms.mlsdk.landmark.MLRemoteLandmark
Describes the detected landmarks in a supplied image. The information includes:
1. landmark: landmark name and description
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. possibility: result confidence. The value range is [0,1]. A value closer to 0 indicates lower confidence. A value closer to 1 indicates higher confidence.
4. landmarkId: entity ID
5. positionInfos: a set of longitude and latitude coordinates of landmarks. Each MLCoordinate object contains lat and lng.
lat indicates the latitude, which must be within the range of [–90.0,+90.0].lng indicates the longitude, which must be within the range of [–180.0,+180.0].

Public Method Summary

Return typeMethod name
android.graphics.RectgetBorder()
StringgetLandmark()
List<MLCoordinate>getPositionInfos()
floatgetPossibility()

Public Methods

Method
public android.graphics.Rect getBorder()
Obtains the axis-aligned bounding rectangle of a landmark 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
android.graphics.RectReturns the axis-aligned bounding rectangle of a landmark in an image.
Method
public String getLandmark()
Obtains the landmark description.

Return

Typedesc
StringReturns the landmark description.
Method
public List<MLCoordinate> getPositionInfos()
Obtains landmark location information. Each MLCoordinate object contains a longitude and a latitude.
lat indicates the longitude, which must be within the range of [–90.0,+90.0].lng indicates the longitude, which must be within the range of [–180.0,+180.0].

Return

Typedesc
List<MLCoordinate>Returns a set of landmark location information.
Method
public float getPossibility()
Obtains the result confidence. The value range is [0,1]. A value closer to 0 indicates lower confidence, and a value closer to 1 indicates higher confidence.

Return

Typedesc
floatReturns the result confidence.
This page may contain third-party content. For details, click here.