c++ functions — Working with numbers

This entry is part 4 of 6 in the series blMathAPI -- BarbatoLabs Math API

Introduction I’m collecting all the common numeric function I have used over the years in a small file, keeping track of their dependencies. In this post, I will present to you all the functions I use, what they’re used for, and their dependencies.  I will be updating this post as…

Continue reading

blQuaternion — A simple quaternion in c++

This entry is part 3 of 6 in the series blMathAPI -- BarbatoLabs Math API

Introduction This is part of my on going effort to publish all the mathematical tools that I have developed and used over the years.  In this article, I present a simple quaternion class, which I use in many applications, from machine vision to physics simulation, to 3d graphics. As with the…

Continue reading

blVector3d — A simple 3d vector in c++

This entry is part 2 of 6 in the series blMathAPI -- BarbatoLabs Math API

Introduction As I have mentioned in my blPoint2d article, over the years, I have developed many mathematical tools that I have used time over time. In this article, I present a simple three-dimensional vector class, which I use in many applications, from machine vision to physics simulation, to 3d graphics.…

Continue reading

blPoint2d — A simple 2d point structure in c++

This entry is part 1 of 6 in the series blMathAPI -- BarbatoLabs Math API

Introduction When developing physics, engineering or any other type of technical applications, there are basic mathematical tools that I have found myself using time over time. In this article, I design and build a simple two-dimensional point/vector structure with some basic functionality, keeping in mind code readability. Here’s a snippet of…

Continue reading

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

This entry is part 2 of 17 in the series blImageAPI -- BarbatoLabs Image API

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*

This entry is part 1 of 17 in the series blImageAPI -- BarbatoLabs Image API

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

Simple Memory/Resource Management with Garbage Collection in C++

The Premise We’ve all heard, contrary to what we c++ programmers know, how hard c++ is, and how much harder memory/resource management and garbage collection are in c++. But with a little help from the boost libraries, everything is possible, and downright easy. Resource management and garbage collection are something…

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