1 Introduction

There are various biometrics that are available in commercial applications namely iris recognition, voice, speech, finger print, hand writing etc. Gait is one of the various biometrics that are currently being used in many projects. Gait recognition is a technique that recognizes a person based on their movement such as patterns in walking, running, jumping etc. It is considered normally that every human has a unique kind of gait pattern. Though gait recognition is new in the domain of biometrics, it seems to dominate the world of vision-based applications. It can be used in places such as surveillance, military, offices and in places where unauthorized entry are not allowed. It helps in recognizing people from a distance that makes it attractive among other biometrics, and the targeted human do not do anything for authentication such as touching machine pad in fingerprint recognition.

A detailed description of various methods in vision including representation, segmentation and recognition are given in [1] and a report on gait is given by Dawson [2]. Gafurov [3] proposed that the uniqueness in gait can be known by the shoe-type worn by a person. It was found by experimenting with four kinds of shoes that the one that is heavier reduces the discrimination. In this paper, we are trying to recognize gait patterns in a hospital environment for considering ‘pre-consultation urgent help needed’ case. When the person is coming to hospital, he may be in good condition or may be feeling light-headed. A camera would be installed on the wall to detect whether the person is in good condition and can come for consultation himself or he is having serious problem and needs immediate attention of hospital staff. The scenario would be considered as ‘pre-consultation urgent help needed.’ This approach uses SVM for classification and MS Kinect for detecting depth and robust segmentation. The steps in proposed approach are shown in Fig. 1. This study would extend our developed system [4, 5] and would be emerged in multimodal system in future.

Fig. 1
figure 1

Block diagram for gait recognition

2 Background work

Hosseini [6] explains gait recognition in depth with the technique of radon transform. Guo [7] proposed that mutual information (MI) method can provide to be the best tool for high-dimensional data. They have proved that MI analysis helps in giving good accuracy with fewer features. Mazzaro [8] proposed model validation technique for gaits where each class of gait is associated with a nominal model and a class of inputs that has bounded energy. This technique helps to find whether a given sequence corresponds to a particular gait movement or not. Chen [9] proposed that human silhouette with good quality will have a positive effect on gait recognition. They suggested that it is possible to do gait recognition with the help of frame difference energy image in the midst of incomplete silhouette. Wang [10, 11] proposed that the shape cues of the body biometrics helps in automatic gait recognition and it is possible to recognize gait based on silhouette also.

SVM is one of the available classifiers that produce higher recognition rates [12]. It is a learning method that can be used for both classification and regression. Its major applications are in the field of text categorization, image classification etc. Fazli [13] briefs how gait recognition is possible using SVM and LDA where only samples of human on a tread mill with many variations such as with bag, without bag, kind of clothing etc. are taken. Nakajima [14] proposed that they have developed a system that can learn from examples. They use multiclass SVM classifier and the results are compared to k-nearest neighbor. Pontil [15] proposed that without feature extraction and pose estimation also it is possible to do object detection.

Dockstader [16] proposed a new model-based technique for the gait patterns in human motion in 3D tracking. This method helps in extracting gait variables from a set of models that best describes the form and behavior of the person. Zhao [17] proposed that fractal scale wavelet analysis helps to describe and recognize the gait movement. The proposed system can handle noise and occlusion, with the help of histograms of oriented gradients was explained by Dalal [18]. The process of [19] seems to be highly intricate as shown in Fig. 2. Considering discriminant analysis, feature space transformation on the basis of real gallery features and synthetic gallery features. Then, finally, fusion is made for the recognition to be complete. If the database is small, it would work fine but when larger database is to be tested, it becomes a problem as there are number of intermediate steps to attain the final target. All research work at present seems to be concentrated in the direction of increasing the recognition rate and decrease time complexity using various methods with the same kind of applications [2022].

Fig. 2
figure 2

Flow of gait recognition in [19]

3 Proposed method

In different applications, researchers have used different biometrics successfully. As this experiment is considering hospital environment and would be further useful for disease detection by gait patterns, it contains different kinds of constraints. If iris recognition was considered [23], its image intensity decreases as the distance increases. Also a good light condition is needed. Also the candidate (human) has to come to machine for giving biometric. This is also same for others such as fingerprint, palm print etc. In case of facial expression, the person has to face the camera otherwise the recognition would be poor, or multi cameras are needed. So, the gait biometric was chosen as it can handle the demerit posed by other biometrics. It can be tracked from a distance, and a normal light condition is enough. In this proposed system, we could track person in various frames with the camera fixed at a single place.

A classifying technique is need to be chosen for this approach. After comparison from available literature, SVM seems a better option than other classifiers. The major properties of SVM are to minimize the empirical error and to maximize the geometric margin. There are two classes of margin available, one is hard margin that separates the two classes without error and the other is the soft margin that can handle non-separable data by allowing errors. There are two kinds of classifications possible namely ‘one against one’ where one of the mentioned categories is separated while others are merged and the second category is ‘one against many’ where each model is classified and placed in a category. The video was captured with the Kinect and analyzed frame by frame as shown in Fig. 3. As the Kinect work is based on depth sensor, there is no issue in image segmentation [24].

Fig. 3
figure 3

Sequence of walking pattern

4 Feature vector calculation method

The feature vector was calculated in the following steps-

  1. 1.

    First, (X, Y, Z) vectors of each angle are calculated.

  2. 2.

    Then, the vector of the line joining the two joints is calculated.

Let (X \(_{1}\), Y \(_{1}\), Z \(_{1})\) and (X \(_{2}\), Y \(_{2}\), Z \(_{2})\) be the vectors of the upper right hand and lower right hand. With the help of these vectors, values namely M and A are calculated for the purpose of evaluating Theta1,, which is the angle formed by both upper and lower right hand. Then, Theta1 value is calculated.

The angle value of each hand and leg is calculated with following equations

$$\begin{aligned}&M=\surd \left[ {\left( {{X}_{1} ^{{2}}+{ Y}_{1}^{{2}}+{Z}_{1} ^{{2}}}\right) *\left( {{ X}}_{2}^{{2}}+{Y}_{2}^{{2}}+{{Z}_{2}^{{2}}}\right) } \right] \end{aligned}$$
(1)
$$\begin{aligned}&{A}=\left[ {\left( {{X}_{1}*X_{2}}\right) +\left( {Y_{1} *{Y}_{2}}\right) +\left( {{Z}_{1} *{Z}_{2}}\right) } \right] /{ {M}}\end{aligned}$$
(2)
$$\begin{aligned}&Theta{1}=\hbox {acosf}(A) \end{aligned}$$
(3)

Equation 13 signifies how the angle value namely Theta1 is calculated. In a similar manner, other vectors of left hand, right leg and left leg are calculated and the theta values namely Theta2, Theta3 and Theta4 are generated. Other features namely velocity is calculated with the help of the formula for velocity calculation using the distance and time.

5 Implementation

According to experimental setup, Kinect would track the human walking in its visual capturing range. It will take live video of the scene, and proposed method would analyze it for feature calculation. A walking pattern is shown by a target person in Fig. 3. This method needs to detect both hand and legs as linear edges to calculate Theta1, Theta2, Theta3 and Theta4 as described above. For this, Kinect APIs are used to track and segment human in the current image frame.

Microsoft Kinect API provides methods to extract the skeleton of a number of people visible in the camera view. The information of the first tracked skeleton is accessed by calling the functions, and data is stored in the variable skeleton. The absolute position of the right and left hands has to be extracted from the skeleton information. The coordinates of the hands is then used to set the edge marks for further processing. In the same way, left and right legs’ information was accessed and edges were marked. Figure 4 shows the edges marked on the tracked human in real time.

Fig. 4
figure 4

Stick figure of human being tracked

The angles, velocity and depth of the both hands and legs are calculated for each part. The velocity feature is calculated at the line joining the two points and not at the angle. This is needed because when the leg is moved there is not much movement given to the upper half of the leg. In such a case, a misclassification may occur. The values of normal walk and crippled walk are maintained in database for recognition purpose.

