16

I've been looking into implementations of Hidden Markov Models in C++ lately. I was wondering If I could use any of the existing HMM libraries written in C++ out there to use with Action Recognition (with OpenCV)?

I'm tying to AVOID "re-inventing the wheel"!

Is it possible to use Torch3Vision even though(looks like) it was designed to work for speech recognition?

My idea is that, if we can convert the feature vectors into Symbols/Observations (using Vector Quantization - Kmeans clustering), we can use those symbols for decoding, inference, parameter learning (Baum–Welch algorithm). This way it would work with Torch3Vision in OpenCV.

Any help on this will be truly appreciated.

garak
  • 4,713
  • 9
  • 39
  • 56

2 Answers2

12

You can take a look at http://www.ece.ucsb.edu/Faculty/Rabiner/ece259/Reprints/tutorial%20on%20hmm%20and%20applications.pdf for the theory behind HMMs. It's not hard to implement the algorithms yourself.

For a C-based version, you can take a look at my implementation, http://code.google.com/p/accelges/, which I've done for a Google Summer of Code project.

Paul Borza
  • 191
  • 1
  • 7
  • Code was helpful. So, the Code Written for gesture recognition can be used in Computer Vision (for Action Recognition) when we use right kind of feature vectors? – garak Dec 21 '11 at 12:26
5

There is also this implementation that I wrote several days ago. It is a class for discrete HMM using OpenCV. You may take a look here:

https://sourceforge.net/projects/cvhmm/

After quantization of your features, you can convert each feature vector to one label and use the sequence of labels to train a discrete HMM.

Omid Sakhi
  • 140
  • 1
  • 5
  • Sakh. I have a query here (http://stackoverflow.com/questions/34754602/hmm-for-image-sequence-classification-in-opencv-c) regarding the use of the library, could kindly advice? – Benson Jan 13 '16 at 08:50