Measurement of Lower Extremity Alignment Using a Smartphone Application

: Identiﬁcation of lower extremity misalignment requires radiation exposure and complex imaging. We developed and tested a smartphone application to facilitate quick identiﬁcation of misalignment using photographs. Lower extremity alignment was measured by two independent researchers using a proprietary smartphone application and conventional radiographs. The results were compared between the methods and evaluators for interrater and intrarater reliability. Ninety datasets were obtained from 45 patients, with 90 lower extremity alignment angles measured via radiographs and the smartphone application. The intrarater reliability of the hip–knee–ankle angle (HKAA), measured twice by evaluator A using the radiographic imaging program, was 0.985, whereas that measured by evaluator B was 0.995. The intrarater reliability of the predicted lower extremity alignment angle (PLEAA) measured using the smartphone application was 0.970 and 0.968 for evaluators A and B, respectively. Thus, all results showed excellent reliability. In validity analysis, the correlation between PLEAA and HKAA measured twice by evaluators A and B was analyzed using Pearson’s correlation coefﬁcient. HKAA (A) and PLEAA (A) had a positive correlation coefﬁcient of 0.608 ( p < 0.01), whereas HKAA (B) and PLEAA (B) had a positive correlation coefﬁcient of 0.627 ( p < 0.01). Thus, our smartphone application can facilitate for self-diagnosis of lower extremity misalignment. and K.-Y.K.; formal analysis, K.-Y.K., S.-Y.S. and S.-W.K. (Sung-Whan Kim); resources, S.-W.K. (Sung-Woo Kim) and S.-J.P.; methodology, K.-Y.K., S.-Y.S., D.W.S., J.-H.K. and D.-S.C.; validation, D.-S.C. and D.W.S.; writing—original draft, K.-Y.K., S.-Y.S. and D.-S.C.; writing—review and edit-ing, K.-Y.K., S.-Y.S. and D.-S.C.; visualization, K.-Y.K., S.-W.K. (Sung-Woo Kim), J.-H.K. and S.-W.K. (Sung-Whan Kim); supervision, D.-S.C.; funding acquisition, S.-Y.S., S.-J.P. and D.-S.C. All authors have read and agreed to the published version of the manuscript.


Introduction
Knee osteoarthritis is a degenerative disease associated with factors such as age, trauma, obesity, and lower extremity malalignment; increased prevalence may be due to additional factors, including economic development, changes in lifestyle, and increase in sports activities [1][2][3]. Specifically, alignment of the lower extremities plays a crucial role in the efficient use and preservation of energy in the musculoskeletal system [1][2][3], and is important for older as well as young adults [4][5][6][7][8] because proper alignment supports the body's weight, aids in walking, and plays an important biomechanical role [4][5][6]. The axes of the hip, knee, and ankle help distribute appropriate loads towards the knee joint. However, in cases of knee joint deformities, such as varus and valgus knee, the misalignment can affect the structure of the joints, resulting in pain and limping, which subsequently worsens knee osteoarthritis. Therefore, prevention and management of abnormal lower extremity alignment are necessary [2][3][4][5][9][10][11].
The lower extremity alignment angle is measured using frontal-plane full-length radiographs of the lower extremities, including the hip, knee, and ankle joints. This is expensive and involves a large amount of radiation exposure and specialized equipment [12][13][14][15]. To overcome these shortcomings, a previous study evaluated whether the femorotibial angle, measured using anterior and posterior knee radiographs, could replace the hipknee-ankle angle (HKAA) measured using frontal-plane full-length radiographs. The interclass correlation coefficient between the femorotibial angle and HKAA was reported to be 0.90, indicating a high level of reliability [16]. This result implies that a lower extremity alignment measurement method could reduce radiation exposure and lessen the economic burden on patients.
Other studies also measured lower extremity alignment using photography and body surface topography [17][18][19][20][21]. These researchers used an exclusive analysis program after attaching a marker to the appropriate anatomical location of the body and taking photographs, or by using topography. Studies have reported a strong correlation between the standard lower extremity alignment angle measured using radiographic images and those measured using photography or body surface topography [17,18], concluding that it is possible to measure lower extremity alignment in clinical medicine without radiation exposure.
However, the studies mentioned above involved radiation exposure, hospital visits, or specialized equipment or knowledge. Moreover, it is difficult to prevent and manage abnormal lower extremity alignment through self-diagnosis [16,17,22]. In general, even people without medical knowledge can visually confirm that the lower extremities are normal or curved. Based on this fact, we developed a new tool for measuring lower extremity alignment.
Using a smartphone application, we measured predicted lower extremity alignment angle (PLEAA) and compared it with the actual alignment, hip-knee-ankle angle (HKAA), measured using radiographic images to determine the feasibility of application for clinical medicine and self-diagnosis. We found that the smartphone application had the potential for self-diagnosis of lower extremity misalignment, thereby reducing the need for radiation exposure, hospital visits, and specialized equipment.

