For the moment I am just taking the getNormalizedPoints output from above and converting them to image coords:
// denormalize the points and convert them to image coords
let denormalizedPoints = normalizedPoints.map { normalizedPoint in
let x = normalizedPoint.x * imageSize.width
let y = (1 - normalizedPoint.y) * imageSize.height // Flip y-axis because normalized points have (0,0) at bottom-left
return CGPoint(x: x, y: y)
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: