## 3 Materials and Methods
### Shape Representation  
In this step, each image from the dataset is represented as a single number using a selected shape description algorithm--each number is a simple shape descriptor. The descriptors of all frames from a sequence are combined into one vector and values are normalized to [0, 1] range. This makes it easy to observe how the individual shape features change over time and how they differ between actions. Figure 3 depicts example vectors as line graphs using very simple feature which is an area of a convex hull. Each input action sequence can be denoted as a set of binary masks \(BM_{i}=\{bm_{1},bm_{2},...,bm_{n}\}\), which is represented by a set of normalized descriptors \(SD_{i}=\{sd_{1},sd_{2},...,sd_{n}\}\), and \(n\) is the number of frames in a particular sequence.  
Simple shape descriptors are basic shape measurements and shape ratios, often used to describe general shape characteristics. A shape measurement is a relative value dependent on the scale of the object. Shape ratio is an absolute value that can be calculated using some shape measurements. Selected simple shape descriptors are listed below (based on [31; 32; 33; 34]):  
* Area and perimeter, as the number of pixels belonging to the shape's region or contour respectively.
* Feret measures (Feret diameters):
* X Feret and Y Feret, the distances between the minimal and maximal horizontal and vertical coordinates of a contour respectively;
* X/Y Feret, the ratio of the X Feret to Y Feret;
* Max Feret, the maximum distance between any two points of a contour.
* Shape factors:
* Compactness, the ratio of the square of the shape's perimeter to its area;
* Roundness, measures shape's sharpness based on area and perimeter;
* Circularity ratio, defines how a shape is similar to a circle. It can be estimated as the ratio of the shape's area to the shape's perimeter square. It is also called a circle variance and calculated based on the mean and standard deviation obtained using distances from centroid to the contour points;  
Figure 2: Exemplary trajectories for ten different actions of one actor: actions performed in place are in the top row (bending, jumping-jack, jumping in place, one-hand waving and two-hand waving) and actions with changing location of a silhouette are depicted in the bottom row (jumping forward, running, galloping sideways, skipping and walking). Centroid trajectory is displayed over sample frame from a corresponding video sequence.  
* Ellipse variance, defines how a shape is similar to an ellipse and can be estimated as a mapping error of a shape fitting an ellipse where both have the same covariance matrix. Similarly to circle variance, mean and standard deviation are used;
* Width/length ratio, the ratio of the maximal to the minimal distance based on distances between centroid and contour points.
* Minimum bounding rectangle (MBR)--defines a smallest rectangular region that contains all points of a shape. A MBR can be measured in different ways and some ratios can be calculated:
* MBR measurements, which include area, perimeter, length and width. Length and width can be calculated based on specific pairs of MBR corner points, however in our experiments we always consider the shorter MBR side as its width;
* Rectangularity, the ratio of the area of a shape to the area of its MBR;
* Eccentricity, the ratio of width to length of the MBR (length is the longer side of the MBR and width is the shorter one);
* Elongation, a value of eccentricity subtracted from 1.
* Principal axes method (PAM), which defines two unique line segments that cross each other orthogonally within a shape's centroid. The lengths of the principal axes are used to calculate eccentricity which is the measure of aspect ratio.