Converting from cv::Mat to UIImage

07.25.11 Posted in iOS, Mac OS X by

I’ve been working with OpenCV and iOS development quite a bit recently and this is a handy function for getting an Apple-friendly UIImage from the C++ OpenCV class cv::Mat. Here you go: 1234567891011121314151617181920212223242526272829303132333435363738- (UIImage *)UIImageFromMat:(cv::Mat)image {     NSData *data = [NSData dataWithBytes:image.data length:image.elemSize()*image.total()];     CGColorSpaceRef colorSpace;         if (image.elemSize() == [...]


Share Build Settings between Projects in Xcode 4

06.30.11 Posted in Mac OS X by

I often find myself editing the build settings of my Xcode projects because of external libraries or weird compiler flags for Objective-C++. It’s always frustrating when starting a new project to hunt down and reapply these settings. Even though the build settings interface improved in Xcode 4 (my opinion), it’s still not fun to use [...]


Compiling HTK for Mac OS X Snow Leopard

01.22.10 Posted in Mac OS X by

The Hidden Markov Model Toolkit (HTK) is widely used in speech recognition research. Since I’ll be doing some multimodal speech recognition soon, I downloaded the HTK and tried to compile it for Snow Leopard. This didn’t work right away, and after scraping the bowels of the internet for help, I’ve finally managed to get it [...]


Mac OS X Compilation for Heyu Home Automation

06.26.09 Posted in Heyu, Home Automation, Mac OS X by

I suppose this will be much like my last post. If you don’t know much about Heyu, this is from the main website: HEYU is a text-based console program for remotely controlling lights and appliances in the home or office. The complete source is made available under the free Heyu License. Heyu uses the CM11A [...]


Social Networks
Links
Search the Archives: