Esempio n. 1
0
        // Uses VNUtils to calculate the points, just to test the native API
        void ConvertPoints2(VNFaceLandmarkRegion2D landmark, CGRect boundingBox, nuint imgWidth, nuint imgHeight)
        {
            var points             = landmark.Points;
            var faceLandmarkPoints = points.Select(p =>
                                                   VNUtils.GetImagePoint(p, boundingBox, imgWidth, imgHeight)
                                                   );

            DispatchQueue.MainQueue.DispatchAsync(() => {
                Draw(faceLandmarkPoints.ToArray());
            });
        }
Esempio n. 2
0
        public void GetImagePointTest()
        {
            var imagePoint = VNUtils.GetImagePoint(new CGPoint(2, 345), 6, 78, new CGRect(90, 12, 34, 56));

            Assert.That(imagePoint, Is.Not.EqualTo(CGPoint.Empty), "VNImagePointForNormalizedPointUsingRegionOfInterest is not empty");
        }