ContentFull

OpenCV 2.0 for OSX 10.6

December 28th, 2009

There are plenty of people lost after discovering that OpenCV no longer fully functions with OSX 10.6. I have been working on making changes to update OpenCV 2.0 to work with 10.6 at 32/64 bit. This meant deprecating the use of Carbon (who uses that anymore anyway) and updating the Quicktime implementation which now must use QTKit framework. Nick Butko was nice enough to have already implemented the Quicktime features, so it was a matter of just merging all the changes.

A fork of OpenCV 2.0 can be found at https://code.google.com/p/opencv-cocoa/ which has both the Cocoa and Quicktime updates. This is completely tested so use it with caution. Any help and suggestions are greatly appreciated.

Because Cocoa functions strictly inside a MVC framework there is a small change that you must make at initializing HighGUI that is found here. It boils down to the fact that your code cannot run in the main thread, because Cocoa needs to run there. So to update any existing projects you must remove your code from the main function and place it in an auxiliary function which is called by cvInitSystem.

I have not yet made any benchmarks, so there is a chance that using Cocoa and QTKit at either 32 or 64 bit is not imperative for improving performance of your code. The main purpose is to allow the usage of other libraries in conjunction with OpenCV which already work at 64bit and may depend on Cocoa.

Category: Programming

Comments(0)

The reason Matlab persists

September 27th, 2009

While Matlab may not be in the cutting edge of computing, it does have one great qualitiy: amazing service. While I still have major gripes towards using it due to its slowness, antiquated programming language, and lack of Mac support, they did an honest effort in fixing a bug I filed. Within 24 hours someone contacted me asking for more information about the bug, and a week later I was told files were available that would fix the issue. While the fix didn’t fix much, and it was not in an easy to use patch, they did try. Never would an open source solution be so helpful.

Comments(0)

Image warping with OpenCL

September 8th, 2009

Finally image warping is no longer painful. In previous projects warping images was the slowest component in the algorithm. In face tracking for instance a good 1/3 to 2/3 of the time was just warping them. OpenCL finally changes all of this. With just a hundred lines you can warp +12,000 images (each 48×48) in under 1 second! It could take up to a 1 sec to do 300 samples without GPU processing.

It is extremely easy to write OpenCL kernels (although there is room for improvement) and here is the warping kernel I have written.

Category: Programming

Comments(0)