The kernel, although it is the heart of an image processing filter, becomes an image unit only after it is properly packaged as a plug-in. Your most important tasks in the packaging process are to copy your kernel routine (or routines) into the kernel skeletal file provided by Xcode and to modify the code in the in the implementation and interface files for the filter. There are a few other housekeeping tasks you’ll need to perform to correctly categorize the filter and to identify your image unit as your product. You’ll also need to describe its input parameters.
This chapter provides an overview to the image unit template in Xcode and describes the contents of the filter files. Then, it shows how to create these image units:
A color inversion image unit that uses the kernel routine discussed in “Color Inversion.” It uses one sampler object and does not require a region-of-interest method.
A pixellate image unit that uses the kernel routine discussed in “Pixellate.” It uses one sampler object and requires one region-of-interest method.
A detective lens image unit, which uses the two kernel routines discussed in “Writing Kernel Routines for a Detective Lens .” It uses requires several sampler objects and two a region-of-interest methods.
Before you follow the instructions in this chapter for writing the Objective-C portion of an image unit, you should understand how the kernel routines discussed in “Writing Kernels” work.
The Image Unit Template in Xcode
Creating a Color Inversion Image Unit
Creating a Pixellate Image Unit
Creating a Detective Lens Image Unit
Next Steps
Last updated: 2008-06-09