public void Draw(mplt.RelativeKeypoint target, float threshold = 0.0f) { if (ActivateFor(target)) { Draw(GetAnnotationLayer().GetLocalPosition(target, rotationAngle, isMirrored)); SetColor(GetColor(target.Score, threshold)); } }
protected Vector3 GetPosition(Transform screenTransform, mplt.RelativeKeypoint point, bool isFlipped, bool isFiltered) { return(GetPositionFromNormalizedPoint(screenTransform, point.X, point.Y, isFlipped, isFiltered)); }
/// <summary> /// Get the coordinates represented by <paramref name="relativeKeypoint" /> in local coordinate system. /// </summary> /// <param name="rectTransform"> /// <see cref="RectTransform" /> to be used for calculating local coordinates /// </param> /// <param name="imageRotation">Counterclockwise rotation angle of the input image</param> /// <param name="isMirrored">Set to true if the original coordinates is mirrored</param> public static Vector2 GetLocalPosition(this RectTransform rectTransform, mplt.RelativeKeypoint relativeKeypoint, RotationAngle imageRotation = RotationAngle.Rotation0, bool isMirrored = false) { return(GetLocalPositionNormalized(rectTransform, relativeKeypoint.X, relativeKeypoint.Y, imageRotation, isMirrored)); }