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.

Type-Safe Filters

Methods and Protocols for Filter Creation

Create Core Image filters that expose their attributes as properties.

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

CIAccordionFoldTransition

The properties you use to configure an accordion fold transition filter.

CIAffineClamp

The properties you use to configure a affine clamp filter.

CIAffineTile

The properties you use to configure an affine tile filter.

CIAttributedTextImageGenerator

The properties you use to configure an attributed-text image generator filter.

CIAztecCodeGenerator

The properties you use to configure an Aztec code generator filter.

CIBarcodeGenerator

The properties you use to configure a barcode generator filter.

CIBarsSwipeTransition

The properties you use to configure a bars swipe transition filter.

CIBicubicScaleTransform

The properties you use to configure a bicubic scale transform filter.

CIBlendWithMask

The properties you use to configure a blend with mask filter.

CIBloom

The properties you use to configure a bloom filter.

CIBokehBlur

The properties you use to configure a bokeh blur filter.

CIBoxBlur

The properties you use to configure a box blur filter.

CICMYKHalftone

The properties you use to configure a CMYK halftone filter.

CICheckerboardGenerator

The properties you use to configure a checkerboard generator filter.

CICircularScreen

The properties you use to configure a circular screen filter.

CICode128BarcodeGenerator

The properties you use to configure a Code 128 barcode generator filter.

CIColorClamp

The properties you use to configure a color clamp filter.

CIColorControls

The properties you use to configure a color controls filter.

CIColorCrossPolynomial

The properties you use to configure a color cross-polynomial filter.

CIColorCube

The properties you use to configure a color cube filter.

CIColorCubeWithColorSpace

The properties you use to configure a color cube with color space filter.

CIColorCubesMixedWithMask

The properties you use to configure a color cube mixed with mask filter.

CIColorCurves

The properties you use to configure a color curves filter.

CIColorInvert

The properties you use to configure a color invert filter.

CIColorMap

The properties you use to configure a color map filter.

CIColorMatrix

The properties you use to configure a color matrix filter.

CIColorMonochrome

The properties you use to configure a color monochrome filter.

CIColorPolynomial

The properties you use to configure a color polynomial filter.

CIColorPosterize

The properties you use to configure a color posterize filter.

CIComicEffect

The properties you use to configure a comic effect filter.

CICompositeOperation

The properties you use to configure a composite operation filter.

CIConvolution

The properties you use to configure a convolution filter.

CICopyMachineTransition

The properties you use to configure a copy machine transition filter.

CICoreMLModel

The properties you use to configure a Core ML model filter.

CICrystallize

The properties you use to configure a crystalize filter.

CIDepthOfField

The properties you use to configure a depth-of-field filter.

CIDepthToDisparity

The properties you use to configure a depth-to-disparity filter.

CIDiscBlur

The properties you use to configure a disc blur filter.

CIDisintegrateWithMaskTransition

The properties you use to configure a disintegrate-with-mask transition filter.

CIDisparityToDepth

The properties you use to configure a disparity-to-depth filter.

CIDissolveTransition

The properties you use to configure a dissolve transition filter.

CIDither

The properties you use to configure a dither filter.

CIDocumentEnhancer

The properties you use to configure a document enhancer filter.

CIDotScreen

The properties you use to configure a dot screen filter.

CIEdgePreserveUpsample

The properties you use to configure an edge preserve upsample filter.

CIEdgeWork

The properties you use to configure an edge-work filter.

CIEdges

The properties you use to configure an edges filter.

CIEightfoldReflectedTile

The properties you use to configure an eightfold reflected tile filter.

CIExposureAdjust

The properties you use to configure an exposure adjust filter.

CIFalseColor

The properties you use to configure a false color filter.

CIFilter

The properties you use to configure a Core Image filter.

CIFlashTransition

The properties you use to configure a flash transition filter.

CIFourCoordinateGeometryFilter

The properties you use to configure a geometry adjustment filters that requires four coordinates.

CIFourfoldReflectedTile

The properties you use to configure a fourfold reflected tile filter.

CIFourfoldRotatedTile

The properties you use to configure a fourfold rotated tile filter.

CIFourfoldTranslatedTile

The properties you use to configure a fourfold translated tile filter.

CIGaborGradients

The properties you use to configure a Gabor gradients filter.

CIGammaAdjust

The properties you use to configure a gamma adjust filter.

CIGaussianBlur

The properties you use to configure a Gaussian blur filter.

CIGaussianGradient

The properties you use to configure a Gaussian gradient filter.

CIGlideReflectedTile

The properties you use to configure a glide reflected tile filter.

CIGloom

The properties you use to configure a gloom filter.

CIHatchedScreen

The properties you use to configure a hatched screen filter.

CIHeightFieldFromMask

The properties you use to configure a height-field-from-mask filter.

CIHexagonalPixellate

The properties you use to configure a hexagonal pixellate filter.

CIHighlightShadowAdjust

The properties you use to configure a highlight-shadow adjust filter.

CIHueAdjust

The properties you use to configure a hue adjust filter.

CIHueSaturationValueGradient

The properties you use to configure a hue-saturation-value gradient filter.

CIKaleidoscope

The properties you use to configure a kaleidoscope filter.

CIKeystoneCorrectionCombined

The properties you use to configure a keystone correction combined filter.

CIKeystoneCorrectionHorizontal

The properties you use to configure a keystone correction horizontal filter.

CIKeystoneCorrectionVertical

The properties you use to configure a keystone correction vertical filter.

CILabDeltaE

The properties you use to configure a Lab Delta E filter.

CILanczosScaleTransform

The properties you use to configure a Lanczos scale transform filter.

CILenticularHaloGenerator

The properties you use to configure a lenticular halo generator filter.

CILineOverlay

The properties you use to configure a line overlay filter.

CILineScreen

The properties you use to configure a line screen filter.

CILinearGradient

The properties you use to configure a linear gradient filter.

CILinearToSRGBToneCurve

The properties you use to configure a linear-to-sRGB filter.

CIMaskToAlpha

The properties you use to configure a mask-to-alpha filter.

CIMaskedVariableBlur

The properties you use to configure a masked variable blur filter.

CIMaximumComponent

The properties you use to configure a maximum component filter.

CIMedian

The properties you use to configure a median filter.

CIMeshGenerator

The properties you use to configure a mesh generator filter.

CIMinimumComponent

The properties you use to configure a minimum component filter.

CIMix

The properties you use to configure a mix filter.

CIModTransition

The properties you use to configure a mod transition filter.

CIMorphologyGradient

The properties you use to configure a morphology gradient filter.

CIMorphologyMaximum

The properties you use to configure a morphology maximum filter.

CIMorphologyMinimum

The properties you use to configure a morphology minimum filter.

CIMorphologyRectangleMaximum

The properties you use to configure a morphology rectangle maximum filter.

CIMorphologyRectangleMinimum

The properties you use to configure a morphology rectangle minimum filter.

CIMotionBlur

The properties you use to configure a motion blur filter.

CINoiseReduction

The properties you use to configure a noise reduction filter.

CIOpTile

The properties you use to configure an optical tile filter.

CIPDF417BarcodeGenerator

The properties you use to configure a PDF417 barcode generator filter.

CIPageCurlTransition

The properties you use to configure a page curl transition filter.

CIPageCurlWithShadowTransition

The properties you use to configure a page-curl-with-shadow transition filter.

CIPaletteCentroid

The properties you use to configure a palette centroid filter.

CIPalettize

The properties you use to configure a palettize filter.

CIParallelogramTile

The properties you use to configure a parallelogram tile filter.

CIPerspectiveCorrection

The properties you use to configure a perspective correction filter.

CIPerspectiveRotate

The properties you use to configure a perspective rotate filter.

CIPerspectiveTile

The properties you use to configure a perspective tile filter.

CIPerspectiveTransform

The properties you use to configure a perspective transform filter.

CIPerspectiveTransformWithExtent

The properties you use to configure a perspective transform with extent filter.

CIPhotoEffect

The properties you use to configure a photo-effect filter.

CIPixellate

The properties you use to configure a pixellate filter.

CIPointillize

The properties you use to configure a pointillize filter.

CIQRCodeGenerator

The properties you use to configure a QR code generator filter.

CIRadialGradient

The properties you use to configure a radial gradient filter.

CIRandomGenerator

The properties you use to configure a random generator filter.

CIRippleTransition

The properties you use to configure a ripple transition filter.

CIRoundedRectangleGenerator

The properties you use to configure a rounded rectangle generator filter.

CISRGBToneCurveToLinear

The properties you use to configure an sRGB-to-linear filter.

CISaliencyMap

The properties you use to configure a saliency map filter.

CISepiaTone

The properties you use to configure a sepia-tone filter.

CIShadedMaterial

The properties you use to configure a shaded material filter.

CISharpenLuminance

The properties you use to configure a sharpen luminance filter.

CISixfoldReflectedTile

The properties you use to configure a sixfold reflected tile filter.

CISixfoldRotatedTile

The properties you use to configure a sixfold rotated tile filter.

CISmoothLinearGradient

The properties you use to configure a smooth linear gradient filter.

CISpotColor

The properties you use to configure a spot color filter.

CISpotLight

The properties you use to configure a spotlight filter.

CIStarShineGenerator

The properties you use to configure a star-shine generator filter.

CIStraighten

The properties you use to configure a straighten filter.

CIStripesGenerator

The properties you use to configure a stripes generator filter.

CISunbeamsGenerator

The properties you use to configure a sunbeams generator filter.

CISwipeTransition

The properties you use to configure a swipe transition filter.

CITemperatureAndTint

The properties you use to configure a temperature and tint filter.

CITextImageGenerator

The properties you use to configure a text image generator filter.

CIThermal

The properties you use to configure a thermal filter.

CIToneCurve

The properties you use to configure a tone curve filter.

CITransitionFilter

The properties you use to configure a transition filter.

CITriangleKaleidoscope

The properties you use to configure a triangle kaleidoscope filter.

CITriangleTile

The properties you use to configure a triangle tile filter.

CITwelvefoldReflectedTile

The properties you use to configure a twelvefold reflected tile filter.

CIUnsharpMask

The properties you use to configure an unsharp mask filter.

CIVibrance

The properties you use to configure a vibrance filter.

CIVignette

The properties you use to configure a vignette filter.

CIVignetteEffect

The properties you use to configure a vignette-effect filter.

CIWhitePointAdjust

The properties you use to configure a white-point adjust filter.

CIXRay

The properties you use to configure an X-ray filter.

CIZoomBlur

The properties you use to configure a zoom blur filter.