Participants
The present study was conducted in accordance with the principles of the Declaration of Helsinki and approved by the Clinical Trial Ethics Committee of the Catholic Kwandong University International St. Mary's Hospital in Incheon, South Korea (approval number: IS21EISI0006).
The study subjects were adults aged between 40 and 80 years who were required to undergo full-length lower extremity radiography for knee joint pain. All participants were informed about the purpose and methods of the study before the radiographs were obtained. Informed consent for the utilization of personal information, acquisition of pictures of the lower extremities by the smartphone application, and use of such images in research was obtained from all participants. Patients with skin damage or deformity (due to trauma or burns), at the points measured by the smartphone application, were excluded.

Development of the Application
We hypothesized that when an imaginary vertical line is drawn on the skin surface between the ground and both ankles, the alignment angle can be predicted by the ratio of the distances from the lines connecting the left and right joints of the knee and ankles. To test this hypothesis, we calculated the distance ratio from the thinnest part of the skin around the knee and ankle joints, as observed on a full-length lower extremity radiograph, to an imaginary vertical line between the two lower extremities. We obtained a formula using simple linear regression analysis with the actual alignment angle measured on fulllength lower extremity radiographs. The obtained regression formula was as follows: (R 2 ) = 80.4%, Y = a + βX was Y = −27.24 + 27.39X (Figure 1). the distances from the lines connecting the left and right joints of the knee and ankles. To test this hypothesis, we calculated the distance ratio from the thinnest part of the skin around the knee and ankle joints, as observed on a full-length lower extremity radiograph, to an imaginary vertical line between the two lower extremities. We obtained a formula using simple linear regression analysis with the actual alignment angle measured on fulllength lower extremity radiographs. The obtained regression formula was as follows: (R 2 ) = 80.4%, Y = a + βX was Y = −27.24 + 27.39X (Figure 1). and right (D3) knee is then calculated. The ratio of D2 divided by half of D1 is the bending ratio of the left lower extremity, whereas the ratio of D3 divided by half of D1 is the ratio of the right lower extremity to its bent status. The linear regression formula calculated in a previous study was Y = −27.24 + 27.39X, where Y is the PLEAA and X is the bending ratio of the ankle and knee.
This formula was then used to develop an application to measure varus or valgus angles for predicting the lower extremity alignment angle using photos captured on a is the bending ratio of the left lower extremity, whereas the ratio of D3 divided by half of D1 is the ratio of the right lower extremity to its bent status. The linear regression formula calculated in a previous study was Y = −27.24 + 27.39X, where Y is the PLEAA and X is the bending ratio of the ankle and knee.
This formula was then used to develop an application to measure varus or valgus angles for predicting the lower extremity alignment angle using photos captured on a smartphone. The application was developed using an Android-based software develop-ment kit and an application program interface. Based on PostNet, which is an open-source software provided by Google TensorFlow (Alphabet Inc., Mountain View, CA, USA), the algorithm derives images by outlining the entire body for human system measurement and subsequently designating specific physical points to calculate the predicted length and correlation between skeletal joints based on the images of the patient's lower extremities. Through this algorithm, an image was uploaded to MobileNet (Alphabet Inc.) based on PostNet, and the patient's posture was estimated using the Keypoint (Alphabet Inc.) heatmap and offset vector. The knee and ankle joints were extracted from the feature points and finally outputed to PostNet, and the final region of interest was then extracted. The final region of interest on the application predicts the lower extremity alignment angle by applying the results of the analysis to the recovery analysis formula of the previous studies after extracting the thinnest part of the skin around the knee and ankle joints [23]. The program was developed by the researchers and optimized for Android 8.0 version smartphones (Galaxy S8 SM-G950N, Samsung, Seoul, South Korea).

Measurement of the Lower Extremity Alignment on Radiographs
For full-length radiography of the lower extremities with a weighted load, the patient's legs were spread out as wide as their shoulders. While standing, the patella was positioned in a forward direction and the feet were rotated, depending on the patient, to achieve proper positioning. After the right posture was achieved, a digital X-ray (XGEO GC80, Samsung) device was used for imaging. The radiographs were acquired from the center of the femoral head to the center of the knee to the center of the ankle using an angle measurement tool on an INFINITT PACS (G3 PACS version 3.011.3, BN104, Infinitt, Phillipsburg, NJ, USA) ( Figure 2) [17,18,22].
Appl. Sci. 2022, 12, x FOR PEER REVIEW 4 of 12 smartphone. The application was developed using an Android-based software development kit and an application program interface. Based on PostNet, which is an open-source software provided by Google TensorFlow (Alphabet Inc., Mountain View, CA, USA), the algorithm derives images by outlining the entire body for human system measurement and subsequently designating specific physical points to calculate the predicted length and correlation between skeletal joints based on the images of the patient's lower extremities. Through this algorithm, an image was uploaded to MobileNet (Alphabet Inc.) based on PostNet, and the patient's posture was estimated using the Keypoint (Alphabet Inc.) heatmap and offset vector. The knee and ankle joints were extracted from the feature points and finally outputed to PostNet, and the final region of interest was then extracted.
The final region of interest on the application predicts the lower extremity alignment angle by applying the results of the analysis to the recovery analysis formula of the previous studies after extracting the thinnest part of the skin around the knee and ankle joints [23]. The program was developed by the researchers and optimized for Android 8.0 version smartphones (Galaxy S8 SM-G950N, Samsung, Seoul, South Korea).

Measurement of the Lower Extremity Alignment on Radiographs
For full-length radiography of the lower extremities with a weighted load, the patient's legs were spread out as wide as their shoulders. While standing, the patella was positioned in a forward direction and the feet were rotated, depending on the patient, to achieve proper positioning. After the right posture was achieved, a digital X-ray (XGEO GC80, Samsung) device was used for imaging. The radiographs were acquired from the center of the femoral head to the center of the knee to the center of the ankle using an angle measurement tool on an INFINITT PACS (G3 PACS version 3.011.3, BN104, Infinitt, Phillipsburg, NJ, USA) ( Figure 2) [17,18,22].

Measurement of Lower Extremity Alignment Using the Smartphone Application
Before starting the measurement, the participants were asked to remove their socks and pants. Measurement of lower extremity alignment via the smartphone application was performed on a 15-cm-high staircase horizontal to the ground. The legs were spread apart, making sure each leg was aligned to the shoulder. With the patella facing forward, the photos were taken using the smartphone camera. The photos were then uploaded into the application through the insert icon on the application. Then, the points located on the right and left knee joints and ankle joints were adjusted in-app using fingers or touch pens to identify the thinnest part of the skin around the ankle joint, with subsequent recording of right and left predicted lower extremity alignment angles (PLEAA) (Figure 3).

Measurement of Lower Extremity Alignment Using the Smartphone Application
Before starting the measurement, the participants were asked to remove their socks and pants. Measurement of lower extremity alignment via the smartphone application was performed on a 15-cm-high staircase horizontal to the ground. The legs were spread apart, making sure each leg was aligned to the shoulder. With the patella facing forward, the photos were taken using the smartphone camera. The photos were then uploaded into the application through the insert icon on the application. Then, the points located on the right and left knee joints and ankle joints were adjusted in-app using fingers or touch pens to identify the thinnest part of the skin around the ankle joint, with subsequent recording of right and left predicted lower extremity alignment angles (PLEAA) (Figure 3).

Procedure
This clinical study evaluated the lower extremity alignment angle by using a radiographic imaging program (PACS). Intra-and interrater reliabilities were assured by comparing the angles measured by two evaluators (A and B) using the smartphone application. The two evaluators performed the measurement after completely understanding the method to measure the alignment of the lower extremities in radiographic image and smartphone application. After outputting the weight-loaded full-length radiographs

Procedure
This clinical study evaluated the lower extremity alignment angle by using a radiographic imaging program (PACS). Intra-and interrater reliabilities were assured by comparing the angles measured by two evaluators (A and B) using the smartphone application. The two evaluators performed the measurement after completely understanding the method to measure the alignment of the lower extremities in radiographic image and smartphone application. After outputting the weight-loaded full-length radiographs obtained using PACS, evaluators A and B measured the lower extremity alignment angle twice, with a 10-min intervals between measurements. Likewise, to determine the presence of angular deformity-leg angle, they also measured the lower extremity alignment angle predicted using the smartphone application twice, with a 10-min interval between measurements. Data were collected for the right and left knee joints, inner and outer halves at both lower extremities, and the two angles obtained from each patient. Thus, 90 pairs of measurements were obtained from 45 patients with 90 lower extremity alignment angles each measured using both radiographs and the smartphone application.

Statistical Analyses
Intraclass correlation coefficients (ICCs) were used to analyze interrater reliability for the PLEAA measured using the smartphone application. In terms of the HKAA, a standard lower extremity alignment angle measured in the PACS image program [24]. To evaluate the possibility of using the application as a diagnostic aid, Pearson's correlation coefficients were analyzed in a validity test to determine the correlation between the PLEAA measured using the smartphone application and the actual HKAA measured using radiographs [25]. All statistical analyses were performed using SPSS version 22.0 (IBM Corp., Armonk, NY, USA), and a p-value of <0.05 was considered statistically significant. In addition, 95% confidence intervals were reported.

Characteristics of Subjects
Twelve men and 33 women aged 40-80 years participated in this study. The average age was 62.71 ± 6.62 years, and the average body mass index was 26.84 ± 3.67 kg/m 2 ( Table 1).

ICCs for Intra-Rater Reliability
The ICC of the HKAA measured twice using radiographs was 0.985 for evaluator A and 0.995 for evaluator B. The intrarater reliability of the PLEAA measured using the smartphone application was 0.970 for evaluator A and 0.968 for evaluator B. The results indicated excellent reliability (Table 2) [24,26].

ICCs for Intrarater Reliability (HKAA versus PLEAA)
The ICC for intrarater reliability for each mean HKAA value versus each mean PLEAA value measured twice was 0.752 for evaluator A and 0.767 for evaluator B. These results indicated excellent reliability in accordance with the ICC evaluation guidelines (Table 3) [24,26].

Intraclass Coefficient for Interrater Reliability (Evaluator A versus Evaluator B)
The interrater reliability for each mean HKAA and PLEAA value measured twice by evaluators A and B was 0.984 for HKAA and 0.969 for PLEAA. These results implied excellent reliability (Table 4) [24,26].

Validity of the Smartphone Application as a Diagnostic Tool
To determine the validity of the angular deformity-leg angle measurement obtained via the smartphone application, the correlation between PLEAA and HKAA measured twice by evaluators A and B was analyzed using Pearson's correlation coefficient.  Table 5) [25]. It can be seen that HKAA and PLEAA measured by evaluators A and B showed a positive correlation in the scatter plot ( Figure 4). Table 5. Pearson's correlation coefficients between the lower extremity alignment angle measured on radiographic images and the predicted lower extremity alignment angle measured using the smartphone application.   Table 5. Pearson's correlation coefficients between the lower extremity alignment angle measured on radiographic images and the predicted lower extremity alignment angle measured using the smartphone application.

Discussion
In this study, we developed and validated a new tool for measuring the lower extremity alignment angle. This tool is an angular deformity-leg diagnosis program on a smartphone. To determine whether the tool can be used in clinical medicine, the actual lower extremity alignment angle measured using radiographs, intrarater reliability, and interrater reliability were compared. In addition, to evaluate whether the tool can be used as a diagnostic aid, correlation analysis was performed for the HKAA and PLEAA measured by the application.
The intrarater reliability was judged to be high at 0.968 to 0.995 when the two evaluators repeatedly measured the lower extremity alignment angle using radiographic images and the smartphone application. Our results are consistent with previous reports

