You are on page 1of 5

A New Deliberation of Embedded based Assistive

System for Yoga


Chinnaiah M C, Kausalya Nandan T P, Haritha P, Sanjay Dubey & I.A.Pasha
Department of ECE, B V Raju Institute of Technology,
Narsapur, Medak, Telangana, India
chinnaaiah.mc@bvrit.ac.in

Abstract— This paper presents a design of Embedded based In this paper, the proposed 'EASY' provides the solution
Assistive System for Yoga (EASY) and its implementation for for posture correction of individual subject with image
the yoga postures analysis. Yoga is a proven solution for the processing techniques, by this posture rectification has been
human physical and mind activities. The human posture performed. Here Kinect sensors have been used for capturing
analysis or gesture analysis in noninvasive methods are highly
the depth image of the asana. It is then processed and
appreciable solutions. In this regard, the proposed newly
designed EASY is integrated with image processing techniques. analyzed in a virtual environment using LabVIEW, and then
The node points are marked on human anatomy as per skeleton matched with asanas from the database for percentage of
joints virtual method. An image based skeleton approach accuracy and the practitioner guided accordingly.
algorithm has been developed to analyze the Yoga postures like The rest of the paper is organized as follows. Section II
Parsva Tadasana. The Embedded based Assistive System for explains in detail the related work. Section III gives the
Yoga is embodied using Kinect sensor and LabVIEW. The proposed approach; block diagram of the system is explained
experimental results of EASY have been published for real time in section IV. The results of the processed images are
subjects (human). validated in the section V.
Keywords— Yoga, Embedded design, Image processing, II. RELATED WORK
LabVIEW
Yoga practice can cure depression, anxiety, sleeplessness
I. INTRODUCTION and many other physical health issues. Because of the
Today human life habituated to medication for every immense benefits of yoga there is a thirst for self-training
reasons. These medicines completely transmitted throughout system. Hua-Tsung Chen et.al [2], proposed a Yoga self-
the body giving a relief from pain. Instead, these medication training system for performing the yoga posture correctly and
impact human body with many side effects which could be prevent from injury caused by improper postures. This is
psychological and / or physical. With regular use of these paper not covered about the subject training under Yoga
medicines, a person goes under effects viz. concentration trainer. Patil et. al [3] in their work on “Yoga tutor” carried
levels, memory loss, learning efficiency, self-confidence, out with Speeded Up Robust Features (SURF) to identify and
physical strength, immunity and flexibility. Hence, a best visualize the performance of asana posture among the
solution for improving these losses accomplished through practitioner and the trainer. Whereas, only the contour
practicing of Yoga Asanas. Practicing yoga asanas will help information obtained from one particular-direction cannot
a person to decrease the depression, improve muscular describe and differentiate the asana performance
flexibility and strength, immunity, organized respiration and appropriately. Luo et al. [4] in their work proposed a Yoga
energy level. These yoga asanas can be a best solution for training system on the basis of motion replication technique
controlling asthma, vision, hypertension, diabetes, arthritis, (MoRep). The designed Interface Suit, consisting of Inertial
body pains etc [1]. Measurement Units (IMUs) and tactors, captures body
motions, but it does influence the practitioner’s exercising.
Practice of Yoga asana improves the human physical W. Wu et. al [5] proposed a yoga expert system, which
body and mind as well leads to healthy subject. Each yoga instructs training technique based on images and text.
asana has a particular procedure and is associated with However, the practitioner’s posture is not analyzed and the
dedicated benefits. But an individual cannot perform yoga instructions should be followed on time.
without the proper guidance from a yoga guru or trainer.
Unguided practice causes harm to muscles and ligaments. In In this paper, we have proposed an image based skeleton
this competitive and busy world, not every individual may approach algorithm to analyze the yoga posture, the case
afford time to visit a yoga institute or take training under an study has been developed for ParsvaTadasana (Side Bending
experienced yoga teacher. Hence, there is a requirement and Mountain Pose). By practicing this posture the practitioner
necessity of an assistive device that helps the user to practice can have the benefits like improved inward focus, shoulder
these asanas for individual benefit. Many researchers have and spine flexibility, improves confidence, corrects bowed
developed yoga assistive devices and self training procedures legs and knocked knees. The novelty in this proposed system
using different technologies like Image Processing, is the integration of skeleton methods and golden template
wearables and posture replication[2]-[5]. However, proper techniques to identify the amount of deviation while
analysis of body postures and guidance to the end user is the performing the asana postures.
major issue to be addressed. III. PROPOSED EMBEDDED BASED ASSISTIVE SYSTEM FOR
YOGA
This work was supported by the Ministry of Science and In the proposed system, first the image is captured using a
Technology, under the India, Department of Science & Kinect sensor which produces a depth image which has been
Technology. Grant file number SR/SATYAM/469/2016 of the explained in Step A. Fig. 1 depicts the block diagram of the
project “Design and Development of an Embedded Assistive proposed system. The captured image may consist of
Yoga System”
different backgrounds and to process the image a constant
background produces accurate outputs. Hence, these depth
images are processed for background subtraction. The
process of background subtraction has been explained in Step
B. From the background subtracted image, edges are detected
using canny edge detection algorithm and this will eliminate
the unwanted edges. The process of edge detection is handled
in Step C. The edge information thus obtained is further
processed using skeletonization algorithms for reducing
foreground regions and this has explained in Step D. In Step
E, from extracted skeleton, asana performed by the
practitioner is recognized using pattern matching techniques. Fig. 2: Depth image from Kinect sensor
In Step F, comparison of the asana performed with the In the proposed method, the background subtraction is
reference asana is carried out to know the accuracy of posture carried out in the LabVIEW environment using K-means vi,
performance by the practitioner and thus the practitioner will where vi refers to .vi extension files in LabVIEW.
be provided with visualized instruction for rectification of the This vi takes the depth image as input and corrects the
posture if any. background to be uniform so that further processing can be
Fig. 1: Block diagram of Embedded based Assistive System for Yoga efficiently handled. The background subtracted image is
shown in Fig. 3
A. Capture depth image

Fig. 3: Background Subtracted Image

C. Edge Detection
Edges are the local changes in an image that are important
features for image analysis. In the proposed system, Canny
The Kinect sensor is used to capture the depth image of the edge detection method [12] is used as it incorporates steps to
asana posture as shown in the Fig. 2 which acts as the input eliminate unwanted edges and results in more accurate edge
[6]. Depth image represents the distance information, it is detection results as shown in Fig. 4 The steps for detecting
measured based on Time of Frame (TOF) and is prebuilt in edges using Canny Edge Detection Method is as follows:
the sensor. The researchers realizing the potential and Step 1: Smooth the image with a Gaussian filter: Let
capabilities of this sensor utilized it for depth sensing image P[i,j] denote the image. Convolving this image with a
capturing [13]. In our proposed method, the depth image Gaussian smoothing filter using separable filtering results an
obtained from the Kinect sensor with the frame size of 640 x array of smoothed data as shown in equation 1,
480 dimension. The TOF of proposed EASY is 30
frames/second. F[i, j]=G[i, j;σ]*P[i, j] (1)

B. Background Subtraction where σ is the spread of the Gaussian that controls the
degree of smoothing.
Background Subtraction is used in the fields of image Step 2: Compute the gradient magnitude and orientation
processing and computer vision wherein an image's using finite-difference approximations for the partial
foreground is extracted for further processing. To serve this derivatives:
purpose K-means clustering, an unsupervised machine Computing the gradient of the smoothed array F[i, j] using
learning algorithm is used which aims at partitioning ‘n’ the 2 x 2 finite-difference approximation process produces
observations into ‘k’ clusters. The k-means algorithm two arrays M[i,j]and N[i,j] for the x and y partial derivatives
concentrates on partitioning the particles in an image into along x and y axis respectively. For these gradient
different clusters and obtains the distances between particles calculations, Sobel operator is used. The magnitude and
in the same cluster closer than the distances between particles rotation angle of the gradient can be computed from the
in other clusters. So if a particular threshold is chosen such standard formulas for rectangular-to-polar conversion as
that the center point defines a group of similar objects, then given in equation 2 and 3 [12].
the threshold for the dissimilar particles can be estimated with
the distribution of data [11]. R[i, j] = √M[i, j]2 + N[i, j]2 (2)
θ[i, j] = arctan(N[i, j],M[i, j])
d(p, q) = √(px − qx )2 + (py − qy )2 (6)
Step 3: Apply non-maxima suppression to the gradient
This transforms the image with the pixel value at a coordinate
magnitude:
being set as the distance to the nearest zero intensity point. It
Larger values of the magnitude image array R[i, j] imply that
computes the medial axis transformation for skeletonization
the image gradient is large, but is not sufficient to identify the
[8].
edges, since identifying the locations in the image array with
rapid change has now been transformed into the identifying Skeleton information as demonstrated in Fig.5 is extracted
the locations in the magnitude array R[i, j] which will be from the contour data (edge detected information) for further
local maxima. To identify edges, the broad ridges in the more reduction of the information. This step reduces the time
magnitude array must be thinned so that only the magnitudes required and data required to be processed. Here, we get the
at the points of maximum local change can be identified. This information of position of the body joints- they are, neck,
process is called non-maxima suppression, which in this case shoulder, elbow, wrist, hip, knee, ankle and foot.
results in thinned edges. Fig. 5: Skeleton extraction from edge detected image using LabVIEW

Step 4: Detection and linking edges by the double


thresholding algorithm:
The double thresholding links the edges with two thresholds
low threshold (LT) and high threshold (HT) in to edges.
When it reaches the end of a contour, the algorithm looks in
LT at the locations of the 8-neighbors for edges that can be
linked to the contour. The algorithm continues to gather
edges from LT until the gap has been bridged to an edge in
HT. The algorithm performs edge linking as a by-product of
thresholding [7].
E. Pseudo code for Asana Recognition
The practitioner has to follow the instructions given while
performing the asana. Let the image obtained after
Skeletonization be Is Here the correlation between the
practitioner’s posture, Is and the reference posture, R will be
taken into consideration for observing the amount of match.
For this process Gray scale value pyramid pattern matching
algorithm is said to be implemented.
begin
C = Is⊗ R
If (C ≥ T) go to step E
else repeat step D
Fig. 4: Edge Detection using canny edge detection for different values end

TABLE II. NOTATIONS FOR ASANA RECOGNITION AND


The Table.1, gives the comparison of edge detection for RECTIFICATION
different values of high and low thresholds and standard
deviation. It is obvious from the above table that when high Symbol Description
threshold value is approximately twice that of the low Is Skeleton Image
threshold value with minimum standard deviation, the R Reference Image
accuracy of the edge obtained is relatively high. C Similarity Measure
T Threshold
TABLE I. EDGE DETECTION FOR DIFFERENT HT, LT
AND SD VALUES V_I Visual Instruction
Standard High Low Accuracy %
deviation(σ) Threshold(HT) Threshold(LT) F. Pseudo code for Asana Recognition
1 0.7 0.1 43.1 begin
1 0.95 0.2 62.45
1 0.96 0.2 62.98 if(Is == R) Goto Step A
1 0.95 0.8 79.23
2 0.95 0.5 83.3 else Follow V_I
1 0.99 0.5 89.67 end
D. Skeletonization
IV. EXPERIMENTAL SETUP
The distance transform on a binary image [8] is defined as:
In this system, the asana performed by the practitioner is
DT(p) = min{d(p,q)|I(q)=0} (5) captured using Kinect sensor in front, back and side views.
Position of the sensors perpendicular to each other and are
where, I is the image, d(p,q) is the Euclidean distance.
located at a distance of more than 200 cm away from the
practitioner to capture the body maps. Depth image from the
Kinect sensor undergoes image processing in the control unit
to reduce the obtained information. Control unit processes the
input image and gives the posture matching information in
terms of score. The database has been created with 10 images
by considering two different postures firstly Parsva Tadasana
and secondly. Virabhadrasana. The practitioner performing
the asana will be compared as frame to frame from the data
base images and will be directed with corrections at every
stage of the posture as represented in Fig 6.

Fig. 8: skeleton image of parsva tadasana

C. Result of Asana Recognition

Here in the below Fig. 9 and Fig. 10 processed skeleton


image is matched with the reference image using LabVIEW
environment to get measure of match.

Fig. 6: Experimental set up for recording the images using Kinect


Sensor.

V. EXPERIMENTAL RESULTS
The proposed work carried out for two asanas as Parsva
Tadaasana and Veerabhadra Asana II (Warrior Pose II). The
results thus obtained while performing the asanas are as
illustrated in the following images.
A. Result of Edge Detection
The result presented below defines the edge detection
process for Parsva Tadasana from the depth image captured
Fig. 9: Asana Recognition of input skeleton asana with reference for Parsva
using the Kinect sensor. The edge detection process is
Tadaasana
implemented using Canny edge detection technique in
LabVIEW environment as displayed in the Fig. 7. Here
contour of the depth image is extracted to lessen the amount In the TABLE III, X and Y denote the centroid of the human
of information to process. body, A denotes the angle of deviation and S denotes the
score obtained while performing the asana. The score of 1000
indicate that the asana performed is perfect such that angle of
deviation is 0 and the practitioner can move to the next step

Fig. 7: LabVIEW front panel and block diagram for Edge detection of
Parsva Tadasana

B. Result of Skeletonization
After extracting edge, information is still reduced to of the asana, as the score reduces the angle of deviation is
skeleton using LabVIEW environment and is explained in more. Hence, greater the score, greater is the perfection in the
Fig. 8. posture performed. If the input matches with any of the
reference asanas then the match score is displayed which
indicates the extent of similarity.

Fig. 10: Asana Recognition of input skeleton asana with


reference for Virabhadrasana (Warrior Pose- II)
D. Result of Asana Comparison The other assistive yoga systems has developed using
The asana recognized is compared with the data base the SURF and MoRep [2] [3]. The experimental validation
done using EASY with few subjects for yoga asanas like
images. The comparison process results as the level of ParsvaTadasanaand Virabhadraasana. This is a new and novel
accuracy as is shown in the Fig. 11 and Fig. 12. In fig 11 the attempt for assisting traditional yoga asanas with image
comparison is as such the asana performed by the practitioner processing and embedded system technology intervention.
is exactly same as the input image or the database image and
ACKNOWLEDGEMENT
hence the accuracy is 100%.
The Authors extend their gratitude to Department of Science
and Technology, New Delhi, INDIA for funding this work as
part of project entitled "Design & development of an
embedded assistive yoga system" under the Science and
Technology for Yoga and Meditation (SATYAM), (Vide Ref
No: SR/SATYAM/2015, 2015-16). Also, they wish to
acknowledge the Management SriVishnu Raju garu,
Principal of BVRIT Narsapur and student of Dr.
B.K.S.Iyengar, yoga teacher Mr. Nagaraj for their support
and encouragement in all stages of this project work.

REFERENCES
[1] https://www.yogalife.co.in/research-papers/ - Yoga as Medicine by Dr.
SachanShailja
Fig. 11: Result of Asana Comparison with perfect alignment [2] C. Hua-Tsung, H. Yu-Zhen, C. Chien-Li, L. Suh-Yin, P. L. Bao-Shuh,
Y. Jen-Yu, “Computer-Assisted Self-Training System for Sports
Exercise using Kinects.”
Where as in fig 12 the comparison output is that the asana
[3] S. Patil, A. Pawar, A. Peshave, A. N. Ansari, and A. Navada, “Yoga
performed by the practitioner does not match with the tutor visualization and analysis using SURF algorithm,” in Proc. IEEE
database image and the area of mismatch indicated on the Control and System Graduate Research Colloquium (ICSGRC), pp.
43-46, 2011.
screen. Now the practitioner will be instructed through the
[4] Z. Luo, W. Yang, Z. Q. Ding, L. Liu, I. M. Chen, S. H. Yeo, K. V.
voice modules for the correction process and accordingly the Ling, and H. B. L. Duh, “Left arm up! Interactive yoga training in
practitioner can improve his accuracy in performing the virtual environment,” in Proc. IEEE Virtual Reality Conference(VR),
pp. 261-262, 2011.
asana.
[5] W. Wu, W. Yin, and F. Guo, “Learning and self-Instruction expert
system for Yoga,” in Proc. 2nd International Workshop on Intelligent
Systems and Applications(ISA), pp. 1-4, 2010
[6] M. Kronlachner, “The Kinect distance sensor as human-machine-
interface in audio-visual art projects,” Graz, January 2013
[7] G.T. Shrivakshan, “A Comparison of various Edge Detection
Techniques used in Image Processing,” IJCSI International Journal of
Computer Science Issues, Vol .9, Issue 5, No 1, September 2012.
[8] K. Abhishek, “Skeletal Tracking using Microsoft Kinect.”
[9] F. Zhao, Q. Huang, W. Gao, “Image Matching by Normalized Cross-
Correlation,” 1988 International Conference on June 2006.
[10] A. Niranjil Kumar, C. Sureshkumar“ Background subtraction based on
threshold detection using K-Means algorithm,” 2013 International
Conference on Pattern Recognition, Informatics and Mobile
Engineering
Fig. 12: Result of Asana Comparison with imperfect alignment
[11] https://www.cse.unr.edu/~bebis/CS791E/Notes/EdgeDetection.pdf
VI. CONCLUSION AND FUTURE SCOPE [12] Bing Wang , ShaoSheng Fan, “An improved Canny Edge detection
algorithm”, 2009 Second International Workshop on Computer
The proposed work has presented a solution for the Science and Engineering.
development of Embedded based Assistive System for Yoga.
That analyses human yoga postures are capable of reducing [13] Omar Kayal and Jagath Samarabandu, “Use of Kinect in multicamera
setup for action recognition applications”, 2014 IEEE 27th Canadian
the image to the maximum level and matching with the Conference on Electrical and Computer Engineering (CCECE)
database to know the amount of correctness in the asana.
In the process of real time yoga activity with EASY,
Skeletal data along with Golden Template method is used for
asana correction. The EASY control unit/ algorithm is
deployed using LabVIEW, that provides a platform for
integrating all these processes in a system and provides an
efficient utilization of system memory and aids the
practitioner to improve the performance.

You might also like