Monday, July 13, 2009

The Journey Continues...

...into the realm of C/C++.

I have been absent for a while (again) while i try and get uni under control. My second-to-last semester seems to have blown by in a great hiss and roar, along with the break between semesters (which i can't really say was much of a "break" for me). Oh well, so Uni goes. Only one more semester to go.

Recently i've been getting up to my neck in various image processing projects, and most recently i decided to attempt using OpenCV for my latest assignment since i was going to use it for my project anyway. Yes, i would rather code in C/C++ than Matlab. Not to mention all the tools i am using are free. The one bit of proprietry software i'm using is Microsoft Visual Studio 2008 Professional edition, not for the .NET libraries and classes, but simply because it's easier to import OpenCV and cvBlobsLib into (because these libraries are written in Visual C++). Oh and also because the company i am doing my project for is working in Visual Studio. And technically this is still a freebie because i recieved a copy courtesy of the MSDNAA (Acedemic Alliance) program. Otherwise i would probably just work in Eclipse, even if i had to manually build the libraries from source.

OpenCV itself will appear kind of hideous to someone like myself who hasn't had much experience with non object-oriented programming. It's easy enough to use though, and makes the whole process as painless as possible. OpenCV includes libraries for just about everything imaginable; from basic array operations to filtering and segmentation, to object recognition and motion tracking. It really is the most versatile library you will find for image processing. It was not complete though. Naturally as it is, OpenCV lacks blob labelling and feature measurement/generation.

Enter cvBlobsLib, a complement to the base OpenCV library which basically adds all of the above. It even has Matlab-like profiles for blobs, including features such as the convex hull, ellipse best fit, max pixel dimentions, area, perimeter, etc.

The final library i will mention is actually a set of libraries i stumbled upon while looking for a way to iterate through the files in a directory (and the C/C++ standard libraries currently have no directory/file lookup functionality). Boost is a free library collection which adds alot of much-needed functionality to C++. Not only does it do this, but it does it for free, and is compatible across most (if not all) operating systems, courtesy of the POSIX interoperability standard. In lamens terms, you can use this set of libraries on Windows, Linux, MacOS, and even some other less well-known operating systems without any major issues.

Now hopefully, with this combination of free libraries tacked together i will be able to go full speed ahead with both my project and assignment.