• 26 Nov 2016 »

    Ongoing Deep Learning Projects

    image-classification using pretrained vgg16

    We have a few deeplearning projects encapsulated in jupyter ipython notebooks in the the notebooks directory of this github repository The code written is mainly by us, But we have shown credit where ever we have used code from other repositories. We have used tensorflow and jupyter ipython notebooks with ipywidgets installed

    more...
  • 04 Feb 2016 »

    Understanding Gabor Filter

    fig-1, 2D  gaussian times cosine wave

    This is an informal tutorial on the intuitive theory behind gabor filters used for image segmantation.

    more...
  • 03 Jun 2014 »

    HOG implementation and object detection

    Histogram Oriented Gradient (HOG) has been proven to be a versatile strategy in detecting objects in cluttered environments. Since the concept is simple enough, we came up with a c++ implementation which was used for detecting passing cars on two lane high ways.

    result Also, please see this video

    more...
  • 08 Mar 2014 »

    calculating OpenGL perspective matrix from OpenCV intrinsic matrix

    How can we calculate the OpenGL perpsective matrix, from the camera calibration matrix (intrinsic matrix) and other parameters?

    result

    more...
  • 29 Oct 2012 »

    small experiments with r value references in c++11

    This is a small experiment which I did, which shows how move constructor and r-value references in c++11 can avoid unnecessary calls to the copy constructor. I used mingw and gcc 4.7.

    more...
  • 07 Jul 2010 »

    observation: maintaining self pointers in the boost way

    A novice programmer once asked a master programmer, “Oh venerable master, can an instance of a class keep a shared_ptr to itself? If so will that class be ever deleted? Why would somebody want to do something like that?”

    The master smiled and the following explanation happened.</b>

    more...
  • 03 Jul 2010 »

    Using boost::shared_ptr on class hierarchies

    boost::shared_ptr has become one of the most versatile smart_pointer structures used in C++. If you consistently use shared_ptr to refer to objects, you don’t have to worry when to destroy them. We would like to see how boost::shared_ptr can be used amidst up-casting and down-casting across class hierarchies.

    more...
  • 28 May 2010 »

    Retrieving transformation info from instances

    Suppose you have a huge number of similar objects in world space. These objects can be represented as instances. But, the meshes of these objects are in world space and are represented as un-related objects. The meshes are given to be of identical geometry and topology and material assignment. Also, it is given that, the unknown transformation that happened in creating each of the mesh is of affine nature ( ie: one involving, scale, rotation, shearing and translation ). Given two similar meshes in world space, how can one guess the transformation that transforms one mesh to another?

    more...
  • 30 Sep 2009 »

    facial deformation transfer

    We discuss a scheme by which we can transfer the deformation of a source face to a target face, using a given set of correspondence pair of points. The target face could be of different, geometry, or transformation.

    more...
  • 08 Jul 2009 »

    Generic observer pattern implementation

    Introduction

    We implement a generic observer pattern framework below. The observer design pattern can be employed as a core architectural element of a software package. In this pattern, objects called subscribers can arrange to have notified of any state change from an object called subject. GUI systems use this pattern to implement distributed event handling.

    In our terminology the the object observed is called Observed and the object who wants to get notified is called a Subscriber. The subscription function which a Subscriber wants to get notified through, is housed in a lightweight class called Subscription.

    We use a mixture of dynamic polymorphism and generic programming to connect the observer functions to the object observed. The user of this framework is hidden from much of the template complexity that happens internally. A good sample of test cases are also provided which covers most of the ways subscribers are hitched to an observed object.

    An illustrative example can be downloaded here. Here is another viewable version of the code.
    more...
  • 07 Jan 2009 »

    static poly morphism for multi platform api

    Suppose if we are developing games for multiple platforms with the same code base, often we need to use some amount of poly-morphism to capture the platform-generic nature of components. Let us say that we are developing for the PC and PS2 platform. It is quite natural for us to have a base class called Texture, and derived classes called PCTexture and PS2Texture. The derived classes would contain the platform specific implementation of the Texture component. But in a single build configuration, we would be having only one kind of these derived classes. If the build configuration is PS2_Debug or PS2_Release, then the compiled code would not contain any instance of the PCTexture class. In fact, at compile time, we make the decision of which of the derived class is going to be used. So, the kind of runtime poly-morphism or dynamic poly-morphism using base-derived classes and v-tables is not a necessity.

    more...
  • 04 Dec 2008 »

    old and miscellaneous software

    This is a collection of assorted software which I had written way back in 2003. Please note that these are 5 years old, so they may have lost some topical value now.

    more...
  • 23 Nov 2008 »

    stl wrapper for maya container classes

    In the Maya SDK array container classes which are

    • MIntArray
    • MFloatArray
    • MDoubleArray
    • MVectorArray
    • MPointArray
    • MFloatPointArray
    • MFloatVectorArray
    • MCallbackIdArray
    • MAttributeSpecArray
    • MColorArray
    • MDagPathArray
    • MMatrixArray
    • MRenderLineArray
    • MTimeArray
    • MTrimBoundaryArray
    • MUint64Array

    has got an entirely different interface compared to the stl conatiner classes. They dont expose any iterator interface. Consequently we cannot use the data contained in them in stl or generic algorithms.

    So we have come up with a templatized wrapper class MArray_stl. A wrapper class for MFloatVectorArray would be defined as

    typedef kg::MArray_stl< float, MFloatVector, MFloatVectorArray > MArray_stl_fv;

    more...
  • 22 Nov 2008 »

    A generic DAG walk algorithm

    This is an example of a simple walk through a dag data structure, written in the paradigm of generic programming. Since a tree is always a dag, this can be easily applied to a tree walk, with or without further simplification.

    You can access this as a downloadable version here. The core generic dag walk header file is here.

    Introduction

    The contribution of this implementation here is two unrelated functionalities.

    • Using generic programming, split data structure and algorithm, there by promoting code re-use
    • Expose the api to preserve user defined stackable information during the walk, through program stack and recursion
    more...