Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

In viewController.swift Line:171 #4

Open
HellowithShivamAgrawal opened this issue Dec 21, 2017 · 1 comment
Open

In viewController.swift Line:171 #4

HellowithShivamAgrawal opened this issue Dec 21, 2017 · 1 comment

Comments

@HellowithShivamAgrawal
Copy link

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

@duckscorpion13
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants