*3.2. 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 *BMi* = {*bm*1, *bm*2, ..., *bmn*}, which is represented by a set of normalized descriptors *SDi* = {*sd*1,*sd*2, ...,*sdn*}, 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–34]):

	- **–** 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.
	- **–** 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;
	- **–** 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.
