## 1 Introduction
### Bridging the Gap: Accessible Automation for LLD Compensation  
Currently, there is a notable absence of cost-effective, automated solutions capable of evaluating and compensating for leg length discrepancy (LLD) in real time. Specifically, there is no functional system that provides a closed-loop connection between LLD evaluation and compensation using an accessible, non-dedicated device, such as a smartphone. This is especially relevant for patients with unilateral amputations who require frequent adjustments due to growth and for patients undergoing rehabilitation after amputation, as changes to the residual limb necessitate regular prosthetic adjustment. In children, the prosthesis can function as a long-term adaptive tool throughout the growth and development period, thereby helping to maintain body symmetry. Developing such a system would allow for real-time image capture and automatic prosthesis alignment relative to the intact limb. This would eliminate the need for clinical supervision and offer a patient-centered solution.  
The proposed system is characterized by its originality, functionality, and autonomy. It integrates real-time evaluation of LLD with mechanical compensation, a feat made possible by the utilization of a smartphone. The proposed methodology entails the detection of LLD through image processing, underpinned by a novel implementation of a newly designed algorithm, and involves the incremental adjustment of prosthesis length via closed-loop control. This innovative solution has the potential to effectively replace a set of prostheses of different lengths. It is particularly advantageous for transtibial amputees in developing regions, as it does not require clinical supervision and utilizes low-cost, accessible hardware.  
The initial step in addressing LLD in amputee patients is a clinical evaluation of LLD using a standardized method. The evaluation is conducted by a medical specialist equipped with a proper device to determine the LLD. Following this evaluation, the prostheticl undertakes a manual adjustment of the prosthesis length, or, in instances where modification is unfeasible, replaces it with an appropriately sized prosthesis.  
The present study has developed a prosthesis that utilizes computer vision to address LLD, with a focus on the transtibial aspect. This prosthesis is designed to be adaptable, and its design is based on smartphone technology, which is a technology that the user typically already possesses. The prosthesis's development encompassed multiple stages, including the creation of a computer vision-based application for LLD compensation and the establishment of an experimental setup for laboratory testing of the prototype. The results obtained demonstrate the functionality of the first automated LLD compensation method, based on computer vision, managed through a smartphone and integrated into a transtibial prosthesis. The present study makes a novel contribution by introducing the  
Figure 2: Two-level classification of prosthetic systems for manual adjustment of the artificial limb [22; 23; 25; 26; 27; 28; 29; 30; 31; 32; 33].  
first integrated method that combines computer vision-based assessment and real-time compensation of leg length discrepancy directly within a transtibial prosthesis. In contrast to prevailing methodologies that depend on specialized equipment or manual interventions, the proposed solution uses a standard smartphone and an adaptive prosthetic module to automatically restore limb symmetry. Extensive experimental validation was conducted, and the system demonstrated high accuracy and repeatability. It is a low-cost, accessible alternative to existing methods and demonstrates strong potential for home use, particularly among children or patients in remote areas.