Mechatronic Device Used to Evaluate the Performance of a Compliant Mechanism and Image Processing System in Determining Optometric Parameters

: The work presented in the paper describes a mechatronic test stand and technique employed to determine the accuracy of a system developed by the authors to assist optometrists in measuring parameters used in the customization of progressive lenses, as well as regular lenses. The system aims to o ﬀ er information about interpupillary distance, pantoscopic angle, and vertex distance, as well as measurements useful in correctly mounting the lenses in the frames. This is conducted by a tt aching a marker support system to the user’s frame and determining the user’s dimensions by using image acquisition techniques performed via a custom application built for this purpose. In this paper, a test mannequin is used to determine the accuracy of the system, with measurements being compared to those obtained by using classic methods. This method is used to determine the accuracy of the measurements in a controlled environment. Following the good results obtained in this paper and pending some improvements to the application, clinical tests will be performed on a small scale in selected optometrist o ﬃ ces.


Introduction
The present work represents a logical continuation of the research developed by the authors in the previously published papers [1,2] that refer to the complaint system executed by additive technologies with possible uses in the field of personalized clinical optometry.The first paper [1] is mainly based on the design and technology of obtaining an important part of the proposed system-compliant mechanism for marker support, which directly fastens the glasses.Following the research carried out, several constructive options were proposed for the mechanism, and in the end, the optimal geometry was chosen for the given application, taking into account the anatomical, technical, and other important aspects that can intervene and complicate the process of use and/or may possibly affect the correctness of the data obtained during use.The choice of the optimal materials and technology for obtaining the structures was also discussed, and justified-thermoplastic materials and respectively Fused Deposition Modeling (FDM) technology from the family of additive manufacturing were chosen.The choice of technology is mainly due to the following considerations: the ease of use of the technology, the possibility of obtaining complicated and personalized geometries in a relatively short time, and, at the same time, the low production cost.Regarding the materials for the compliant mechanism, usual thermoplastic materials used in FDM technology were proposed (PLA (Polylactic acid), ABS (Acrylonitrile Butadiene Styrene), and TPU (Thermoplastic polyurethane)) based on their adequate mechanical properties and availability.The sizing of the compliant mechanism was based on the standards used in optometry regarding the dimensions of spectacle frames and the lenses before they were cut and adjusted in the frames.In order to evaluate the displacement by applying the necessary force and implicitly the opening of the gripping elements for fastening the glasses, a study was also carried out using the finite element method, after which the mechanical behavior of the compliant mechanism was estimated, and mechanical characteristics were determined such as the degree of displacement, von Mises stress and equivalent strain for the three thermoplastic materials proposed, comparing their mechanical performances of the materials when applying certain loads.Furthermore, a comparative discussion about the 3D printed parts obtained by FDM technology from three thermoplastic materials used and their 3D printing conditions and parameters was addressed in the paper [1]; the authors also proposed an electropneumatic experimental rig for testing 3D printed compliant mechanisms for marker supports.
The second paper of the authors [2] approaches the continuation, development, and deepening of the studies in the first article and refers to the design and testing of the fully compliant mechanism for complex personalized lenses in the field of clinical optometry.In this study, the component elements that govern the interesting mechanical behavior of the structures are introduced, as well as the optometric parameters that can be measured and determined with the help of the developed compliant mechanisms: interpupillary distance (both left and right), lens width (both left and right), lens height, bridge width, pupil distance to lower part of the lens and so on.Also, mechanical analysis using finite element method tools was performed for the fully compliant system in order to estimate the behavior of the structure in the function of applied loads of work conditions for a certain type of glasses before the execution of the mechanisms and to determine mechanical characteristics of interest.Finally, the second study discusses the manufacturing testing of developed different types of glasses, preliminarily evaluates the compliant mechanism on a human patient, and presents the results obtained during the first image recognition determination.
Figure 1 [1,2] shows the graphical summary and synthesis regarding the research subjects of previous papers of the authors.The first case (left part of the figure) is about the design, simulation, manufacturing, and testing of one of the most important components of the mechanical structure of the system-grasping element [1], and the second paper discussed similar things about the complete system of compliant mechanism (right part of the figure) [2].As shown in Figure 2, the complete system of the proposed compliant mechanism consists mainly of several sections that allow the positioning of the marker support (MS) sections in view of the measurements of interest of the specific optometric parameters and the grasping mechanisms that practically fix the glasses to be investigated.More details about the working principle and the mechanical behavior of the complete compliant mechanism can be found in the previous paper of the authors [2].The system supports the placement of markers in relation to a user's face, enabling the determination of specific dimensions based on the user's facial features and selected glasses frames.These dimensions include pupillary and interpupillary distance, glasses frame curvature, pantoscopic angle on each side of the user's face, and measurements required for customizing the lens to fit the frames [3].The markers, made of specific-colored adhesive low-gloss paper, are positioned with a custom stencil to ensure accuracy.A chart in Figure 3 illustrates the measurements possible with this system.By capturing close-up and distant photos of the patient wearing the glasses and marker support setup, all necessary parameters can be accurately determined.Some of the measurements that can be obtained include the following: Recent advancements in the optical and optometric fields, driven by additive technologies [4], have enabled the creation of personalized glass frames through additive manufacturing [5][6][7].This development marks the beginning of a transformative era in optometry, allowing for highly customized frames.Selective laser deposition technology, using metal or polymeric powders, has proven efficient in producing these frames with minimal waste.Additionally, additive technologies facilitate the production of various lenses and multifunctional components, enhancing optical systems and devices [8,9].In ophthalmology, bioprinting techniques for corneal reconstruction and other eye tissues are showing promising results in advanced testing phases, offering significant future benefits [10,11].
3D printing in medicine enables the creation of customized implants, prosthetics, and surgical tools tailored to individual patients.It facilitates bioprinting for tissue and organ regeneration, such as corneal and cartilage reconstruction.This technology enhances precision in medical procedures, accelerates innovation, and significantly improves patient outcomes.This can be easily paired with image acquisition techniques that involve capturing detailed images of the eye using technologies like OCT (Optical Coherence Tomography), fundus photography, and corneal topography [12][13][14][15].These images help diagnose and monitor eye conditions, assess retinal health, and guide treatments, ensuring accurate and effective patient care.This can be easily paired with the field of mechatronics, which integrates robotics, electronics, and computer control for advanced surgical tools, diagnostic devices, and patient care automation.
Considering the lines discussed above, the present paper aims to continue the research topic by the authors, namely to conceive and develop a mechatronic rig device for the testing and measuring the specific optometric parameters with the help of the complete compliant mechanism in order to collect and to process the data obtained in the function of some technical aspects of the measurements and to correct and choose the optimal measurement conditions for possible implementation and use of this solution in clinical and practical optometry.
In this paper, a semi-automatic test bench was built to allow the authors to test out the marker support system and application proposed previously on a mannequin, starting from known dimensions.This allows for a comparison to be made between classic methods of obtaining key parameters as opposed to those obtained by means of the application proposed in this paper.In this stage, the setup allows for testing of the method without having to take into account the patient's movement.Also, the system allows for a very large number of measurements to be taken of the same subject-impossible with a human patient.

