VerIDImageProcessorService
@objc
public class VerIDImageProcessorService : NSObject, ImageProcessorService
Ver-ID’s default implementation of the ImageProcessorService
protocol
Since
1.5.0-
Adjustment provider to use when converting the image to grayscale
Since
1.5.0Declaration
Swift
@objc public let imageAdjustmentProvider: ImageAdjustmentProvider
-
Name of the provider for logging purposes. Inherited from the adjustment provider.
Since
1.5.0Declaration
Swift
public var name: String? { get }
-
Constructor
Since
1.5.0Declaration
Swift
@objc public init(imageAdjustmentProvider: ImageAdjustmentProvider)
Parameters
imageAdjustmentProvider
Image adjustment provider to use when converting the image to grayscale
-
Prepare image for face detection
Throws
Error if the image preparation failsSince
1.5.0Declaration
Swift
public func prepareImageForFaceDetection(_ image: VerIDImage, recalculate: Bool) throws
Parameters
image
The image to prepare
recalculate
true
if the image buffer should be recalculated if it exists -
Declaration
Swift
public func cgImageFromVerIDImage(_ image: VerIDImage) throws -> CGImage
Parameters
image
The image to convert
Return Value
VerIDImage
converted toCGImage