After SVM classification for 40 normal and 35 abnormal samples of walking pattern, the confusion matrix is shown in Table 1. It explains that using proposed method the misclassified patterns are very few. Out of 35 samples taken as abnormal walking, only one of them is classified as normal walk and out of 40 samples taken as normal walk, only two of them are classified as abnormal walk.

Table 1 Confusion matrix for walking patterns

The Kinect captures 30 frame per second, and this method takes every 5th frame to analyze. So, only six frames per second was considered. As the motion is real time and continuous, this fps rate is also very satisfactory and gives good accuracy rates because human cannot walk very fast. In this method, if the walk is normal, the SVM classifier classifies it as ‘NORMAL’ and shows a message that person seems in good condition. On the other hand, if the person who is walking seems to cripple, then it classifies as ‘ABNORMAL’ and shows a message to staff that this person needs help and further needs to be diagnosed.

6 Analysis

This section discusses the accuracy measurement of the proposed method. In Table 1, four results are marked as a, b, c and d. The following equations will calculate accuracy (AC), true positive (TP), false positive (FP), true negative (TN), false negative (FN) and precision (P) from the values of Table 1.

$$\begin{aligned}&\hbox {AC}= \left( {a+d}\right) / \left( {a+b+c+d}\right) \end{aligned}$$
(4)
$$\begin{aligned}&\hbox {TP}= (d)/({c+d}) \end{aligned}$$
(5)
$$\begin{aligned}&\hbox {FP}= (b)/(a+b) \end{aligned}$$
(6)
$$\begin{aligned}&\hbox {TN}= (a)/(a+b) \end{aligned}$$
(7)
$$\begin{aligned}&\hbox {FN}= (c)/(c+d) \end{aligned}$$
(8)
$$\begin{aligned}&P = (d)/(b+d) \end{aligned}$$
(9)

The values of true positive, true negative, false positive and false negative help in getting the performance of gait recognition coupled with SVM. The values calculated by Eqs. – are shown in Table 2. The overall success rate of the proposed gait recognition system is 96 %. As much of hardware is also not required, it turns out to be cost-effective system.

Table 2 Measure of accuracy for gait recognition

7 Accuracy comparison

The most commonly used biometrics are iris, face, voice etc. that can be tracked only when person is near the biometric capturing machine or in the direction of machine such as face or iris capturing. The probability that a patient coming to hospital when feeling light-headed, in the scenario of ‘pre-consultation urgent help needed,’ would face the camera is nearly zero. So, gait seems a good option for detection. The system accuracy for gait recognition can be considered much better in comparison with other biometric results.

If we increase the dataset in the SVM classifier, accuracy may further be improved. Once this system is installed, the change in the gait of a person can be recognized and acted immediately preventing serious consequences. The Table 3 helps in comparing the recognition rate for different biometrics such as gait, fingerprint, iris etc. It is clear that gait is giving the highest recognition rate in normal scenario. So, gait is a better biometric to recognize robustly and highly recommended for normal life applications.

Table 3 Recognition rate for various biometrics

8 Conclusion

We have discussed a gait recognition system that can help us in detecting some urgent situations with people coming to hospital. The Kinect camera provides real time images of the person and after segmentation, skeleton was tracked. A new-type velocity-based feature vector was defined and extracted for both hands and legs. Here, the velocity is calculated at the line joining the joints in the body part and it improves the efficiency. A multiclass SVM classifier was opted, and the time complexity was optimized for this system. The gait method is opted as it can recognize at a distance without the intrusion of environment, background, dress, shoe etc.

This paper specifically discusses hospital environment and ‘pre-consultation urgent help needed’ situation with gait- recognition technique. Although the proposed method can be applied to many other scenarios, it can get desired results there. This method can also be applied in hospital and at homes where aged and mentally challenged people are there. It further may be useful in detecting few diseases including homeostasis. In future, we are planning a multimodel system that would be installed in the hospital to take care of patient’s movement anytime.