Framework

Core Image

Use built-in or custom filters to process still and video images.

Overview

Core Image is an image processing and analysis technology that provides high-performance processing for still and video images. Use the many built-in image filters to process images and build complex effects by chaining filters. For details, see Core Image Filter Reference.

You can also create new effects with custom filters and image processors; see Core Image Programming Guide.

Topics

First Steps

Processing an Image Using Built-in Filters

Apply effects such as sepia tint, highlight strengthening, and scaling to images.

CIImage

A representation of an image to be processed or produced by Core Image filters.

CIFilter

An image processor that produces an image by manipulating one or more input images or by generating new image data.

CIContext

An evaluation context for rendering image processing results and performing image analysis.

Basic Data Types

Colors, vectors, and other types used in applying or creating image filters.

Filter Recipes

Applying a Chroma Key Effect

Replace a color in one image with the background from another.

Selectively Focusing on an Image

Focus on a part of an image by applying Gaussian blur and gradient masks.

Customizing Image Transitions

Transition between images in creative ways using Core Image filters.

Simulating Scratchy Analog Film

Degrade the quality of an image to make it look like dated, scratchy analog film.

Custom Filters

Use the Core Image Kernel Language to create universal image processing routines that work in any Core Image context.

Writing Custom Kernels

Write your own custom kernels in either the Core Image Kernel Language or the Metal Shading Language.

CIKernel

A GPU-based image processing routine used to create custom Core Image filters.

CIColorKernel

A GPU-based image processing routine that processes only the color information in images, used to create custom Core Image filters.

CIWarpKernel

A GPU-based image processing routine that processes only the geometry information in an image, used to create custom Core Image filters.

CIBlendKernel

A GPU-based image processing routine that is optimized for blending two images.

CISampler

An object that retrieves pixel samples for processing by a filter kernel.

Custom Image Processors

Access image content directly to use other image processing technologies within a Core Image workflow.

CIImageProcessorKernel

The abstract class you extend to create custom image processors that can integrate with Core Image workflows.

CIImageProcessorInput

A container of image data and information for use in a custom image processor.

CIImageProcessorOutput

A container for writing image data and information produced by a custom image processor.

Custom Render Destination

CIRenderDestination

A specification for configuring all attributes of a render task's destination and issuing asynchronous render tasks.

CIRenderInfo

An encapsulation of a render task's timing, passes, and pixels processed.

CIRenderTask

A single render task issued in conjunction with CIRenderDestination.

Feedback-Based Processing

CIImageAccumulator

An object that manages feedback-based image processing for tasks such as painting or fluid simulation.

Barcode Descriptions

Model barcode data to create barcode images with Core Image filters or to interpret barcodes detected by Core Image, Vision, or AVFoundation features.

CIBarcodeDescriptor

An abstract base class that represents a machine readable code's attributes.

CIQRCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a square QR code symbol.

CIAztecCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents an Aztec code symbol.

CIPDF417CodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a PDF 417 symbol.

CIDataMatrixCodeDescriptor

A concrete subclass of CIBarcodeDescriptor that represents a Data Matrix code symbol.

Image Feature Detection

In macOS 10.13, iOS 11, and tvOS 11 or later, the Vision framework replaces these classes for identifying and analyzing image features.

CIDetector

An image processor that identifies notable features (such as faces and barcodes) in a still image or video.

CIFeature

The abstract superclass for objects representing notable features detected in an image.

CIFaceFeature

Information about a face detected in a still or video image.

CIRectangleFeature

Information about a rectangular region detected in a still or video image.

CITextFeature

Information about a region likely to contain text detected in a still or video image.

CIQRCodeFeature

Information about a Quick Response code (a kind of 2D barcode) detected in a still or video image.

Image Units

In macOS, create and package custom filters as image units that other apps can load as plug-ins, or discover and load image units published by third-party apps.

CIPlugIn

The mechanism for loading image units in macOS.

CIFilterGenerator

An object that creates and configures chains of individual image filters.

CIPlugInRegistration

The interface for loading Core Image image units.

CIFilterConstructor

A general interface for objects that produce CIFilter instances.

Protocols

CIMixBeta
CIXRayBeta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software