CocoaConf Review

by Bob McCune on April 24, 2013

I had the great opportunity this spring to attend and speak at a couple different stops on the CocoaConf Spring Tour. I was at the event in D.C. in March and this past weekend returned from the event in San Jose. Now that I've had a couple CocoaConfs under my belt I thought I'd share my thoughts on the conference.

CocoaConf is a technical conference for iOS and Mac developers. The conference offers three concurrent tracks on a wide variety of topics so at any given time you're sure to find something of interest to you. The sessions offer a nice mix of introductory and advanced technical topics along with some great business-oriented talks as well. It has a really strong speaker line up featuring guys like Daniel Steinberg, Bill Dudney, Chris Adamson, and Jeff LaMarche, to name but a few. It was great to meet so many of the people whose writing and other works have been a big source of professional inspiration over the years.

One aspect of the conference I really like is the organizers put a cap on the number of attendees at a given event. Having a smaller group of attendees makes it much easier to meet new people, make new friends, and have meaningful conversations. I have learned a lot from the people I have met over the past couple months and listened to a lot of great stories along the way.

No mention of CocoaConf would be complete without discussing the family behind the conference. The Klein family puts on the conferences and does a great job of juggling the logistics while managing to make everything run like clockwork. It has been great getting to know Dave and his family a bit better. I can't say enough good things about the Kleins and am very thankful for their contributions to the Cocoa community.

The bottom line is CocoaConf is a great place to learn, connect, and grow. The CocoaConf Spring Tour may be over, but the bus will be rolling again this fall. Be sure to keep an eye on their website for upcoming dates. If you haven't been to CocoaConf before you owe it to yourself to go.

[ 0 comments ]

Media Editing with AV Foundation

by Bob McCune on March 25, 2013

This past weekend I spoke at the CocoaConf event in DC. This was my first time attending CocoaConf so didn’t know what to expect, but I was very impressed by the format and quality of the conference and thought the organizers did an excellent job. I’m speaking again in San Jose next month and will post a more thorough review of the conference when I get back.

I gave a talk entitled “Composing and Editing Media with AV Foundation” where I dove into the details of the media creation and editing APIs. This is one of the more interesting areas of AV Foundation, but it is also the least documented which makes it particularly difficult to learn. Hopefully, this session and its associated sample app will make it easier for others to get started.

You can find the materials for the talk here:

Speaker Deck: Composing and Editing Media with AV Foundation

Slideshare: Composing and Editing Media with AV Foundation

GitHub: AV Foundation Editor

I’ll be giving this talk again next month so I look forwarding to seeing you at CocoaConf San Jose!

[ 4 comments ]

Learning AV Foundation – Slides & Code

by Bob McCune on March 14, 2013

Tonight I gave an updated version of my “Learning AV Foundation” talk at the MN CocoaHeads meeting. In a rare move I actually posted my slides and sample code before I gave the talk. You can find the materials here:

Speaker Deck: Learning AV Foundation

Slideshare: Learning AV Foundation

GitHub: AV Foundation Demos

Thanks to everyone who turned out tonight. You guys continue to make the MN CocoaHeads groups one of the biggest and best CocoaHeads groups in the country.

[ 0 comments ]

Learning AV Foundation

by Bob McCune on March 11, 2013

AV Foundation is Apple’s advanced Objective-C framework for working with timed media in iOS apps. The framework, as we know it today, was first introduced in iOS 4 and has seen signficant additions and enhancements in both iOS 5 and iOS 6. Starting with Mac OS 10.7 it is also the default media framework for the Mac platform which means Apple is investing the bulk of its media engineering resources in its development. Clearly AV Foundation is important to Apple and if media matters to you and your applications, it should be important to you as well.

AV Foundation is a very impressive framework with a broad and powerful feature set. However, it’s not a particularly easy framework to learn to use. It’s quite large with many classes, functions, and protocols so simply understanding where to start can be a challenge. It also relies on a number of advanced language features such as blocks, KVO, and Grand Central Dispatch so it can be a lot to bite off if you’re just starting out with the Mac or iOS platforms. But the single biggest reason this is a difficult framework to learn is it is so poorly documented. The AV Foundation Programming Guide is badly out of date and the API docs can, at best, be described as sparse. My best guess as to why this is the case is that the development team’s technical writers are always on vacation at release time. This means the only real way to learn to use the framework is through a significant investment of time, lots of experimentation, and the use of one or more high blood pressure medications.

One of my recent goals is to help people better understand how to use AV Foundation. I started working on this last fall when I gave my “Learning AV Foundation” talk at 360|iDev. I’ll be giving an updated version of that talk this week at the Minnesota CocoaHeads meeting. I’ll also be giving a talk entitled “Composing and Editing Media with AV Foundation” at the CocoaConf stops in DC and San Jose in the coming weeks. As part of both talks I have sample apps that I’ll be releasing on GitHub that will illustrate how to make use of the framework.

I’ve got some additional things planned for later this year and will post more about those when I get a bit closer. I like to do at least one useful blog post a year so, who knows, maybe I’ll even find the time to write about the topic on my blog.

[ 0 comments ]

Learning iOS Programming Now Available

by Bob McCune on August 28, 2012

This past spring I developed an introductory training course called Learning iOS Programming for Infinite Skills. Given my background in training I had been considering developing a course like this for some time and when the opportunity came along I was eager to jump on it. Developing and producing the course was no small effort, but I’m glad I did it and am happy with the results. I hope it will be a useful resource for developers moving to the iOS platform.

The course is now officially available from the Infinite Skills website and you can also find it on O’Reilly’s Safari Books Online. Check it out and let me know what you think.

I mentioned that this is my first video training course, but it definitely won’t be my last. My company, TapHarmonic, has been hard at work on some new offerings that we’ll hopefully be ready to reveal later this year. Stay tuned!

[ Comments on this entry are closed ]

iOS 5 Face Detection with Core Image

by Bob McCune on March 22, 2012

One of the great new features of iOS 5 is the addition of the Core Image (CI) framework. This framework has been available for a few years on the Mac, but now its advanced image processing and filtering capabilities are available on the iOS platform as well. One particularly cool new feature available in Core Image, on both iOS 5 and Lion, is its ability to detect faces in an image. Thanks to some recent inspiration from Jon Steinmetz over at Pixel Research Labs I have put together this tutorial showing how to use this great new feature.

Getting Started

The face detection API is surprisingly simple to use. It really boils down to two classes: CIDetector and CIFaceFeature. CIDetector is responsible for performing the analysis of an image and returns a collection of CIFaceFeature objects describing the face(s) found in the image. You begin by creating a new instance of CIDetector using its detectorOfType:context:options class method.

CIDetector can currently only be configured to perform face detection so you’ll always pass the string constant CIDetectorTypeFace for the type argument. The context and options arguments are optional, but you will typically provide it an options dictionary describing the accuracy level to use. This can be configured by defining a dictionary with the key CIDetectorAccuracy and a value of either CIDetectorAccuracyLow or CIDetectorAccuracyHigh. The high accuracy algorithm can produce far more accurate results, but takes significantly longer to perform the analysis. Depending on what you need to accomplish you may find the low accuracy setting produces acceptable results.

Analyzing the Image

With a properly configured detector in hand you’re ready to analyze an image. You call the detector’s featuresInImage: method passing it an image to analyze. The Core Image framework doesn’t know anything about UIImage so you can’t directly pass it an image of this type, however, UIKit provides a category on CIImage making it easy to create an instance of CIImage from a UIImage.

The featuresInImage: method will return a collection of CIFaceFeature objects describing the features of the detected faces. Specifically, each instance defines a face rectangle, and points for the left eye, right eye, and mouth. It only defines the center point of each feature so you’d have to perform some additional calculations if you’d need to know the feature’s shape, angle, or relative location.

Visualizing the Results

The following images show examples of the face detection API in action. The images illustrate the differences between the low and high accuracy settings along with the approximate times it took to run the detection. The location of the detected features is not significantly different between the two images, but you’ll notice the high accuracy setting took more that 10x longer to compute on an iPhone 4. It will likely require a fair amount of testing of a representative set of images to determine the appropriate accuracy setting for your app.

CIDetectorAccuracyLow

~253ms on iPhone 4

CIDetectorAccuracyHigh

~ 2810ms on iPhone 4

I have put together a sample app containing images of several iconic faces. Flip through the images and run the analysis to see the face detection in action. You can run the sample on the simulator, but I’d recommend running it on your device so you can get a realistic sense for the performance. Enjoy!

Download iOS 5 Sample App: Faces

[ Comments on this entry are closed ]