blTexture — Load an IplImage into an opengl texture and create webcam and video textures using the blImageAPI

Introduction Today I introduce a simple class that will help us load IplImage images into opengl textures. This simple class, as I will continue to show you in later posts, provides us with a very easy and powerful method to intermix images, videos and 3d graphics. In the end, you’ll…

Continue reading

blMemStorage — A simple data structure to wrap OpenCV’s CvMemStorage with shared_ptr

Introduction As part of the blImageAPI series that we’re running, in this short article, we present a simple data structure used to wrap OpenCV’s CvMemStorage with boost::shared_ptr. The use of boost::shared_ptr allows for automatic garbage collection and lets us check the validity of pointers, which will save us from those horrific opencv…

Continue reading

blImageAPI — Convert an opencv image from RGB to HSV color space no matter what the depth is

Introduction When we start playing with images, dealing with colors becomes an inevitibility. Over the past hundreds of years, different ways to look at colors have evolved in the form of color spaces. These color spaces help us conceptualize colors in advantageous ways. In this article I present a couple…

Continue reading

blImageAPI — Take the negative of an opencv image, no matter what the depth is

Introduction I have created the blImageAPI to make life easier when it comes to programming images and videos. In this article I present a couple of functions that make it a snap to take the negative of an image, no matter what its depth or number of channels are. In…

Continue reading

blImageAPI — separate an opencv image into its individual channels

Introduction I have created the blImageAPI to make life easier when it comes to programming images and videos. In this article I present a couple of functions that make it a snap to play with image channels. In the end, you’ll be able to do the following: How do I…

Continue reading

blImageOperators — Overloaded operators and functions to use blImage as a generic matrix in c++

Introduction blImage makes working with images in OpenCV a snap.  Automatic garbage collection, automatic type conversion and 100% compatibility with opencv algorithms, all that accomplished with the help of boost::shared_ptr and template meta-programming. Now, to expand its usefulness and applicability, in this post I present a collection of overloaded operators…

Continue reading

blCaptureDevice — A simple data structure to handle video sources in OpenCV

Introduction When it comes to OpenCV, dealing with images and videos means dealing with finicky pointers.  This, as could be attested by all who have played with OpenCV before, can quickly lead to “out of memory” and other obscure error messages that the library loves so much to spit at you.…

Continue reading

blImage — An image data structure based on shared_ptr and IplImage*

Introduction Back in the good old days of OpenCV 1.1 and earlier, the main image structure used throughout their algorithms was IplImage. Playing with IplImage requires skillful manipulation of data in memory, and thus makes it very difficult for beginners to play.  Even experts run into the dreaded memory leaks caused by…

Continue reading

Using OpenCV within QTCreator in Windows

UPDATE:  If you’re trying to compile opencv look at this article. This is a quick post to answer a simple question that I have seen floating around the web with no definitive answer, using OpenCV in QTcreator. Note:  Check out this other post for using OpenCV 2.2 in QTCreator within Windows. Note:  Check…

Continue reading