Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Core Image filters allow you to process images extremely quickly. Recipe 7-6 introduces CI filtering by applying a simple sepia filter to images captured from the onboard camera. This filter is not applied to a live video feed but rather to individual images.
This recipe is powered by a simple NSTimer that fires ten times a second. Each time it fires, the snap: method grabs the current ciImage from its helper (as defined in Recipe 7-5). If the user has enabled filtering (using a simple bar button toggle), the code creates a new sepia tone filter, sets the image as its input, adjusts the input intensity to 75%, and then retrieves and displays the output image.