Core Image
From Free net encyclopedia
Image:Core Image icon.png Core Image is a new technology in Mac OS X that heavily leverages the machine's GPU for image related effects. Demonstrated in the August 2004 WWDC, it provides access to the most common Graphics filters. It provides the ability to do many common types of image processing on-the-fly (which previously must be implemented by the developers' own code). Image units can be tested with the Core Image Fun House application.
Core Image has further implications than simple GUI enhancements, such as the ripple effect generated by Dashboard. Core Image can be used to perform real time image manipulations similar to Photoshop filters. These operations are implemented by bundles called Image Units. However, unlike a traditional filter that manipulates the source image, Core Image performs a manipulation as an overlay -- maintaining the original image. This is called "non-destructive" manipulation. The result is the ability to do highly complex and layered image manipulations with little or no loss in quality.
Transition effects work like filters, combining two or more images to form a result image, and accepting a time value (0 < t < 1) as a parameter. By driving an animation using a timer, a transition from one image to another is easily implemented.
Within Core Image, images are represented using floating point values to represent the pixel components within the designated color space. The use of floating point allows great precision. Multiple effects can be achieved by combining several Image Units into a sequence called an effects stack. However, for most Image Units, Core Image does not generate each intermediate image as it processes the stack; instead, it calculates the resulting mathematical operation once, then applies that result to the image. The upshot of this is that performance does not degrade dramatically as more effects are added - the pixels are only processed once no matter how complex the effects stack becomes.
Core Image is designed to leverage the processing abilities of certain types of graphics processor found on high-end video cards. This gives enormous performance benefits because large image data sets need not be moved across the main memory bus, which is one place where real-time image processing can become bandwidth bound.
Core Image, mostly being 2D, only makes use of the GPUs Pixel Shaders, Vertex Shaders are not used. This means the more Pixelshader-Pipelines a GPU has, the better will be the performance. VRAM-bandwidth is also of utter importance, a wide memory bus and fast clock greatly help performance.
However, if a suitable graphics processor is not available, Core Image will fall back to the next best option - using the Altivec processing abilities of the G5 and G4 processors, or just executing in 'normal' code on a G3. Core Image will automatically adopt the fastest approach for a given machine architecture. However, realistically, real-time processing requires a compatible GPU. When the Altivec-fallback is used (Apple recommends this for final rendering, most likely because VRAM-readback on AGP is very slow), Core Image performance scales almost linearly with the number of CPUs and their clockspeed.
Contents |
Compatible GPUs
Basically any Mac-compatible GPU that supports at least second-generation Shaders, more specifically the ARB_fragment_program OpenGL Extension or Pixelshader 2.0/DirectX 9 on the PC, can also do Core Image.
This means the following GPUs are supported (as of March 2006):
ATI
- ATI Radeon (mobility) X1600 XT
- ATI Radeon (mobility) X1600
- ATI Radeon X800 XT
- ATI Radeon 9800 XT
- ATI Radeon 9800 Pro
- ATI Radeon 9700 Pro
- ATI Radeon 9600 XT
- ATI Radeon 9600 Pro
- ATI Radeon 9650
- ATI Radeon 9600
- ATI Mobility Radeon 9700
- ATI Mobility Radeon 9600
- ATI Mobility Radeon 9550
Intel
- Intel GMA 900 (Developer Transition Kit)
- Intel GMA 950
NVIDIA
- NVIDIA Quadro FX 4500 DDL
- NVIDIA GeForce 7800 GT
- NVIDIA GeForce 6800 Ultra DDL
- NVIDIA GeForce 6800 GT DDL
- NVIDIA GeForce 6600 LE
- NVIDIA GeForce 6600 GT (flashed PC-Card)
- NVIDIA GeForce 6600
- NVIDIA GeForce 6200 (flashed PC-Card)
- NVIDIA GeForce FX 5200 Ultra
- NVIDIA GeForce FX 5200 Go
- NVIDIA GeForce FX 5200
Note: The Geforce FX 5200 is only barely suited for Core Image due to poor Pixelshader-Performance. With most Macs the CPU is faster in rendering, so Apple disabled Core Image Support for it and chose not to support the 5200 in its Photography Software Aperture.
System Implementation
Core Image is part of the System and can be implemented in any application. The Altivec- and PPC-fallback approach ensures compatibility on any system. It was introduced with MacOS X 10.4 "Tiger", so prior versions don't support it.
Apple ships a program called Quartz Composer with its Developer Tools. Its maker is Pierre-Olivier Latour, who is now employed at Apple. Quartz Composer is basically Version 2 of his program Pixelshox, which is not supported any more, but which also runs on earlier versions of MacOS X. Both Pixelshox and Quartz Composer support an approach similar to Apples compositing-program Shake in which you can generate OpenGL-based scenes by linking various building blocks with nodes, feeding the output from one module to another. A multitude of data types (e.g. boolean, numeric, image, video, RGB) and inputs (e.g. DV, image, video, generators, mouse, RSS-feed) are supported, in- and outputs can be mapped to programs in Xcode. People without any programming knowledge can build complex scenes by just linking various blocks in the right way.
Unlike Pixelshox, Quartz Composer now also supports Core Image Filters (they are delimited by a dot infront of the Module). Since Quartz Composer allows to export the scene as a Quicktime 7 movie, developers can embed these and make use of Core Image even in webpages. Since Quartz Composer only exports the scene and its assets to Quicktime and not the individual images of the video, the resulting file is very small. However, keep in mind that these Quicktime files will neither work on Windows nor on versions of MacOS X prior to MacOS X 10.4, even when they have Quicktime 7 installed.
Apple also ships a small sample program called "Fun House" with its Developer Tools that demonstrates the default Core Image filters. It is somewhat similar to the Core-Image-using program Imaginator. Dashboard uses Core Image for the Water Ripple effect and Apples photography-software Aperture also depends on it. Apples title-generator Motion employs much the same techniques of GPU-rendering, although it does not (yet) make use of Core Image as a system-API but installs its own rather similar frameworks instead. That way, it could also run in MacOS X 10.3. In Apples newest consumer media package iLife 06 some filters in iMovie make use of Core Video, too.
Image Units
- Median, Gaussian, Motion and Zoom blurs
- Noise Reduction
- Full color, hue, temperature, white point and saturation control
- Pinch, Hole, Dump, Displacement, Glass, torus Lens, Twirl, Vortex, Circle Splash and Circular warp distortions
- Several generator filters including Star Shine, Sunbeams, Checkerboard and Lenticular Halo
- Color blends: color burn, darken, difference, exclusion, hard light, hue, lighten, luminosity, multiply, overlay, saturation, screen, soft light
- Cropping
- Scaling, rotation, shearing and translation using Affine transformations
- Several halftone filters including CMYK, dot, hatched and line
- Deconvolution
- Transition effects such as Swipe, Flash, Page Curl, Copy Machine, Disintegrate with Mask, Dissolve
Core Video
Running alongside Core Image and built upon it is Core Video. Like Core Image, it allows on-the-fly editing of video, as shown in the WWDC Webcast.
Both technologies depend heavily on the system's graphics card, any Core-Image-compatible card also supports Apples Hardware-Compositor Quartz Extreme.
External links
- Mac OS X Tiger: CoreImage: preview from the Apple web site
- WWDC 2004 Keynote Webcast: original presentation by Steve Jobs
- CoreImage kernels: Some useful examples to get you started.
- Image Tricks: a freeware program for applying CoreImage effects to pictures.
- LiveQuartz: graphics application using CoreImage
- ChocoFlop: graphics application using CoreImage
- Pixelshox: the predecessor to Apples CoreImage-using Quartz Composer.
- iMaginator: graphics application using CoreImage
- Quartz Compositions: Community-page and WIKI for Quartz Compositions
- Noise Industries Factory Tools: Use CoreImage filters as special effects plug-ins in Avid non linear editors.
- Magma: Use CoreImage filters in InDesign or Illustrator.
Template:Mac OS Xde:Core Image
it:Core Image
ja:Core Image
zh:Core Image