Who Should Read This Document?
Organization of This Document
See Also
vImage, introduced in Mac OS X v10.3, is a high-performance image processing framework. It includes high-level functions for image manipulation—convolutions, geometric transformations, histogram operations, morphological transformations, and alpha compositing—as well as utility functions for format conversions and other operations. You can call vImage functions from Cocoa, Carbon, and command line applications.
vImage optimizes image processing by using the CPU’s vector processor. If a vector processor is not available, vImage uses the next best available option. This framework allows you to reap the benefits of vector processors without the need to write vectorized code.
To understand the information in this document, you should be familiar with Macintosh application development, the C programming language, and the basics of image representation and manipulation.
The vImage framework isn't the only image processing API that Mac OS X provides. Starting in Mac OS X v10.5, you also have the option of using Core Image. vImage is the ideal choice if you need to process large quantities of high-resolution images for scientific and medical projects.
This document is for developers who need to write Macintosh programs that process large images quickly. Because technologies such as Quartz 2D and Core Image provide most common image manipulation routines, vImage is not intended for general-purpose image processing. It is particularly suited for:
Incorporating high-performance graphics into their applications
Efficiently processing large images
Real-time video processing software
Scientific applications that require high-accuracy numerical calculations
Getting consistent numerical results across platforms despite video card arithmetic inconsistencies
This document is organized into the following chapters:
“Overview of vImage” introduces vImage and discusses how it optimizes image processing. It introduces the Accelerate framework, and explains how vector processing is used to achieve better performance. This also offers general usage guidelines for vImage and describes the workflow for incorporating vImage into an application.
“Performing Convolution Operations” explains the theory behind kernel convolution, a technique frequently employed in image processing to apply a filter to an image. It describes how convolutions can be performed with vImage and provides several sample kernels.
“Performing Geometric Operations” explains what a geometric operation is and which ones are supported in vImage.
“Performing Morphological Operations” describes what morphological operations are and the types available in vImage.
“Performing Histogram Operations” discusses histograms and how they can be useful for calibrating or analyzing images.
“Performing Alpha Compositing Operations” explains the theory behind alpha compositing and the alpha channel and shows how they can be used in vImage to create layered visual effects.
“Performing Image Transformation Operations” introduces the use of callback functions to alter each pixel in an image.
You might find these other Apple developer documents of value as you determine your image processing needs:
Image I/O facilitates the process of reading and writing images of various formats to and from the disk. vImage does not do this for you. It may be worth familiarizing yourself with Image I/O so that you can more effectively supply vImage with data.
If you want to add image processing capability to an application to support color adjustment, halftone effects, stylizing filters, compositing, and transition effects, you might want to consider Core Image. The Core Image framework is a high-level Objective-C programming interface that has more than 800 built-in filters and supports writing your own custom filters.
OpenGL Programming Guide for Mac OS X
If you have a need for hardware-accelerated 3D graphics, Mac OS X provides an implementation of the OpenGL graphics standard.
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)