init(CGImage:orientation:constraint:options:)
Creates a feature value that contains an image defined by a core graphics image, an orientation, and a constraint.
Declaration
convenience init(CGImage cgImage: CGImage, orientation: CGImagePropertyOrientation, constraint: MLImageConstraint, options: [MLFeatureValue.ImageOption : Any]? = nil) throwsParameters
- cgImage:
A Cgimage instance.
- orientation:
A Cgimagepropertyorientation instance.
- constraint:
An Mlimageconstraint instance.
- options:
A dictionary of Vnimagecropandscaleoption values, each keyed by Imageoption.
See Also
Creating image feature values
init(pixelBuffer:)init(CGImage:pixelsWide:pixelsHigh:pixelFormatType:options:)init(CGImage:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:)init(CGImage:constraint:options:)init(imageAtURL:pixelsWide:pixelsHigh:pixelFormatType:options:)init(imageAtURL:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:)init(imageAtURL:constraint:options:)init(imageAtURL:orientation:constraint:options:)MLImageConstraintMLFeatureValue.ImageOption