VisionFaceDetection
VisionFaceDetection copied to clipboard
In viewController.swift Line:171
here, points is required to convert as normalizedPoints. But doing so convert method is throwing an error.
There must be some silly mistake. But I am not able to decode it.

func convertPointsForFace(_ landmark: VNFaceLandmarkRegion2D?, _ boundingBox: CGRect) { if let points = landmark?.normalizedPoints { let convertedPoints = convert(points) ... }
func convert(_ points: [CGPoint]) -> [(x: CGFloat, y: CGFloat)] { var convertedPoints = (x: CGFloat, y: CGFloat) for p in points { convertedPoints.append((CGFloat(p.x), CGFloat(p.y))) } ... }