/// <summary> /// Draws a quadrilateral on the overlay /// </summary> /// <param name="normalizedQuadrilateral">Normalized quadrilateral.</param> private void ObjectTracked(CGPoint[] normalizedQuadrilateral) { overlay.InvokeOnMainThread(() => { var rotatedQuadrilateral = normalizedQuadrilateral.Select(pt => new CGPoint(pt.X, 1.0 - pt.Y)).ToArray(); overlay.AddQuad(rotatedQuadrilateral); }); }
private void RectangleDetected(CGPoint[] normalizedQuadrilateral) { overlay.InvokeOnMainThread(() => { // Note conversion from inverted coordinate system! var rotatedQuadrilateral = normalizedQuadrilateral.Select(pt => new CGPoint(pt.X, 1.0 - pt.Y)).ToArray(); overlay.AddQuad(rotatedQuadrilateral); }); }