Skip to content

13 compiler errors in the Face Detection Tutorial #3

@dcaronson

Description

@dcaronson

Great Face Detection Vision Framework Tutorial!

There are a total of 13 compiler errors.

Cause of the 1st compiler error:

In the ImageViewController, I am receiving the following compiler error:
Value of type 'VNFaceLandmarkRegion2D' has no member 'point'

Here is the line of code with the error:
let point = landmark.point(at: i)

Here is the correction:
let point = landmark.normalizedPoints[i]

Cause of the 2nd compiler error:

In the ImageViewController, I am receiving the following compiler error:
Cannot convert value of type 'Int32' to expected argument type 'CGImagePropertyOrientation'

Here is the line of code with the error:
let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, orientation: orientation ,options: [:])

Here is the correction:
let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, orientation: CGImagePropertyOrientation(rawValue: CGImagePropertyOrientation.RawValue(orientation))! ,options: [:])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions