Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 7. Working with Images > Recipe: Adding a Core Image Filter

Recipe: Adding a Core Image Filter

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial