Classification of Human Weight Based on Image

Classification of human weight can be determined by body mass index. The body mass index can be calculated by dividing the height by the square of the body weight. According to researchers, this is less practical


INTRODUCTION
Human weight can be classified into four categories those are thin, ideal, fat and obese.Ideal category is everyone"s dream because it is positively correlated with health.To find out the ideal body weight, first one must measure the ideal weight using the convensional formula, then calculate the ideal body weight by using the Body Mass Index (BMI) formula.However, there is no tool that can be used to determine the ideal body weight practically, which makes many people not know and not care about the condition of their weight eventhough the body health is also influenced by the weight.According to World Health Organization (WHO) in 2014, there are more than 1.9 billion adults over the age of 18 in the world who are overweight, while more than 600 million people in the world are obese.Excessive weight gain that causes obesity has an adverse effect on health among them, increasing the risk of complications of heart disease, diabetes, high blood pressure, cholesterol, and other diseases.Therefore, to get a more practical way of determining the weight category, then in this study a tool will be developed using an Android smartphone camera.The camera will be used to take a person's body image.Furthermore, the image will be processed using a digital image processing to obtain some information that is useful in determining a person's weight category.The accuracy of selection of digital image processing techniques greatly affects the level of system accuracy.There are several ways to do to process the image, one of which is by using edge detection.Edge detection is a process in digital image processing to know the edge of the object in the image in order to obtain useful information from the image.There are several methods that are usually used to do edge detection, such as Robert, Sobel, Prewitt, and Canny, But, Canny is the best edge detection method for edge detection.In Research [1] Digital image processing is used to determine the weight of cow from image acquisition.This study is focused on segmentation and image processing of cows to get the best edge detection from several preprocessing scenarios.The results of the study conclude that scenario 3 (median blur and canny) has the best results with MSE values of 230,051 and PSNR of 24,524 db.Then research [2], which is the second stage of research [1] is focused on the selection of the formula for determining the weight of cow and proposed algorithms to determine the weight of cow from image acquisition.The results of image calculation are not different significantly with MAE (Mean Absolute Error) that is equal to 8.15% and 4.10% for body length and chest circumference, respectively.Digital image processing application that has been built is able to know the weight of cow with MAE (Mean Absolute Error) that is equal to 8.97% towards Modification/Lambourne formula.In research [3] it has developed a system for calculating human body weight using human body image.First, the process of cropping image is adjusted to the human body shape, then it uses the formula of body mass index to determine the ideal body weight.In research [4] it has successfully created a digital image processing system that can be used to determine the ideal body weight using edge detection.Image processing can also be used to determine the maturity level of salak pondoh with mature, moderate, and crude classification [5].From research [5] it has obtained an accuracy of 92% if using backpropagation algorithm and 93% if using K-Nearest Neighbor algorithm, so it can be concluded that the use of digital image processing system to classify the maturity level of salak pondoh in the tree is accurate.Based on several previous studies it can be seen that digital image processing can be used to calculate cow weight and maturity level classification from salak pondoh, so it is possible to use digital image processing to determine body weight categories in humans.Therefore, this study has developed a tool that can be used to classify human weight based on images taken by Android smartphone's camera.

Research Data
The sample data used in the study are 47 people, those are 10 thin people, 25 people with ideal weight, 6 fat people and 6 obese people.The example of the sample data is shown in Table 1.

Design and Algorithm
The research method used is a basic research method that is predictive.The steps used in this study are as follows: 1. Preparation Preparation is to prepare a room that will be used as a place of taking photos of the respondents, plain color cloth as photo background, smartphone camera, tripod, scales, measuring height, cloths meter, ruler, scissor, duct tape, pencil and book to write the measurement result.

Image Acquisition and Body Measurement
Image acquisition is conducted by taking pictures of the human body using the camera Xiomi Redmi 2 with 8 mega pixel camera resolution.This process is conducted from a distance of 250 cm to the object and the camera"s high distance about 110 cm.The research objects wear clothes with plain colors that are different from the background color.The body position is standing perpendicular to the camera without wearing footwear, and the heel position of the crumpled foot is opened about 45 0 .After the picture has been taken, then the respondent measured his height, then weighed and measured his body width and shoulder height of the foot.The measurement results are recorded using stationery.

Calculation of Derived Formula
To calculate the ideal body weight, people usually use a conventional calculation formula like formula (1).
(1) While, in this case the human body is assumed to be an elliptical tube [6].The formula ( 2) is used to calculate The Surface Area of Tube.To calculate The Surface Area of Tube, first you should know about the height and width of the tube, the value is obtained from the height and width of the object in the image.The result of calculation of The Surface Area of Tube is then considered as a result of the calculation of the surface area of the human body. ( From formula (2) by multiplying some other parameters, it has produced a new formula of body surface area (BSA) like formula (3).
(3) b is the width of object and t is the height of object.Formula (4) and ( 5) are used to calculate the width and height of object.6) is used to calculate the tpixel.
Of all calculated data samples in this study, it should be determined that tpixel is equal to 0.33 cm/px.After the value of tpixel is known then the calculation of BSA formula can be calculated.Furthermore, The BSA value is used in calculating the mosteller formula (7) to get the human body weight.

Determination of Multiplier Factor (k)
The multiplier factor (k) is a constant or value used to reduce the difference between the weight of the calculation of derived formula compared with actual weight.The multiplier factor (k) was obtained using formula (8).
The result of calculation from all of sample data has obtained the multiplier factor (k) value that is equal to 1.0023.

Preprocessing
Preprocessing is a step to reduce the noise from an image and image softening in order to obtain a better and cleaner image.In this research it proposes five preprocessing scenarios as shown in Table 2 and The sample data of SNR value for each preprocessing scenario as shown in Table 3.
Table 2 The preprocessing scenario is used The five scenarios above are conducted by using OpenCV library, then calculating Signal to Noise Ratio (SNR) to get quality of preprocessing.SNR is a value that shows the image quality, and this analysis is to determine which image is the best effect of the noise [7].In this research, SNR calculation is calculated using matlab.First, selecting ten random data, then each data is processed by edge detection in accordance with the proposed preprocessing test, then the image edge detection results are inserted into the matlab application to calculate SNR values.The higher SNR value indicates that the image quality improves [8].SNR calculation results for ten sample data are shown in  At this stage some algorithms are proposed to calculate the height and width of the object in the image, then the calculation result of each algorithm is compared to get the best algorithm.To determine the approximate height and weight of an object that is in the image, then it needs an algorithm that can be used to calculate the width and height of objects in the image.The value of the width and height of this object is used to calculate the estimated weight of the object by applying a combination formula between the formula of tube and the formula of body surface area.Here is the proposed algorithm for calculating the height of object as shown in Figure 2.   The calculation to determine the height of the object in algorithm B is equal to the calculation to determine the height of the object in algorithm A. To determine the width of the object starts from an image position that adjusts to the shoulder height of an object that exists within the image.Based on the average calculation of result of shoulder height from the foot, it obtained the value of shoulder height amounted 0.743 (height = 0.743 * object_height ).The illustration of algorithm B as shown in Figure 5.The calculation to determine the height of the object in algorithm D is equal to the calculation to determine the height of the object in algorithm A. To determine the width of the object starts from the position of the image that adjusts 2/3 of the height of the object in the image (height = (2* object_height) / 3).The illustration of algorithm D is shown in Figure 9.  7. Determination of ideal body weight using Body Mass Index Formula Body mass index (BMI) is a common matrix used today to define the height or weight characteristics of adult anthropometry and to classify them into groups [9].BMI is the index of heavy anthropometry and height of human body expressed as weight (in kilograms) divided by height (in squared meters) [10].BMI value can be calculated using formula (9).
The BMI value using the formula is then matched with the standard BMI value table to determine the classification of a persons body .Standard BMI score tables for men and women are shown in

Testing and System Analysis
After being successfully implemented on android device, then the system is tested using some photos of human body.Based on the test results, the level of accuracy of the system in determining the classification of ideal body weight can be found.

RESULTS AND DISCUSSION
This stage shows the results of the calculation of the height and weight and the comparison of the accuracy of the weight categories of each algorithm that has been proposed.There are several formulas that will be used to calculate the difference and the percentage of deviation in the height and weight as shown by formulas 10, 11, 12, and 13. (10) (12) This is the result of the calculation of each proposed algorithm : After the object height and object width are obtained by algorithm A, then the BSA can be calculated by Formula (3).then the formula ( 7) is used to get the weight value, while the Formula ( 6) is used to get the height values.Furthermore, to determine the ideal body weight, use the calculation of Body Mass Index (BMI) according to formula (9).The results of the calculation of ideal body weight algorithm are compared with the table of standard BMI for women and men in Table 4, while the calculation of the actual ideal body weight uses the conventional formula in formula (1).Sample data from the calculation of Algorithm A are shown in Table 5.Then, the level of system accuracy is calculated by the Confusion Matrix as show in Table 6. .Based on the calculation of Confusion Matrix Algorithm A, the value of accuracy is 59.57%.The same calculation is applied to the other three proposed algorithms, Algorithm B, Algorithm C, and Algorithm D. So that a comparison of the calculations from each algorithm is shown in Table 7.Based on the data shown in table 6, the conclusion can be obtained that the algorithm C by using the multiplier factor (k = 1,0023) is the the best proposed algorithm to determine the ideal body weight.The calculation of ideal body weight using algorithm C has a value of deviation 1,85 against height and 8,87% against body weight and has accuracy of 78,7%.Therefore, algorithm C is defined as the algorithm to be used in system calculation.

CONCLUSIONS
Based on the results of research, the researchers have managed to implement an algorithm that can be used to calculate the weight and height of a person based on his human body image captured from an android smartphone camera so that it can be used to classify human weight based on four classes those are thin, ideal, fat, and obese.The best proposed algorithm is the algorithm C, which calculates the width of the object starting from the position of the image that adjusts to half of the height of the human object in the image using the multiplier factor value (k) of 1.0023 obtained value of relative of deviation of 1.87% of the height and 8.87% of the weight.While the level of accuracy of the system in classifying the ideal body weight category has reached 78.7% of the actual ideal weight category.So that algorithm C will be used as a calculation algorithm in the development of digital image processing system in mobile android applications that can be used for the classification of the ideal body weight based on images.

IJCCSFigure 1
Figure 1 Image Comparison of Edge Detection

Figure 2
Figure 2 Pseudocode for calculating height of object

Figure 3
Figure 3 The illustration of algorithm A

Figure 4
Figure 4 Pseudocode to calculate width of object with algorithm A

IJCCSFigure 5
Figure 5 The illustration of algorithm B

Figure 6 Figure 7
Figure 6 Pseudocode to calculate width of object with algorithm B

Figure 8
Figure 8 Pseudocode to calculate the width of object with algorithm C

IJCCSFigure 9
Figure 9 The illustration of algorithm D

Table 3
Sample data of SNR value for each preprocessing test scenario

Table 3 .
Based on the SNR calculation results obtained the conclusion that scenario two (median blur and canny) produce the best preprocessing and image detection.Image comparison of edge detection results of each preprocessing test scenario is shown in Figure1.

Table 4
Standard BMI Male and Female

Table 5
Sample data from the calculation of Algorithm A

Table 6
Calculation of Confusion Matrix Algorithm A

Table 7
Comparison of the calculation of each algorithm