Discussion
In this study, we developed and validated a new tool for measuring the lower extremity alignment angle. This tool is an angular deformity-leg diagnosis program on a smartphone. To determine whether the tool can be used in clinical medicine, the actual lower extremity alignment angle measured using radiographs, intrarater reliability, and interrater reliability were compared. In addition, to evaluate whether the tool can be used as a diagnostic aid, correlation analysis was performed for the HKAA and PLEAA measured by the application.
The intrarater reliability was judged to be high at 0.968 to 0.995 when the two evaluators repeatedly measured the lower extremity alignment angle using radiographic images and the smartphone application. Our results are consistent with previous reports where the intrarater reliability for the lower extremity alignment angle measured using PACS and a hardcopy of the radiographs was found to be between 0.93 and 0.99 [22]. The results of this study and our results showed similar results. Additionally, the intrarater reliability of the evaluators for each measurement tool in this study was similar. The interrater reliabilities for the actual lower extremity alignment angle and the lower extremity alignment angle measured using the application ranged from 0.752 to 0.767, which indicated high reliability. Moreover, although the reliability was low when the results of PACS and those obtained using a hard copy of radiographs were compared, the ICC evaluation guidelines still showed excellent reliability. Thus, the actual lower extremity alignment angle and that measured using the application were similar [22,24,26]. According to a study comparing lower extremity alignment measured using a hard copy image and PACS, radiography is a standard test method for evaluating the lower extremity alignment [22]. This test method is expensive and requires radiation exposure, specialized equipment, and hospital visits, thus setting limitations in terms of preventing and managing knee diseases through selfdiagnosis in daily life. As such, the smartphone application can be a good alternative as it can evaluate lower extremity alignment using any smartphone possessed by an individual.
The interrater reliability of the lower extremity alignment angle measured using radiographs was 0.984, whereas that of the lower extremity alignment angle measured using the application was 0.969. These results indicate high reliability. The results of this study seem to be in accordance with those of previous studies, where the interrater reliability for the lower extremity alignment angle measured using photographs and radiographs was 0.988 [17,24]. The use of a smartphone camera to measure lower extremity alignment may be an alternative to radiography, thus reducing the risk of radiation exposure. However, this could not be confirmed because of the need for professional knowledge, such as that of the accurate anatomical location [17]. In comparison, the smartphone application calculated the lower extremity alignment angle using the ratio between the knee and ankle joints by specifying the inflection points, which are the thinnest parts of the inner and outer skin on the right and left knee and ankle joints. Therefore, measurement of the lower extremity alignment angle using the application was easier, facilitating self-diagnosis.
To evaluate whether the smartphone application can be used as a diagnostic aid in clinical medicine, the correlation between the actual lower extremity alignment angle and the PLEAA in the application was analyzed, and values of 0.608 to 0.627 (p < 0.01) were obtained. This was interpreted as an intermediate positive correlation according to Pearson's correlation guidelines [25]. In a similar study that used photography to measure lower extremity alignment, Pearson's correlation coefficient between the actual lower extremity alignment angle and the lower extremity alignment angle measured using photographs was 0.92 (p < 0.001), which indicated a strong correlation [17]. In another study, Pearson's correlation coefficient for the actual lower extremity alignment angle and the lower extremity alignment angle measured using the body surface topography was −0.702 (p < 0.001), which indicated a strong negative correlation [18]. With the exception of radiography, the results of the present and previous studies on measurement of lower extremity alignment suggest that there are other diagnostics modalities in clinical medicine that do not involve radiation exposure.
Photography and body surface topography generally require specialized equipment or programs for self-diagnosis, as well as specialized expertise. According to a previous study in which body surface topography was used to measure lower extremity alignment by attaching a marker to a specific anatomical location on the patella, it would be difficult to measure severe valgus knee using body surface topography because the lateral traction of the patella in these patients is strong and can increase its instability, and the resulting dislocation would lead to changes in location, which is thought to greatly change the actual lower extremity alignment angle [27]. Therefore, it is difficult for the general public to use these methods to prevent and manage lower extremity alignment problems through self-diagnosis. In this regard, an application that can serve as a tool for measuring lower extremity alignment may be helpful.
This study had some limitations. First, although the two evaluators were fully familiar with the use of measurement tools, the measurements can be affected depending on the user's proficiency because the points in the application were required to be adjusted using a finger or touch pen. Second, the effects of the participants age and K-L grade and pelvis oblique on the results was not investigated. In addition, measurements were performed in posture identical (as much as possible) to that used during the radiographic imaging; however, other postures such as comfortable posture and legs gathered were not measured, and the agreement of the measured lower extremity alignment angle was not confirmed. Further, the location of the smartphone camera was also not considered. Thirdly, the actual lower extremity alignment angle and the PLEAA measured using the application differed.
The correlation between the two values was also insufficient at an intermediate level. In this respect, additional studies with a larger number of participants are needed to increase the accuracy and correlation of lower extremity alignment measured using the smartphone application. In addition, it is necessary to improve the smartphone application so that the lower extremity alignment angle can be measured even in comfortable position and various camara location. Further, it is important to automatically detect the measurement point to avoid the results being affected by the user.
Regardless of these limitations, we believe that the developed application can still be used for self-diagnosis of lower extremity misalignment. However, the algorithm of the application is unable to automatically detect a specific point on the body in a complete manner. The results of the application and the actual values differ, and this may have implications in terms of the diagnostic value of the application. To resolve this problem, more patient data should be collected to improve the accuracy of the application.

Conclusions
The actual lower extremity alignment angle measured using radiographs and the PLEAA measured using the smartphone application developed in this study showed a positive correlation. Therefore, it can be deduced that as the PLEAA increases, the actual lower extremity alignment angle also increases. The smartphone application has the potential for self-diagnosis of lower extremity misalignment, thereby reducing the need for radiation exposure, hospital visits, and specialized equipment. Further, this smartphone application has the potential to be used for self-diagnosis of varus and valgus knee, which can possibly accelerate the knee osteoarthritis detection. Further studies are needed with data from more patients to improve the accuracy of the application and to automatically detect measurement points to avoid user influence.