Dynamic Ellipse Fitting on blobs in an image

September 13, 2006

Dynamic Ellipse Fitting on blobs in an image means placing an elliptical human model on detected foreground to classify either the foreground contains a human or not. First of all, if the blob size(foreground size) is less than some threshold then it is not a human. If it is a human, then we perform this technique to decide either there are more than one person or not. In short, we use dynamic ellipse fitting for Occlussion Removal.

The technique to place a dynamic ellipse is as follow:

Center of Image —> (Xi,Yi)
Center of blob —–> (Xb,Yb)

Angle for the orientation of the ellipse depends upon the distance from the center and also the location of the blob in an image, therefore

Angle————–> 180 – ((arctan((Yb-Yi)/(Xb-Xi)))*180/Pi)

Equation of the ellipse is:
————————-
x^2/a^2 + y^2/b^2 = 1
————————-
this can be expanded to:
(Xb-Xi)^2/Rx^2 + (Yb-Yi)^2/Ry^2 = 1

=> (Xb-Xi)^2*Ry^2 + (Yb-Yi)^2*Rx^2 = Rx^2*Ry^2

where Rx = Wi/hx, Ry = Hi/hy

Wi = width of the image
Hi = height of the image
hx = ??????? (still not finalized)
hy = ??????? (still not finalized)

distance of the blob from the center of an image -> sqRoot((Yb-Yi)^2 + (Xb-Xi)^2)
this thing will be used to adjust the values of hx and hy. In this way a variable length ellipse will be
placed on the blobs in an image.


Background Subtraction – Grimson’s Algorithm

August 26, 2006
Background Subtraction is a technique in which background and foreground are segmented so that we can perform our required algorithms (such as face detection, gender classification etc). The basic approach for background subtraction is to store the background image as the reference image, in which there is no movement and then in every other frame subtract the reference image to extract the alien objects in the scene. The alien objects are captured as foreground and these are used for further applications.
Since the background does not always remain constant (mainly because of light changes or continuous movement of leaves) therefore we need to develop an approach in which we update the background continuously so that minute changes in the background are made part of the background. Grimson’s algorithm is one of the most reliable algorithms to facilitate adaptive background subtraction.
Grimson’s Algorithm
The algorithm models each pixel with a mixture of Gaussians. At every frame, for each pixel, distance of pixel’s color value is calculated from each of the associated K Gaussian distributions. Every new pixel is checked against all existing distributions. The match is the distribution with Mahalanobis distance less than a threshold. The mean and variance of unmatched distributions remain unchanged. The matched distributions are updated by using alpha blending concept. For the unmatched pixel, the lowest weight Gaussian is replaced by the new Gaussian with mean at the new pixel and an initial estimate of covariance matrix. Then we sum up distributions less than some threshold to decide whether the current pixel is part of the background or foreground.
Reference
“Adaptive Background mixture models for real-time tracking” by Chris Stauffer and W.E.L Grimson (The Artificial Intelligence Laboratory, Massachusetts Institute of Technology)

Background Subtraction – Stauffer & Grimson’s Algorithm

August 26, 2006
Background Subtraction is a technique in which background and foreground are segmented so that we can perform our required algorithms (such as face detection, gender classification etc). The basic approach for background subtraction is to store the background image as the reference image, in which there is no movement and then in every other frame subtract the reference image to extract the alien objects in the scene. The alien objects are captured as foreground and these are used for further applications.
Since the background does not always remain constant (mainly because of light changes or continuous movement of leaves) therefore we need to develop an approach in which we update the background continuously so that minute changes in the background are made part of the background. Stauffer & Grimson’s algorithm is one of the most reliable algorithms to facilitate adaptive background subtraction.
Stauffer & Grimson Algorithm
The algorithm models each pixel with a mixture of Gaussians. At every frame, for each pixel, distance of pixel’s color value is calculated from each of the associated K Gaussian distributions. Every new pixel is checked against all existing distributions. The match is the distribution with Mahalanobis distance less than a threshold. The mean and variance of unmatched distributions remain unchanged. The matched distributions are updated by using alpha blending concept. For the unmatched pixel, the lowest weight Gaussian is replaced by the new Gaussian with mean at the new pixel and an initial estimate of covariance matrix. Then we sum up distributions less than some threshold to decide whether the current pixel is part of the background or foreground.
Reference
“Adaptive Background mixture models for real-time tracking” by Chris Stauffer and W.E.L Grimson (The Artificial Intelligence Laboratory, Massachusetts Institute of Technology)
http://www.ai.mit.edu/projects/vsam/
Overview of the algorithm is given at the following link:
http://www-staff.it.uts.edu.au/~massimo/BackgroundSubtractionReview-Piccardi.pdf
The original paper is available at the following link:
http://www.ai.mit.edu/projects/vsam/Publications/stauffer_cvpr98_track.pdf


Principal Component Analysis

August 26, 2006

PCA is an approach used for face recognition and it is also enhanced to work for gender classification and skin detection.

Basic Principles of PCA

To decompose face images into a small set of characteristic feature images called Eigenfaces, which may be thought of as the principal components of the original images. These Eigenfaces function as the orthogonal basis vectors of a linear subspace called Face Space. Recognition is performed by projecting a new face image into this face space and then comparing it position in the face space with those of known faces.

Phases of PCA

A – Initialization
Acquisition of training set of face images and calculation of Eigenfaces.

