Instance Property

image

The image content of the frame to be processed.

Required.

Declaration

var image: CIImage { get }

Discussion

Core Image provides several ways to perform your adjustments to this image:

  • Create a single CIFilter object, or a chain of filters. Set this image as the kCIInputImageKey parameter of the first filter in the chain, and use the last filter’s outputImage property to access the result. Each CIFilter object can be a built-in filter or a custom filter subclass that you create.

  • Use the applyingFilter(_:parameters:) method to conveniently apply one of the many built-in Core Image filters.

  • Access pixel buffers directly and apply custom image processing using a custom CIImageProcessorKernel subclass.

In all cases, you obtain another CIImage object representing the result of your adjustments. Return that image from your frameProcessor block. (See the frameProcessor description for example code.)