Mechatronic Testing Device Design and Construction
In order to allow the apparatus to be tested, as well as calibrated for real-life measurements, a test bench was designed and manufactured.The basic schematic for this is shown in Figures 4 and 5.A mannequin head ( 3) is placed on a rotary platform (4) connected to a stepper motor.This allows for movement in three increments: at 0, 90, and 180 degrees, with the 90-degree position corresponding to the patient facing the tablet's camera (1) while the other two positions correspond to the user looking left and right.The assembly is placed on a screw-driven linear axis (5 and 6), actuated by using a second stepper motor (8).This allows the head to be placed at various distance increments relative to the camera of the tablet and allows the impact of said distance on the measurements to be viewed.The distances chosen are between 50 and 100 cm, with a 10 cm increment.These were chosen to allow for the subject to be in full view of the camera at the closest range and the maximum distance at which the markers (2) are still detected by the application.The tablet is placed on a fixed support (9) that allows for the best in-focus position (10) of the camera relative to the mannequin's head.The entire assembly is placed on a support plate (7).The proposed system was designed using 3D software and assembled using a standard 20 mm × 20 mm aluminum extruded profile, along with connectors and t-slot fastening elements (Figure 6).Stepper motors used are common Nema 23 standard, along with TB6560 drivers and ESP32 microcontrollers.Head positioning is conducted in an open loop, while the linear axis is equipped with end stops.The designed system allows faster measurements to be taken since a human is no longer involved, through automation of certain steps, but also for much better repeatability and an overall lower level of errors.This also allowed us to determine what part of the errors was due to human interaction with the system.
A total of three images can be captured using the device (Figure 7): one front and one for each side of the test mannequin.The measurements that can be taken from this are explained in Table 1.