B – RecognitionGiven an image to be recognized, calculate a set of weights of M Eigenfaces by projecting it onto each of the Eigenfaces. Determine if the face image is a face at all by checking if the image is sufficiently close to the face space. If it is a face, classify the weight pattern as either a known person or as unknown. If the same unknown face is seen several times, Eigenfaces and weight patterns are updated by calculating the new face’s characteristic weight and incorporating into the known faces.

for more info:

http://en.wikipedia.org/wiki/Principal_components_analysis


Computer Vision – An Introduction

March 22, 2006

What is Computer Vision ?

Computer vision is the study and application of methods which allow computers to understand image content or content of multidimensional data in general. The term understand means here that specific information is being extracted from the image data for a specific purpose: either for presenting it to a human operator (e. g., if cancerous cells have been detected in a microscopy image), or for controlling some process (e. g., an industry robot or an autonomous vehicle). The image data that is fed into a computer vision system is often a digital gray-scale or colour image, but can also be in the form of two or more such images (e. g., from a stereo camera pair), a video sequence, or a 3D volume (e. g., from a tomography device). In most practical computer vision applications, the computers are pre-programmed to solve a particular task, but methods based on learning are now becoming increasingly common.
Computer vision can also be described as the complement (but not necessary the opposite) of biological vision. In biological vision and visual perception real visual systems of humans and various animals are studied, resulting in models of how these systems are implemented in terms of neural processing at various levels. Computer vision, on the other hand, studies and describes technical system which are implemented in software or hardware, in computers or in digital signal processors. There is some interdisciplinary work between biological and computer vision but, in general, the field of computer vision studies processing of visual data as a purely technical problem.
The related fields of Computer Vision
The field of computer vision can be characterized as immature and diverse. Even though earlier work exists, it was not until the late 1970’s that a more focused study of the field started when computers could manage the processing of large data sets such as images. However, these studies usually originated from various other fields, and consequently there is no standard formulation of the computer vision problem. Also, and to an even larger extent, there is no standard formulation of how computer vision problems should be solved. Instead, there exists an abundance of methods for solving various well-defined computer vision tasks, where the methods often are very task specific and seldom can be generalized over a wide range of applications. Many of the methods and applications are still in the state of basic research, but more and more methods have found their way into commercial products, where they often constitute a part of a larger system which can solve complex tasks (e.g., in the area of medical images, or quality control and measurements in industrial processes).
Computer vision is by some seen as a subfield of artificial intelligence
where image data is being fed into a system as an alternative to text based input for controlling the behaviour of a system. Some of the learning methods which are used in computer vision are based on learning techniques developed within artificial intelligence.
Since a camera can be seen as a light sensor, there are various methods in computer vision based on correspondences between a physical phenomenon related to light and images of that phenomenon. For example, it is possible to extract information about motion in fluids and about waves by analyzing images of these phenomena. Also, a subfield within computer vision deals with the physical process which given a scene of objects, light sources, and camera lenses forms the image in a camera. Consequently, computer vision can also be seen as an extension of physics.

A third field which plays an important role is neurobiology
, specifically the study of the biological vision system. Over the last century, there has been an extensive study of eyes, neurons, and the brain structures devoted to processing of visual stimuli in both humans and various animals. This has led to a coarse, yet complicated, description of how “real” vision systems operate in order to solve certain vision related tasks. These results have led to a subfield within computer vision where artificial systems are designed to mimic the processing and behaviour of biological systems, at different levels of complexity. Also, some of the learning-based methods developed within computer vision have their background in biology.
Yet another field related to computer vision is signal processing
. Many existing methods for processing of one-variable signals, typically temporal signals, can be extended in a natural way to processing of two-variable signals or multi-variable signals in computer vision. However, because of the specific nature of images there are many methods developed within computer vision which have no counterpart in the processing of one-variable signals. A distinct character of these methods is the fact that they are non-linear which, together with the multi-dimensionality of the signal, defines a subfield in signal processing as a part of computer vision.
Beside the above mentioned views on computer vision, many of the related research topics can also be studied from a purely mathematical point of view. For example, many methods in computer vision are based on statistics, optimization or geometry
. Finally, a significant part of the field is devoted to the implementation aspect of computer vision; how existing methods can be realized in various combinations of software and hardware, or how these methods can be modified in order to gain processing speed without losing too much performance.
Computer vision and (digital) image processing
are related fields. The distinction between the two is not very clear, e.g., computer vision uses many methods which traditionally belong to image processing. One formal distinction would be to say that image processing deals with transforming images, producing one image from another, or with producing low-level information about an image, such as edges or lines. Neither of these tasks provide, or require, an interpretation about what the image contains in terms of objects or events. Computer vision, on the other hand, uses models and assumptions about the real world depicted in the images to extract information which, e.g., can be used to control actions on objects in a scene. In more advanced systems, these models can be learned rather than programmed.

Starting from the start

March 8, 2006

March 8′ 06:

Last post I made was about months back. Now I will post daily some posts related to all work I have done in the previous year……. Previous year……..wow…….Now I have an experience of more than a year in my development career.

I have been developing in C++/VC++/VC++.Net/C#, and have used few things in backend(Access, Excel, XML and then finally I was asked to use MySql). Besides these I also used Matlab, IrfanView, VCD-Cutter,Virtual Dub and Crystal Reports…………..these are the things which I used again and again for simplifing my tasks.

The domain in which I have been working is Computer Vision…………. and the products are Customer Counting using a single Network Camera, Customer Recognition, Face Detection, Tracking…… It has been a very wonderful first year…………. I’ll discuss all the things which I read and performed research in…… I hope my coming years are as wonderful as the first one :)
Congratulations Bunty [i.e. me] for completing the first professional year.