Kalman Filter

Kalman Filter is a set of mathematical equations that provides an efficient computational (recursive) means to estimate the state of a process, in a way that minimizes the mean of the squared error. It uses a series of measurements observed over time, containing noise (random variations) and other inaccuracies, and produces estimates of unknown variables that tend to be more precise than those that would be based on a single measurement alone.The filter is named for Rudolf (Rudy) E. Kálmán, one of the primary developers of its theory.

»
Posted in Computer Vision

CAMShift with SimpleCV

GSoC 2012 Mid-Term evaluations are over and I passed. As usual we had a meeting on Wednesday 11:30 am EST on IRC where I and Kat discussed the tracking scenario of SimpleCV and how to implement different tracking algorithms with efficiency. She advised me that the tracking object should live in FeatureSet so that the tracked path can be stored in Features. So, it looks like this

»
Posted in Computer Vision

Face Tracking with CAMShift

CAMShift stands for Continuously Adaptive Mean Shift. It is the basis for the face-tracking algorithm in OpenCV. It combines the basic Mean Shift algorithm with an adaptive region-sizing step. The kernel is a simple step function applied to a skin-probability map. The skin probability of each image pixel is based on color using a method called histogram backprojection. Color is represented as Hue from the HSV color model.

»
Posted in Computer Vision

Sobel Operator

The Sobel Operator is used in Image Processing to get the edges in the image. It is a Discrete Differentiation Operator which computes an approximation of the gradient of the image intensity function.The Sobel operator is based on convolving the image with a small, separable, and integer valued filter in horizontal and vertical direction and is therefore relatively inexpensive in terms of computations. The sobel operator calculates the gradient of the image intensity at each point, giving the direction of the largest possible increase from light to dark and the rate of change in that direction. Each image point, the gradient vector points in the direction of largest possible intensity increase, and the length of the gradient vector corresponds to the rate of change in that direction.

»
Posted in Computer Vision

Boost::Python with OpenCV

In my previous post Configuring Boost::Python and Hello Boost, I have shown how to configure Boost::Python. I have managed to use OpenCV C++ with Python, using Boost::Python. I have been able to load and show an image successfully.

»
Posted in Computer Vision

Configuring Boost::Python and Hello Boost

In my recent blog posts, I have mentioned that python is quite slow and I need to find an option to increase run-time speed of my python port of OpenTLD. I need to extend Python with C++ and hence I was looking at all the available options. I have once used swig bindings. I can’t say anything about it’s performance, but it was kind of boring to use swig. I had to make few files and then compile and make. So I started looking at other options. Python/C API is good but you need to pass pointer reference, objects and sometimes it just becomes messy. I have never tried Cython. I might give it a shot.

»
Posted in Computer Vision

Get data from Mat / cv::Mat in OpenCV

I have been working on George Nebehay’s OpenTLD version to port it to python and it has given me a good amount of exposure to C++ and OpenCV with C++. I must confess that I never thought C++ would be so amazing. Despite of C++ being an intermediate-level language, I think it’s better than Python. The usage of pointers and robustness/run-time speed are plus point of C++ over Python. Python may be a very high level language and easy to understand, I don’t think it can be compared to C++ yet.

»
Posted in Computer Vision

Install OpenCV 2.4.* in Ubuntu 12.04 Precise Pangolin

Install OpenCV 2.4.0

»
Posted in Computer Vision

ANSII Color Formatting for output in Terminal using Python

To get colored output in terminal,

»
Posted in Python

Capture any visible window and save it as an image in Linux

Out of nowhere, I found this out. I thought I was in IPython shell and I did import cv2. A crossbar showed up. So, I moved it around for a while and then clicked. Nothing happened. I did import mftracker. Again a crossbar showed up. When I clicked, nothing happened. After few moments, I realized I was in Terminal and not in IPython shell.

»
Posted in Python

Tracking in OpenTLD aka Predator

As my Google Summer of Code 2012 project, I have to port OpenTLD to python using OpenCV and SimpleCV. OpenTLD a.k.a. Predator was first made by Zdenek Kalal in MATLAB. OpenTLD. It is one of the most reliable algorithms to track objects. The algorithm include on-line training and learning. The algorithm which consists of off-line training take days and lots of data to train and learn.

»
Posted in Computer Vision

Median Flow Tracker using SimpleCV/ OpenCV - GSoC week 1 and 2

Work in the first two weeks of my Google Summer of Code had been quite slow. I couldn’t find much time as I was busy with travel and some college stuff. I have finished making a Median Flow Tracker for OpenTLD. I am trying to port OpenTLD to python. I am working with George Nebehay’s version of OpenTLD.https://github.com/gnebehay/OpenTLD .

»
Posted in Computer Vision