VisionFaceDetection icon indicating copy to clipboard operation
VisionFaceDetection copied to clipboard

In viewController.swift Line:171

Open HellowithShivamAgrawal opened this issue 8 years ago • 1 comments

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. screen shot 2017-12-21 at 1 14 31 pm

HellowithShivamAgrawal avatar Dec 21 '17 07:12 HellowithShivamAgrawal

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))) } ... }

duckscorpion13 avatar Jan 02 '18 09:01 duckscorpion13