Methodology Used for Measurements
The application to be used is developed solely for this purpose and features elements that will allow the optometrist to explain the functionality of specific lens types, measure the patient's parameters using the software and marker frame, order lenses, and other activities specific to their work, beyond the scope of this paper.As such, the paper will focus only on the measurement aspects and will only briefly mention the other parts of the application.
The measurement module of the application allows for two modes of acquisition using two different measurement modules.These are: -Simple measurements: allowing for interpupillary distance and semi-pupillary distance for each eye.Along with these, measurements for the bridge of the frames, lens mounting height, lateral parameters (pupillary height), and lens width and height will be performed in this stage.This is performed for both far and close mounting of the glasses so as to allow for customization of the final, regarding the different parameters typically obtained in each case.-Complex measurements: These complete measurements also allow for vertex distance acquisition (distance from the pupil to the lens's plane) as well as pantoscopic angle for each side of the patient (left and right).Two measurements are taken to allow for maximum customization of both the frames and progressive lenses.
The steps taken in each of the two measuring modes are presented in Figures 8 and 9.With the system in the reference position (distance of 50 cm from the tablet, mannequin in front position), a frontal image is captured, and automatic marker recognition is performed (Figure 10), followed by a boxing stage in which the edges of the glasses frames are identified.This allows for measurements corresponding to Image Step 1 from Table 1 to be acquired.Following this stage, the head is rotated 90 degrees to the left for Step 2 (Figure 11).Following automatic marker recognition and measurements (pantoscopic angle and vertex), the head is again rotated in the opposite direction, 180 degrees.Acquisition of images relevant to Step 3 is performed, and measurements are taken.Even though automatic color marker recognition and pupil recognition are automatic, some adjustments are necessary and are performed by a human operator.The steps are repeated for a number of 50 measurements, and then the mannequin is moved 10 cm further away from the tablet.The previous steps are then redone, and the results are logged into the application's database.

Results and Discussion
The proposed system was tested in the following conditions: -Measurements were taken by an optometrist with no previous experience with the application.Also, the optometrist was not given any information about the algorithm used to determine the measured parameters so as not to influence the final result.In addition to this, the real measurements were not communicated to the operator prior to finishing the measurement cycle.Initial data is obtained by measuring the distances and angles using basic methods: rulers and protactors.
-A total of approximately 50 measurements was taken for each point along the x-axis, at 50, 60, 70, 80, 90, and 100 cm.Each measurement consisted of one frontal, one right, and one left image.An average total of 150 images was captured and interpreted at 50 cm before moving on to 60 cm and so on.-In total, over 300 measurements were taken, with over 900 images interpreted in total.In the following part of the paper, the results obtained after the measurements are presented and discussed as needed.
As previously mentioned, the results were determined for the interpupillary distance (total (ID) and semi-distances (IDL and IDR)), pantoscopic angle, and vertex distance depending on the distance to the target and compared with the real data.
The data obtained was interpreted in graphic form both for individual distances to the target and concatenated in order to compare the dispersion of the results on all the distances to the target approached.In addition, average measured distance, average absolute error (modulus of the difference between the measured data and the real data), and standard deviations for all parameters of interest were calculated and presented in graphic and tabular form.
During the measurements, each set of data was uploaded individually to an online private database and later downloaded for processing.The data revealed a clear difference between taking the measurements at different distances from the mannequin, with absolute errors increasing for interpupillary distance from an average of 0.5 mm to over 2 mm, as shown in Figures 12 and 13.
A detailed description of the errors at each distance was needed, as shown in Figure 12a-f.Each of these graphs shows the actual average distance measured as line plots, as well as the actual measured distance as points in each of the charts.
To further allow a trend to be observed, a general chart of the measurements was plotted, as shown in Figure 12g.There is a clear increase in error over 70 cm, with the error increasing the further the mannequin is from the tablet.
In the current case, the absolute errors for each distance could be attributed to the movement of the camera by the optometrist during image acquisition or errors in image recognition (color and pupillary markers).Interpupillary distance measurement has also produced the semi-pupillary distance, the distance between the center of the mannequin's face and pupil.These measurements were also plotted in graphs shown in Figure 14a-f, with a concatenated view in the graph shown in Figure 14g.The same behavior can be observed as the absolute error increases with lower precision in the obtained images.The pantoscopic angle is the tilt of eyeglass lenses towards the cheeks, enhancing vision and comfort.Vertex distance is the space between the back of the lens and the front of the eye.Both are crucial for optimal lens performance, affecting visual clarity and prescription accuracy.
As stated previously, measurements were also performed for the pantoscopic angle as well as the vertex distance (distance between the pupil and the plane of the lens).Results have shown that similar to interpupillary measurements, vertex distance is affected by the distance at which the images are captured.This is shown in the other measurements discussed further in the paper.The behavior is best observed in the latter, with the measurements "drifting" towards lower values, with the increase in distance between the tablet and the markers.
However, very little, if any, effect of distance over the pantoscopic angle was observed.Regarding these measurements, since the mannequin does not feature any asymmetrical characteristics, the measurements were considered identical for each side.These are also shown in Figure 16a-f for each distance, along with Figure 16g, which offers a general overview of the trend in the obtained values.
The following will present the main interpretations and findings resulting from the experimental determinations according to the obtained parameters.
Analyzing the graphs in Figures 12 and 13 and Table 2, it is clearly seen how the measured average ID increases and deviates from reality as the distance to the target increases.The same general tendency can be observed in the case of average absolute errors and standard deviations.Therefore, for a distance of 50 cm from the target, the following data were obtained for the interpupillary distance: average measured distance of 51.115 mm with a standard deviation (SD) of 0.416 and with maximum and minimum values of 52.23 mm and of 50.34 mm, respectively and absolute average error from the actual distance of 0.503 mm, appearing to be the most optimal distance from the target among those investigated for the correctness of the measurements of this parameter.If at 60 cm to target, the deviations from reality do not seem to increase significantly, being comparable to those at 50 cm, starting with a distance to target of 70 cm, the results of the measurements become more and more distant from the actual data, for example at 90 and 100 cm to target, having an average absolute error of 2.438 mm and 2.374 mm, almost five times higher compared to a distance of 50 cm to target.Regarding the determined semidistances ((IDL and IDR) Figures 14 and 15 and Tables 3 and 4), it was found, in general, a greater predisposition to errors for IDR-starting with a distance of 60 cm to target-the average absolute errors exceed 1.25 mm (for IDL, the average absolute error exceeds 1 mm compared to the real data only for the distance of 100 cm to target).Also, at a distance of 100 cm, some significantly different results appear compared to the rest of the measurements, this being visible on the graphs in Figure 14f,g through the points further away from the rest of the data-very large distance to target representing an amplification of possible errors caused by the human factor.When it comes to the pantoscopic angle (Figures 16 and 17 and Table 5), there is generally a tendency to decrease the measured angle and move away from the real angle when the distance to the target increases.The closest results to reality this time, too, are obtained for the distance to the target of 50 cm.The distance to the target for measuring the pantoscopic angle does not greatly affect the dispersion of the results compared to the obtained averages nor the average absolute errors up to a distance to the target of 80 cm (inclusive); the visible differences in the absolute errors becoming apparent at 90 cm and 100 cm to target.Finally, vertex distance measurements (Figures 18 and 19 and Table 6) confirm that the distance of 50 cm to the target is the most suitable for performing the measurements in terms of accordance with the actual data.With the increase of the distance to the target, a successive increase of the vertex distance and a distance from the actual vertex up to a distance to the target of 90 cm can be observed, at the same time increasing the average absolute errors.However, the deviations from the average obtained for the measured values are located in an approximately comparable range for all the distances involved in the experimental research to determine the vertex distance.

Figure 1 .
Figure 1.Graphical summary of previous research of the authors regarding the approached subject [1,2].

Figure 2 .
Figure 2. Geometry and key elements of developed complete compliant mechanism for optometric field [2].

Figure 4 .
Figure 4. Basic schematic of the test stand, side view.

Figure 5 .
Figure 5. Basic schematic of the test stand, front.

Figure 7 .
Figure 7. Overview of the test stand.

Table 1 .
Optometric parameters that can be taken by measurements.Image Step/Stepper Motor Angle ParametersFront/0 degrees Interpupillary Distance, Semi-pupillary distance left and right, Frame curvature, Lens height and width Left/+90 degrees Pantoscopic angle left, Vertex distance left Right/−90 degrees Pantoscopic angle right, Vertex distance right

Figure 10 .
Figure 10.Frontal measurements automatic color and eye recognition.

Figure 13 .
Figure 13.Comparative analysis of obtained results regarding the interpupillary distance measurement.

Figure 15 .
Figure 15.Comparative analysis of obtained results regarding the interpupillary distance measurements (left and right).

Figure 17 .Figure 18 .
Figure 17.Comparative analysis of obtained results regarding the pantoscopic angle measurements.

Figure 19 .
Figure 19.Comparative analysis of obtained results regarding the vertex distance measurements.

Table 2 .
Obtained data for interpupillary distance measurement.