CvBlob library as a dynamic library (DLL)

CvBlob is a dynamic library for Windows (DLL) that exposes in a C style the main functions from the very nice CvBlob static C++ library.

CvBlob is a great work by Cristobal Carnero Linan (web site: http://cvblob.googlecode.com). CvBlob finds connected components (blobs) in a binary image, using functions from OpenCV, and a very fast internal algorithm, and has many valuable features. In my opinion the best of them are the contour of the blob as sequences, and the precalculated moments.

But CvBlob is a C++ static library, so it's impossible to dynamically call it from other languages (C, Delphi, etc.). So I wrote CvBlobDLL as a DLL wrapper for CvBlob. It exposes two functions (in cvblobLL.h): cvBlobDLabel that is the main function to search the blobs, with some options to filter the results, and to return special properties of blobs; and cvBlobDRelease that simply releases the memory block allocated by the library. The blobs themselves are returned in a standard OpenCV list (CvSeq) as special type structs (CvBlobObj). Then all standard OpenCv functions can apply to the blobs list.

The downloadable ZIP archive contains: the complete DLL project, in Visual C++ 2008 Express format, with a test program; and the binaries in 32 bit version..

Compiling CvBlobDLL requires the sources of OpenCV, and the .LIB or sources of CvBlob.

The project contains three configurations: debug using OpenCV 1.0; release using OpenCV 1.0 again; and releaseOCV2 using OpenCV 2.31. All binaries were compiled as 32 bit executables, and tested on a Windows 7 64 bit system.



 
CvBlob DLL- original image CvBlob DLL- resulting image