Core Image
   HOME

TheInfoList



OR:

Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying filters and effects within the
Quartz Quartz is a hard, crystalline mineral composed of silica ( silicon dioxide). The atoms are linked in a continuous framework of SiO4 silicon-oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall chemical f ...
graphics rendering layer. The framework was later added to iOS in iOS 5.


Overview

Core Image abstracts the pixel-level manipulation process required when applying a filter to an image, making it simple for applications to implement image transformation capabilities without extensive coding. In a simple implementation, Core Image applies a single ''Image Filter'' to the pixel data of a given source to produce the transformed image. Each Image Filter specifies a single transform or effect, either built into Core Image or loaded from a plugin called an ''Image Unit''. Combined with preset or user-defined input parameters, the filter can be applied to the original pixel data without modifying it, thereby providing non-destructive image editing. Like
Photoshop Adobe Photoshop is a raster graphics editor developed and published by Adobe Inc. for Windows and macOS. It was originally created in 1988 by Thomas and John Knoll. Since then, the software has become the industry standard not only in raster ...
, Core Image can apply multiple filters to the same image source. Instead of applying a series of filters individually, Core Image assembles a dynamic ''instruction pipeline'' so that only one calculation needs to be applied to the pixel data to achieve a cumulative effect. Applying the pixel operations associated with multiple filters can be achieved simultaneously and without a significant increase in processing time. Regardless of the number of filters, Core Image assembles the code for this instruction pipeline with a
just-in-time compiler In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compilation during execution of a program (at run time) rather than before execution. This may c ...
, which is executed by either the CPU or graphics card's GPU, whichever can perform the calculation faster. Filters are written in the ''Core Image Kernel Language'', which shares a subset of commands with OpenGL Shading Language (GLSL). When a compatible GPU is available, the Core Image compiler writes the instruction pipeline using GLSL, handling buffers and states transparently. Although GPU rendering is preferred, the compiler can operate in a ''CPU fallback'' mode, generating commands suitable for the current CPU architecture instead. CPU fallback uses the vector processing capabilities of the current CPU or CPUs, and it is multi-processor aware. Thus, Core Image performance depends on the GLSL capabilities of the GPU or the processing power of the CPU. With a supported GPU, most effects can be rendered in realtime or near-realtime.


History and implementation

Core Image was introduced with Mac OS X 10.4. Early examples of its use can be found in the ''ripple effect'' in
Dashboard For business applications, see Dashboard (business). A dashboard (also called dash, instrument panel (IP), or fascia) is a control panel set within the central console of a vehicle or small aircraft. Usually located directly ahead of the drive ...
, and Apple's professional digital photography application,
Aperture In optics, an aperture is a hole or an opening through which light travels. More specifically, the aperture and focal length of an optical system determine the cone angle of a bundle of rays that come to a focus in the image plane. An ...
. Starting with
Mac OS X 10.5 Mac OS X Leopard (version 10.5) is the sixth software versioning, major release of macOS, Apple Inc., Apple's desktop and server operating system for Macintosh computers. Leopard was released on October 26, 2007 as the successor of Mac OS X Tig ...
, any application that implements Image Kit can utilize Core Image.
Preview Preview may refer to: Theatre, film, television * Preview (subscription service), an early subscription television service in the United States * Preview (theatre), a public performance of a theatrical show before the official opening * Previe ...
and iPhoto are common examples. In 2011, Apple added Core Image to iOS in iOS 5.0. The
Xcode Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS. It was initially released in late 2003; the latest stable release is version 14.2, released on December 13, ...
Tools include Core Image Fun House and
Quartz Composer Quartz Composer is a node-based visual programming language provided as part of the Xcode development environment in macOS for processing and rendering graphical data. Quartz Composer uses OpenGL (including GLSL), OpenCL (only in Mac OS X Sno ...
; both utilize Core Image.


Pixel accuracy

All pixel processing provided by an Image Unit is performed in a pre-multiplied alpha (
RGBA RGBA stands for red green blue alpha. While it is sometimes described as a color space, it is actually a three-channel RGB color model supplemented with a fourth ''alpha channel''. Alpha indicates how opaque each pixel is and allows an image to ...
) color space, storing four color channels: red, green, blue, and transparency (
alpha Alpha (uppercase , lowercase ; grc, ἄλφα, ''álpha'', or ell, άλφα, álfa) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter aleph , whi ...
). Each color channel is represented by a 32-bit,
floating point In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can ...
number. This provides exceptional color depth, far greater than can be perceived by the
human eye The human eye is a sensory organ, part of the sensory nervous system, that reacts to visible light and allows humans to use visual information for various purposes including seeing things, keeping balance, and maintaining circadian rhythm. ...
, as each pixel is represented by a 128-bit vector (four 32-bit color channels). For color spaces of lower bit-depth, the floating-point calculation model employed by Core Image provides exceptional performance, which is useful when processing multiple images or video frames.


Supported graphics processors

Any programmable GPU that supports the required OpenGL Shader ( GLSL) commands is Core Image capable. Apple has used the following graphics cards to support Core Image GPU processing in Mac OS X 10.4 and Aperture, so the following list could be considered an example of minimum requirements: * ATI Mobility Radeon 9700 (Mobility Radeon 9600 is also capable) * ATI Radeon 9550, 9600, 9650, 9600 XT, 9600 Pro, 9700 Pro, 9800 XT, and 9800 Pro * ATI Radeon X600 XT, X600 Pro, X800 XT, X850 XT, X1600, X1900 XT * ATI Radeon HD 2400 XT, HD 2600 Pro, and HD 2600 XT * NVIDIA GeForce FX 5200 Ultra, FX Go 5200 * NVIDIA GeForce 6600, 6600 LE, 6800 Ultra DDL, and 6800 GT DDL * NVIDIA GeForce 7300 GT, 7600 GT, and 7800 GT * NVIDIA GeForce 8600M GT & 8800 GT * NVIDIA GeForce 9400M & 9600M GT * NVIDIA GeForce GT 120 & GT 130 * NVIDIA GeForce GTX 285 * NVIDIA Quadro FX 4500 & FX 5600 * NVIDIA Quadro FX 4800 * NVIDIA Quadro 4000 * NVIDIA GeForce 320M * NVIDIA GeForce GT 330M * NVIDIA GeForce GT 640M * NVIDIA GeForce GT 650M * NVIDIA GeForce GTX 660M * NVIDIA GeForce GTX 675M * NVIDIA GeForce GTX 680MX * NVIDIA GeForce GT 750M * NVIDIA GeForce GT 755M * NVIDIA GeForce GTX 775M * NVIDIA GeForce GTX 780M * Intel GMA 900,
GMA 950 The Intel Graphics Media Accelerator (GMA) is a series of integrated graphics processors introduced in 2004 by Intel, replacing the earlier Intel Extreme Graphics series and being succeeded by the Intel HD and Iris Graphics series. This series ...
, or
GMA X3100 The Intel Graphics Media Accelerator (GMA) is a series of integrated graphics processors introduced in 2004 by Intel, replacing the earlier Intel Extreme Graphics series and being succeeded by the Intel HD and Iris Graphics series. This series t ...
* Intel HD Graphics 3000(Sandy Bridge) * Intel HD Graphics 4000(Ivy Bridge) * Intel HD Graphics 5000(Haswell) * Intel Iris 5100(Haswell) * Intel Iris Pro 5200(Haswell) * Intel HD Graphics 5300(Broadwell) * Intel HD Graphics 6000(Broadwell) * Intel Iris 6100(Broadwell) Note that any GPU capable of handling Core Image instructions is also
Quartz Extreme Quartz Compositor is the display server (and at the same time the compositing window manager) in macOS. It is responsible for presenting and maintaining rasterized, rendered graphics from the rest of the Core Graphics framework and other rende ...
capable. The requirements for Core Image are greater than those of Quartz Extreme.


Built-in filters

macOS includes many built-in filters, including the following ones. Mac OS X 10.4 introduced over 100 of them, and Mac OS X 10.5 has added to the list. * Blurs, like Median, Gaussian, Motion, and Noise * Color Adjustments & Effects, like Exposure, Gamma Adjust, and Sepia Tone * Composition Operations, like Addition and Multiply Blends, or Hard Light * Distortions, like Pinch, Circle Splash, and Vortex * Generators, like Star Shine and Lenticular Halo * Geometry Adjustments, such as Crop, Scale, Rotate, and
Affine transformation In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles. More generall ...
* Halftone, Tile, and Posterize filters * Transitions, such as Dissolve and Ripple An open source documentation website for built-in Core Image filters is maintained a
CIFilter.io


See also

*
Aperture In optics, an aperture is a hole or an opening through which light travels. More specifically, the aperture and focal length of an optical system determine the cone angle of a bundle of rays that come to a focus in the image plane. An ...
* Core Image Fun House *
Quartz Composer Quartz Composer is a node-based visual programming language provided as part of the Xcode development environment in macOS for processing and rendering graphical data. Quartz Composer uses OpenGL (including GLSL), OpenCL (only in Mac OS X Sno ...
* LiveQuartz * Pixelmator *
impromptu An impromptu (, , loosely meaning "offhand") is a free-form musical composition with the character of an ''ex tempore'' improvisation as if prompted by the spirit of the moment, usually for a solo instrument, such as piano. According to ''Allgeme ...
* GEGL, a programming library used by
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized ...
*
Windows Imaging Component Windows Imaging Component (WIC) is a COM-based imaging codec framework introduced in Windows Vista (and later available in Windows XP Service Pack 3) for working with and processing digital images and image metadata. WIC enables application d ...
, a Windows component with similar API design but with fewer supported image operations.


References


External links


Core Image Programming Guide – Mac OS X Developer Library


- announcement of Mac OS X 10.4, including Core Image
Filterpedia
- open source
Swift Swift or SWIFT most commonly refers to: * SWIFT, an international organization facilitating transactions between banks ** SWIFT code * Swift (programming language) * Swift (bird), a family of birds It may also refer to: Organizations * SWIFT, ...
app demonstrating almost every available built-in CoreImage filter along with custom GLSL and Metal based filters by Simon Gladman. {{macOS macOS APIs Graphics libraries