Core Image for Swift
Advanced Image Processing for iOS
Simon J Gladman
This book is available for download with iBooks on your Mac or iOS device. Multi-touch books can be read with iBooks on your Mac or iOS device. Books with interactive features may work best on an iOS device. iBooks on your Mac requires OS X 10.9 or later.
Core Image is a powerful framework offering image processing and analysis for both iOS and OS X. It offers Swift developers a simple API to a wide range of image based effects.
Core Image for Swift is a comprehensive guide to Core Image for iOS Swift developers. It covers all areas of working with Core Image for processing still images
The chapters are:
Introducing Core Image
Core Image Filters in Detail A detailed look at Core Image filters with descriptions of their categories and examples of filter use.
Displaying Filtered Images Looks at different approaches for displaying Core Image output and covers UIImageView, using OpenGL with GLKView and using Metal with MTKView.
Convolution Filters Looks in detail at convolution filters and their effects.
Custom Composite Filters Looks at creating new filters with composites of existing built-in filters
Custom Filters with Core Image Kernel Looks at writing filters from scratch with Core Image Kernel Language
Color Kernels A detailed look at CIColorKernel
Warp Kernels A detailed look at CIWarpKernel
General Kernels A detailed look at CIKernel
Advanced Kernels Discusses advanced kernels for creating fluid dynamic and reaction diffusion systems
Custom Filters with Metal Discusses wrapping Metal compute shaders in a Core Image filter to create effects impossible with CIKernels
ModelIO Based GeneratorsDiscusses using ModelIO’s texture generation tools to create unique imagery such as procedural skies and smooth, color noise for use with Core Image
Working with vImageDiscusses using Accelerate / vImage in conjunction with Core Image to implement histogram and morphology operations which aren't included as part of Core Image.
All chapters are accompanied by fully documented open source Swift projects.
What's New in Version 1.3.1
Renamed ModelIO to Model I/O in text Minor typo fixes Removed references to “next book”. Added new Chapter 13 discussing vImage Fixed some formatting issues
Thoughtfully structured and well documented
This book provides a great introduction to Core Image in Apple’s new Swift language. All of the examples are backed by code with many links to Github projects and Swift playgrounds. I was able to create a demo app on my iphone so I could follow along with some of the examples on how to chain filters together. He provides multiple ways of acheiving the same result.
The main challenge I found in the book is that some of the topics made me feel way out of my depth. This is not a fault of the book, this is just me encountering new things like kernal scripts. These are also well documented, I just haven’t had a chance to test them out in Xcode yet.
Regardless, Simon has a good pedagogical approach and clearly explains concepts. This goes a long way in making this a useful book for learning about Core Image.
Complex image processing made easy.
Without doubt the best writing you will find on Core Image. The author explains the basics of the Core Image API and objects, and then wastes no time jumping straight into showing how powerful the framework is, and how only small amounts of code are needed to produce seriously impressive image processing and effects. The code examples are very well thought out, in that each chapter introduces a new concept and then reinforces it with multiple examples. The examples strike a great balance in all being short, in terms of lines of code, yet are hugely powerful too. And cool. I worked through them and you find your brain quickly gets familiar with the best techniques for exploiting the power of Core Image, and how easy it is to chain together filters to produce your own unique combinations of effects. Admittedly I had worked with Core Image from the old Objective-C days, but had never used the CIKernel part of the framework. If you’re an applications programmer who normally hides away when the word “kernel” surfaces, fear not, the author shows in numerous examples how to tap into the power of integrating both simple and complex shader kernels into your Core Image pipeline. Another great aspect of this author’s approach is that all the example code is exactly that, it’s purely code-based, and doesn’t require you to dip into Interface Builder to wire up GUI objects. While that’s straightforward enough in itself, his approach will save novices from getting stuck not knowing where an outlet or action hasn’t been connected properly. And it keeps the focus on exactly what this book is about, Core Image. If you’re familiar with Apple’s AV Foundation framework you’ll appreciate how straightforwardly everything in Simon’s book can be integrated with video too, on both iOS and OS X. The author also shows how to leverage Metal, Apple’s newest framework for fully exploiting GPUs. In summary, a lot of advanced image processing stuff is explained in an easily understandable manner, with loads of great examples.
Great book about CoreImage!
This book goes into great details explaining all aspects of dealing CoreImage in Swift. Amount and quality of supporting code is simply amazing! I highly recommend this book to anyone who wants to be introduced or to to learn in-depth details of CoreImage