# Choosing the components

Today we choose the components we will use for the project. We also took a look at how the DTW algorithm works as if it’s implemented trying to keep all the data, it takes a lot of place ,in our case as we will make comparison on 6 dimensions, we would need 1 Mb, fortunately we can reduce this number to a few Kb. We decided to use a Cortex-M4 processor with a FPU, we also made a choice for a lithium battery and thought about the design this would imply (along with other components for the sensors and the leds) .Last but not least, we made the list of the PSSCs and discussed a bit about how to have a well-organized team work.

Hugues Duvillier

### 7 comments to Choosing the components

• Alexis Polti

How are you going to reduce 1Mb to a “few kb” ? 🙂

• Hugues Duvillier

Not very difficult actually though I made it look like a big challenge : the comparison is based on a matrix recursively calculated. Keeping the whole matrix would take 1Mb as its size is more or less 1000×1000. But the result of the comparison is a single coefficient (last calculated) and we saw in the implementation of the algorithm that to get a new coefficient in the matrix, you only need some on the previous line and previous column or same line and previous column or same column and previous line. So we can carry out the computation keeping only two lines at every moment.

• gamazeps

So does that mean that only the last column of the matrix is needed ?

It would be better if you explained what this matrix is and how you plan on using it as not every one is familiar with this algorithm (at least I’m not).

• Hugues Duvillier

Ok, sorry for not going into the details I’ll do it now. The DTW algorithm compares to sequences (of whatever you like) by trying to transform the first one in the second thanks to a set of elementary operators (typically : delete a coefficient, insert a coefficient, replace a coefficient). Calculating the transformation’s total cost in done recursively and generates a matrix of intermediary cost depending on which operators you chose at each step. The final cost is therefore the last coefficient in the matrix (last line, last column) but to get that far you need of course to calculate every other coefficient and each one depends on the coefficients that are on the same or previous line and the same or previous column that’s why we can keep only two lines at a time during the process (or two columns in fact).

• Felix

I don’t understand exactly what you want to do and why you have 6 dimensions… But to recognize gestures without saving the full datas couldn’t you use a fingerprinting algorithm (like Shazam, etc.)?

• Hugues Duvillier

We try to recognize gestures with an IMU so we will use a three axes accelerometers and gyroscope that’s why I said we had six dimensions. Actually we will save the full data for our motion but implementing the DTW algorithm will generate a matrix that we don’t need to store completely. Still thanks for the comment, I will give a look at Shazam’s algorithm.

• As I told caro, you might be interested by the following links:
* MIT gesture recognition toolkit: http://www.nickgillian.com/software/grt
* \$1 Unistroke Recognizer: http://depts.washington.edu/aimgroup/proj/dollar