Calibration method, system, device and medium for measuring pupil rotation angle and direction

By combining the actual distance from the eyeball to the main camera measured in real time by a side camera with a preset distance, a personalized eyeball rotation angle is calculated, which solves the problem of insufficient measurement accuracy caused by individual differences in traditional nystagmus detection methods and achieves high-precision personalized calibration.

CN121570122BActive Publication Date: 2026-04-24ISEN TECH & TRADING
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ISEN TECH & TRADING
Filing Date
2026-01-29
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Traditional nystagmus detection methods suffer from insufficient measurement accuracy due to individual differences, and cannot accurately reflect the true eye movement characteristics of the subject.

Method used

The actual distance from the subject's eyeball to the main camera is measured in real time using a side camera. The personalized eyeball rotation angle is calculated by combining the preset distance, and a calibration coefficient for pixel displacement and rotation angle is established. A personalized calibration database is generated by sequentially lighting multiple LED indicators and acquiring eye image sequences.

Benefits of technology

It eliminates the influence of differences in device wearing position and individual physiological characteristics on measurement accuracy, improves measurement precision and accuracy, and enables personalized calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121570122B_ABST
    Figure CN121570122B_ABST
Patent Text Reader

Abstract

The application provides a kind of scaling method, system, equipment and medium for measuring pupil rotation angle and direction, it is related to medical equipment technical field, method includes: when the person to be measured wears nystagmus detection equipment, the reference image containing scale is photographed, and the real-time image containing the eyeball of the person to be measured and main camera is photographed;The reference image is superimposed with real-time image, and the actual distance of eyeball to main camera is generated;The preset distance between main camera and multiple LED indicator lights is obtained, when each LED indicator light is lit in turn, the eye image sequence when eyeball gazes at each LED indicator light is collected;The pixel coordinate position when eyeball gazes at target LED indicator light in eye image sequence is extracted;The rotation angle when eyeball gazes at target LED indicator light is calculated in combination with the actual distance and the preset distance;The scaling coefficient of pixel displacement and rotation angle is established in combination with pixel coordinate position and rotation angle.The application has the technical effect of improving the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical device technology, specifically to a calibration method, system, device, and medium for measuring the pupil rotation angle and direction. Background Technology

[0002] Nystagmus detection is an important diagnostic tool in clinical medicine for assessing vestibular function and neurological disorders, requiring precise measurement of the subject's eye rotation angle and trajectory. Traditional nystagmus detection methods mainly rely on the doctor's subjective observation or simple mechanical measuring devices, making it difficult to provide accurate quantitative analysis data, and the measurement accuracy is easily affected by individual differences and environmental factors. With the development of digital image processing technology, nystagmus detection methods based on video image analysis have gradually become a research hotspot. However, how to establish accurate standards for measuring eye rotation angle, especially how to achieve personalized calibration, remains a significant technical challenge in this field.

[0003] Existing nystagmus detection techniques typically use fixed calibration coefficients to convert pixel displacements in an image into eye rotation angles. This method standardizes angle measurements by pre-setting uniform conversion parameters. However, due to significant differences in the physiological characteristics of different subjects' eyes, using uniform calibration coefficients cannot accurately reflect the individual's true eye movement characteristics, resulting in insufficient measurement accuracy. Summary of the Invention

[0004] This application provides a calibration method, system, device, and medium for measuring the pupil rotation angle and direction, to improve measurement accuracy.

[0005] In a first aspect, this application provides a calibration method for measuring the pupil rotation angle and direction. The method includes: when a subject wears an nystagmus detection device, capturing a reference image including a scale and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device using a lateral camera located on the side of the nystagmus detection device; superimposing the reference image and the real-time image to generate the actual distance from the subject's eyeball to the main camera; obtaining a preset distance between the main camera and multiple LED indicators in the nystagmus detection device; and acquiring a sequence of eye images of the subject when the subject's eyeball is focused on each LED indicator as each LED indicator is lit sequentially; extracting the pixel coordinate position of the subject's eyeball when focused on a target LED indicator in the eye image sequence, wherein the target LED indicator is one of the multiple LED indicators; calculating the rotation angle of the subject's eyeball when focused on the target LED indicator by combining the preset distance and the actual distance; and establishing a calibration coefficient for pixel displacement and rotation angle by combining the pixel coordinate position and the rotation angle, wherein the calibration coefficient represents the amount of image pixel movement corresponding to a unit angle of eyeball rotation.

[0006] By employing the above technical solution, the actual distance from the subject's eyeball to the main camera is measured in real time using a side-facing camera. Combined with a preset distance, a personalized eyeball rotation angle is calculated, effectively solving the problem of insufficient measurement accuracy caused by individual differences in traditional calibration methods. By overlaying reference images with real-time images to generate accurate actual distance parameters, the system can establish unique calibration coefficients for each subject, significantly improving the accuracy of pixel displacement and rotation angle conversion. This method establishes a complete personalized calibration database through the sequential illumination of multiple LED indicators and the acquisition of eye image sequences, enabling the calibration coefficients to accurately characterize the amount of image pixel movement corresponding to a unit angle of eyeball rotation for a specific subject. This personalized calibration method based on actual distance correction eliminates the influence of differences in device wearing position and individual physiological characteristics on measurement accuracy, thus improving measurement precision.

[0007] Secondly, this application provides a calibration system for measuring the pupil rotation angle and direction, the system comprising: an imaging module, a superposition module, an acquisition module, an extraction module, a first combining module, and a second combining module; wherein,

[0008] The imaging module is used to capture a reference image including a scale and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device via a side-facing camera located on the side of the nystagmus detection device when the subject wears the device. The overlay module is used to overlay the reference image and the real-time image to generate the actual distance from the subject's eyeball to the main camera. The acquisition module is used to acquire a preset distance between the main camera and multiple LED indicator lights in the nystagmus detection device, and to acquire the subject's eyeball gaze at each LED indicator light as the LED indicator lights up sequentially. The sequence of eye images when the LED indicator is in use; the extraction module is used to extract the pixel coordinates of the subject's eye when the subject's eye is focused on the target LED indicator, wherein the target LED indicator is one of a plurality of LED indicators; the first combining module is used to combine the preset distance and the actual distance to calculate the rotation angle of the subject's eye when the subject's eye is focused on the target LED indicator; the second combining module is used to combine the pixel coordinates and the rotation angle to establish a calibration coefficient for pixel displacement and rotation angle, wherein the calibration coefficient represents the amount of image pixel movement corresponding to a unit angle of eye rotation.

[0009] Thirdly, this application provides an electronic device that adopts the following technical solution: including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to execute a computer program for a calibration method for measuring the pupil rotation angle and direction as described above.

[0010] Fourthly, this application provides a computer-readable storage medium that employs the following technical solution: storing a computer program capable of being loaded by a processor and executing any of the above-mentioned calibration methods for measuring the pupil rotation angle and direction.

[0011] In summary, this application includes at least one of the following beneficial technical effects:

[0012] By measuring the actual distance from the subject's eyeball to the main camera in real time using a side-facing camera and calculating a personalized eyeball rotation angle based on a preset distance, this method effectively solves the problem of insufficient measurement accuracy caused by individual differences in traditional calibration methods. By overlaying reference images with real-time images to generate accurate actual distance parameters, the system can establish unique calibration coefficients for each subject, significantly improving the accuracy of pixel displacement and rotation angle conversion. This method establishes a complete personalized calibration database through the sequential illumination of multiple LED indicators and the acquisition of eye image sequences, enabling the calibration coefficients to accurately characterize the amount of image pixel movement corresponding to a unit angle of eyeball rotation for a specific subject. This personalized calibration method based on actual distance correction eliminates the influence of differences in device wearing position and individual physiological characteristics on measurement accuracy, thus improving measurement precision. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a calibration method for measuring the pupil rotation angle and direction provided in an embodiment of this application.

[0014] Figure 2 This is a schematic diagram of the geometric principle of measuring the eyeball rotation angle in an oculomotor detection device provided in an embodiment of this application;

[0015] Figure 3 This is a flowchart illustrating another calibration method for measuring the pupil rotation angle and direction provided in an embodiment of this application;

[0016] Figure 4 This is a physical image provided in an embodiment of this application;

[0017] Figure 5 This is another physical image provided in the embodiments of this application;

[0018] Figure 6 This is a schematic diagram of the structure of a calibration system for measuring the pupil rotation angle and direction provided in an embodiment of this application;

[0019] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0020] Explanation of reference numerals in the attached figures: 1000, electronic device; 1001, processor; 1002, communication bus; 1003, user interface; 1004, network interface; 1005, memory. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0022] In the description of the embodiments in this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.

[0023] Figure 1 This is a schematic flowchart illustrating a calibration method for measuring the pupil rotation angle and direction provided in an embodiment of this application. Figure 1 As shown, the method includes S101-S106:

[0024] S101, when the subject wears the nystagmus detection device, a reference image including a scale is captured by a side-facing camera set on the side of the nystagmus detection device, and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device is captured.

[0025] After the subject wears the nystagmus detection device, two crucial image acquisition processes are first performed using a lateral camera located on the side of the device. This step is designed to address the problem of inaccurate calibration of eye rotation angles caused by individual anatomical differences in existing technologies. By obtaining the actual distance between the subject's eyeball and the main camera, personalized and precise calibration can be achieved.

[0026] A side-view camera is an auxiliary camera installed on the side of an eye-tracking device. Its optical axis is perpendicular to that of the main camera, allowing it to simultaneously capture the subject's eye position and the spatial relationship between the main camera and the side view. In practice, the side-view camera first captures a reference image containing a ruler, typically a straight ruler, placed vertically on the same horizontal line as the main camera and maintaining a fixed spatial position. This reference image establishes the conversion between pixels and actual physical distance, providing a known reference point for subsequent distance measurements.

[0027] Next, once the subject correctly wears the nystagmus detection device and maintains a relatively stable posture, the lateral camera immediately captures a second image—a real-time image containing both the subject's eyeballs and the main camera of the nystagmus detection device. In this real-time image, the lateral camera simultaneously captures the spatial position of both the subject's eyeballs and the main camera; the spatial relationship between these two key elements forms the basis for calculating the actual distance from the eyeballs to the main camera. The main camera, in the nystagmus detection device, is the primary imaging device used to directly capture the subject's eye movements and is typically mounted close to the front of the subject's eyes.

[0028] This dual-image acquisition design allows the system to obtain two important information sources: a reference image provides a standard for converting pixels to actual distances, while the real-time image provides the true spatial relationship between the subject's eye and the main camera. This design avoids the shortcomings of traditional methods that use fixed average values ​​to estimate the distance between the eye and the camera, because each subject's facial contours, eye socket depth, nasal bridge height, and other anatomical structures exhibit significant individual differences, and using fixed values ​​would introduce non-negligible measurement errors.

[0029] S102 overlays the reference image with the real-time image to generate the actual distance from the subject's eyeball to the main camera.

[0030] Overlay processing refers to the process of spatially aligning and integrating information from two images captured at different times using image registration and fusion algorithms. In practice, the system first performs scale recognition and extraction on the reference image. Using image recognition algorithms, it automatically detects the scale lines and numerical markings in the reference image, establishing the correspondence between pixel coordinates and actual physical distances, thus generating pixel scale parameters. These pixel scale parameters characterize the actual physical length corresponding to each pixel under the current imaging conditions of the side-facing camera, providing a precise conversion benchmark for subsequent distance measurements.

[0031] Simultaneously, the system performs feature point recognition and position information extraction on real-time images, automatically identifying the location of feature points on the subject's eyes and the geometric center of the main camera using computer vision technology. Eye feature points are typically selected from the center of the pupil or the center of the corneal reflective spot as reference points because these feature points have good contrast and stability in the image, facilitating accurate algorithm positioning. The position information of the main camera is determined by recognizing its outer contour or specific markers to determine its spatial coordinates in the image.

[0032] Next, the system performs image registration, precisely aligning the reference image and the real-time image in the same spatial coordinate system. Image registration refers to the process of finding the spatial transformation relationship between two images to ensure they are geometrically consistent. Since the reference image and the real-time image were both captured by the same side-facing camera at similar positions and angles, they have similar perspective transformation characteristics. The system can determine the precise mapping relationship between the two images through feature point matching and geometric transformation calculation.

[0033] After image registration is completed, the system overlays and fuses the two images. In the fused image, the scale information, the position information of the eyeball and the main camera are integrated into the same measurement space. At this point, the system can directly measure the pixel distance between the eyeball feature points and the center point of the main camera in the overlaid image. Then, using the previously established pixel scale parameters, this pixel distance is accurately converted into the actual physical distance, that is, the actual distance from the subject's eyeball to the main camera.

[0034] Based on the above embodiments, as an optional implementation, in S102, the reference image and the real-time image are superimposed to generate the actual distance from the subject's eyeball to the main camera, specifically including S21-S24:

[0035] S21, Identify and extract the scale information of the ruler from the reference image to obtain the pixel scale of the ruler.

[0036] The system identifies and extracts the scale information of the ruler from the reference image to obtain the ruler's pixel scale. The scale information includes the position of the scale lines, numerical markings, and unit information. The system automatically detects these features using image recognition algorithms to establish the correspondence between pixel coordinates and actual lengths. The pixel scale represents the actual physical length corresponding to each pixel, typically in millimeters per pixel. This parameter provides a precise conversion benchmark for subsequent distance measurements, ensuring the accuracy of the measurement results.

[0037] S22 identifies the subject's eye feature points and the position information of the main camera from real-time images.

[0038] The system identifies the subject's eye feature points and the position information of the main camera from real-time images. Eye feature points are typically selected from the center of the pupil or the center of the corneal reflective spot because these locations offer good contrast and stability in the image, facilitating accurate algorithm localization. The position information of the main camera is determined by recognizing its outer contour or specific markers. The system uses computer vision technology to extract the pixel coordinates of these key locations, determining accurate measurement endpoints for distance measurement.

[0039] S23, perform image registration and overlay processing on the reference image and the real-time image to determine the relative position of the eye feature points and the main camera in the same coordinate system.

[0040] The system performs image registration and overlay processing on the reference image and the real-time image to determine the relative positions of the eye feature points and the main camera in the same coordinate system. Image registration is a technique that finds the spatial transformation relationship between two images to make them geometrically consistent. Since both images were taken by the same side camera and have similar perspective features, the system achieves precise alignment through feature point matching and geometric transformation calculation, integrating the scale information and eye position information into a unified measurement space.

[0041] S24, based on the pixel scale, converts the pixel distance between the eye feature points and the main camera into the actual physical distance, thus obtaining the actual distance from the subject's eye to the main camera.

[0042] The system converts the pixel distance between the eye feature points and the main camera into actual physical distance based on a pixel scale. First, the system measures the pixel distance between the eye feature points and the center point of the main camera in the overlaid image. Then, it multiplies this pixel distance by the pixel scale parameter obtained in step S21 to obtain the corresponding actual physical distance, i.e., the actual distance from the subject's eye to the main camera. This image processing-based distance measurement method avoids the limitations of traditional measurement tools, achieving automated, high-precision, personalized distance measurement and providing reliable geometric parameters for subsequent calibration calculations.

[0043] S103: Obtain the preset distance between the main camera and multiple LED indicators in the nystagmus detection device. When each LED indicator lights up in sequence, collect the eye image sequence of the subject when the subject's eyes are focused on each LED indicator.

[0044] The preset distance refers to the precise physical distance between the optical center of the main camera and the geometric center of each LED indicator light, determined in advance and fixed in the system parameters during the design and manufacturing phase of the nystagmus detection device using precision measuring tools. These LED indicators are typically arranged in a specific spatial layout inside the nystagmus detection device, forming a fixed geometric configuration centered on the main camera. A common layout includes two LED indicators symmetrically distributed horizontally and one LED indicator located in the center, constituting a horizontal angular calibration reference point. Because these distances are determined using high-precision measuring equipment during device manufacturing, they possess extremely high accuracy and stability and will not change during the use of the device.

[0045] After acquiring the preset distance parameters, the system begins executing the sequential lighting control sequence of the LED indicators. Sequential lighting refers to the process where the system automatically controls each LED indicator to illuminate one by one according to a preset time interval and order. Typically, each LED indicator is illuminated for 2-3 seconds, sufficient for the subject to complete the eye fixation action and stabilize their eye movement. This sequential lighting design avoids visual interference that could be caused by multiple light sources illuminating simultaneously, ensuring that the subject can clearly identify and accurately fixate on the currently illuminated target LED indicator.

[0046] As each LED indicator lights up sequentially, the system continuously captures a sequence of eye images of the subject at a high frame rate using the main camera. This eye image sequence refers to a series of eye images captured by the main camera at a preset sampling frequency during each LED indicator's illumination period. Typically, the sampling frequency is set to 120 frames per second to ensure the complete movement of the subject's eyeballs from one fixation position to another is captured. During this acquisition process, the subject needs to look at the illuminated LED indicators sequentially as instructed, rotating their eyes from the initial position to the target position and maintaining relative stability. This allows the system to accurately record the image position information of the eyeballs at different known rotation angles.

[0047] While acquiring a sequence of eye images, the system also records the status of LED indicators and timestamp information for each image, establishing a precise correspondence between the image and the specific gaze target. Through image processing algorithms, the system can extract the locations of key feature points of the subject's eyeball from each eye image, such as the coordinates of the pupil center or the location of the corneal reflective spot. The changes in the pixel coordinates of these feature points directly reflect the rotation trajectory of the eyeball.

[0048] S104, extract the pixel coordinates of the subject's eye when the subject's eyeball is focused on the target LED indicator in the eye image sequence. The target LED indicator is one of multiple LED indicators.

[0049] A target LED indicator refers to any specific LED indicator in a sequence of sequentially lit LED indicators. Each target LED indicator corresponds to a specific gaze direction and rotation angle of the subject's eye. In the specific implementation process, the system first needs to perform time synchronization analysis on the eye image sequence acquired in step S103. By matching the image timestamps with the timestamps of the LED indicator control signals, the system accurately identifies the lighting status of the LED indicator corresponding to each eye image, thereby grouping and classifying the image sequence according to different target LED indicators.

[0050] For each image subsequence corresponding to a target LED indicator, the system employs advanced computer vision algorithms to detect and locate eye feature points. The pupil center is typically chosen as the primary reference point because it possesses good contrast characteristics and geometric stability in the image, facilitating accurate localization by the algorithm.

[0051] The system improves image quality in the eye region through image preprocessing techniques, including grayscale conversion, noise reduction filtering, and contrast enhancement. For pupil center localization, the system employs a deep learning-based intelligent recognition algorithm. The specific implementation process is as follows: First, the system pre-collects a large number of eye image samples containing different lighting conditions, eye states, and individual differences to construct a training dataset. For each image in the training dataset, the pixel coordinates of the pupil center are precisely labeled manually, forming standardized annotation data. The training dataset covers various practical application scenarios, including normal pupils, dilated pupils, partial occlusion, and eyeglass reflections, ensuring the model's generalization ability. The system uses a convolutional neural network (CNN) architecture to construct the pupil center detection model. The network structure includes a feature extraction layer, an attention mechanism layer, and a regression prediction layer. The feature extraction layer extracts deep features from the eye image through multiple convolutional operations, the attention mechanism layer helps the model focus on key features in the pupil region, and the regression prediction layer directly outputs the two-dimensional coordinates of the pupil center. During model training, the system employs a mean squared error loss function to optimize network parameters and continuously adjusts model weights through backpropagation to minimize the error between the predicted pupil center coordinates and the manually labeled true coordinates. After training, the model can automatically identify the pupil region in an input eye image and directly output the precise pixel coordinates of the pupil center, achieving sub-pixel accuracy.

[0052] During the extraction of pixel coordinates, the system also needs to consider the stability assessment of eye fixation. Since the subject's eyes undergo a transition from motion to stillness as they turn towards the target LED indicator, the system needs to identify the time period within the image subsequence where the eye movement has stabilized and the subject is accurately fixating on the target LED indicator. This is achieved by analyzing the rate and magnitude of change in the pupil center coordinates across consecutive image frames. When the rate of change decreases below a preset threshold and the magnitude remains within a stable range, the system determines that the eye has reached a stable fixation state.

[0053] After identifying a stable gaze state, the system extracts the pixel coordinates of the subject's eyes when they are focused on the target LED indicator from the corresponding image frames. Pixel coordinates refer to the two-dimensional coordinates of the pupil center in the image coordinate system, typically represented by a coordinate system with the top-left corner of the image as the origin, the horizontal x-axis, and the vertical y-axis. To improve positioning accuracy, the system usually extracts coordinates from multiple consecutive image frames under stable gaze conditions and then calculates the average of these coordinates as the final pixel coordinate position. This averaging method effectively reduces measurement errors caused by image noise or minute nystagmus.

[0054] For each LED indicator in the nystagmus detection device, the system repeats the pixel coordinate position extraction process described above, ultimately obtaining a complete dataset of pixel coordinate positions. Each data point corresponds to the precise image position of the subject's eye when focusing on a specific target LED indicator. This pixel coordinate position data is highly accurate and repeatable because it is based on real measurement results obtained from the subject's actual eye movement behavior under controlled conditions.

[0055] S105, combining the preset distance and the actual distance, calculates the rotation angle of the subject's eyeball when looking at the target LED indicator.

[0056] The rotation angle refers to the angle by which the optical axis of the eye deflects relative to its initial direction when the subject's eyeball turns from its initial fixation position to the target LED indicator. It is usually expressed in degrees. In practice, the system establishes a geometric model with the center of the subject's eyeball as the vertex. The line connecting the center of the eyeball to the main camera serves as the reference baseline, and the line connecting the center of the eyeball to the target LED indicator serves as the target line of sight. The angle between these two lines is the rotation angle to be calculated.

[0057] The system first uses the preset distance parameters obtained in step S103 and the actual distance parameters generated in step S102 to perform geometric calculations. The preset distance represents the fixed physical distance between the optical center of the main camera and the geometric center of the target LED indicator. This distance is precisely determined and stored in the system parameters during the design phase of the nystagmus detection device. The actual distance represents the personalized physical distance between the center of the subject's eyeball and the optical center of the main camera. This distance is measured in real time using the image overlay processing technology in step S102 and can accurately reflect the specific facial anatomical features of the subject.

[0058] Based on these two key distance parameters, the system employs trigonometric geometric principles to accurately calculate the rotation angle. In the established geometric model, the main camera, the subject's eye center, and the target LED indicator form a right triangle. The actual distance from the subject's eye center to the main camera is the adjacent side, the preset distance from the main camera to the target LED indicator is the opposite side, and the line connecting the eye center to the target LED indicator is the hypotenuse. According to the tangent theorem of trigonometric functions, the system substitutes the preset distance and the actual distance into a preset formula for calculation. This preset formula is α=arctan(D1 / D2), where α represents the rotation angle when the subject's eye is focused on the target LED indicator, D1 represents the preset distance from the main camera to the target LED indicator, and D2 represents the actual distance from the subject's eye to the main camera.

[0059] During the calculation process, the system needs to consider the impact of the spatial position differences of different target LED indicators on the rotation angle calculation. For horizontally distributed LED indicators, the system mainly calculates the horizontal rotation angle; for vertically distributed LED indicators, the system calculates the vertical rotation angle. When the nystagmus detection device adopts a multi-dimensional LED indicator layout, the system also needs to perform three-dimensional spatial angle calculations, using vector decomposition to calculate the rotation angles of the horizontal and vertical components separately.

[0060] After calculating the rotation angle, the system performs a validity check and accuracy optimization on the results. Validation includes checking whether the calculated rotation angle is within the normal range of human eye movement and whether the rotation angles of adjacent LED indicators conform to the expected geometric layout. Accuracy optimization reduces calculation errors by averaging multiple calculations or using more precise numerical calculation methods, ensuring the accuracy and stability of the rotation angle values.

[0061] Based on the above embodiments, as an optional implementation, in S105, calculating the rotation angle of the subject's eyeball when looking at the target LED indicator, combining the preset distance and the actual distance, specifically includes:

[0062] Substitute the preset distance and the actual distance into the preset formula to calculate the rotation angle of the subject's eye when looking at the target LED indicator; where the preset formula is: tanα=D1 / D2; where α is the rotation angle, D1 is the preset distance, and D2 is the actual distance.

[0063] In the specific implementation process, the system first calls the preset distance parameter D1 obtained in step S103 and the actual distance parameter D2 generated in step S102. These two parameters represent the fixed geometric features of the nystagmus detection device and the personalized physiological features of the subject, respectively. The preset distance D1 is a fixed value determined through precise measurement during the device manufacturing stage, which has high accuracy and stability, while the actual distance D2 is a personalized parameter obtained in real time through image processing technology, which can accurately reflect the specific facial anatomy of the subject.

[0064] The system substitutes these two distance parameters into a preset formula for calculation, obtaining the numerical result of the rotation angle α through simple division. The advantage of this calculation method lies in its concise and clear mathematical model, and its fast and efficient calculation process, which meets the computational speed requirements of real-time nystagmus detection systems. Furthermore, since the parameters used in the formula are based on accurate values ​​obtained from actual measurements, the calculation results have good accuracy and reliability.

[0065] During the calculation process, the system also needs to differentiate the spatial positions of different target LED indicators. For LED indicators distributed horizontally, the system directly applies a preset formula to calculate the horizontal rotation angle; for LED indicators distributed vertically, the system calculates the vertical rotation angle; for LED indicators located diagonally, the system may need to perform coordinate decomposition to calculate the horizontal and vertical component angles separately.

[0066] S106, combining pixel coordinate position and rotation angle, establish the calibration coefficients of pixel displacement and rotation angle. The calibration coefficients represent the amount of image pixel movement corresponding to a unit angle of eyeball rotation.

[0067] The calibration coefficient is a key transformation parameter that characterizes the amount of pixel movement in the image corresponding to a unit angle of eye movement by the subject, typically expressed in pixels per degree. The physical significance of this coefficient lies in establishing a mathematical bridge between the angular domain of eye movement and the pixel domain of image processing, enabling the system to accurately extract clinically valuable eye movement angle information from purely digital image information. Because each subject exhibits significant individual differences in facial anatomy, eye size, and orbital depth, traditional fixed calibration coefficients cannot accommodate these individual variations. This step, by calculating personalized calibration coefficients in real time, effectively solves this technical challenge.

[0068] In the specific implementation process, the system first needs to determine the reference pixel coordinate position as the benchmark point for pixel displacement calculation. The reference pixel coordinate position is usually selected as the pixel coordinate position when the subject's eye is focused on the central LED indicator, because the central LED indicator is located at the geometric center of the nystagmus detection device, corresponding to the initial gaze direction of the subject's eye, and has good reference benchmark characteristics. The system identifies this reference position from the pixel coordinate position data extracted in step S104 and uses it as the origin coordinate for subsequent pixel displacement calculation.

[0069] Next, the system calculates the pixel displacement for each target LED indicator. Pixel displacement refers to the distance difference between the pixel coordinate position when the subject's eye is focused on a specific target LED indicator and the reference pixel coordinate position, typically calculated using the Euclidean distance formula. For horizontal LED indicator layouts, the system primarily calculates the horizontal pixel displacement, i.e., the difference in the x-coordinate; for vertical LED indicator layouts, the system calculates the vertical pixel displacement, i.e., the difference in the y-coordinate. When performing two-dimensional eye movement analysis, the system calculates the horizontal and vertical pixel displacements separately, establishing independent calibration coefficients.

[0070] After obtaining the pixel displacement and its corresponding rotation angle, the system establishes calibration coefficients using a calibration formula. This formula is K = ΔP / α, where K represents the calibration coefficient, ΔP represents the pixel displacement, and α represents the corresponding rotation angle. Physically, this formula involves dividing the rotation angle by the corresponding pixel displacement to obtain the rotation angle corresponding to a unit pixel movement, and then taking its reciprocal to obtain the pixel movement corresponding to a unit rotation angle. Through this mathematical transformation, the system establishes a direct conversion relationship from the angle domain to the pixel domain.

[0071] To improve the accuracy and stability of calibration coefficients, the system typically uses data from multiple target LED indicators for comprehensive calculations. Since nystagmus detection devices usually have multiple LED indicators at different locations, the system can obtain multiple pairs of pixel displacement and rotation angle data. These data are then fitted and analyzed using the least squares method or weighted average method to calculate the optimal calibration coefficient values. This multi-point calibration method effectively reduces the random errors that may exist in single-point measurements and improves the reliability of the calibration results.

[0072] Based on the above embodiments, as an optional implementation, in S106, establishing the scaling coefficients for pixel displacement and rotation angle by combining pixel coordinate position and rotation angle specifically includes:

[0073] Obtain the pixel displacement between the pixel coordinate position and the reference pixel coordinate position, which is the pixel coordinate position when the subject's eye is focused on the central LED indicator. Substitute the rotation angle and pixel displacement into the calibration formula to establish the calibration coefficients for pixel displacement and rotation angle. The calibration formula is: K=α / ΔP; where K is the calibration coefficient, α is the rotation angle, and ΔP is the pixel displacement.

[0074] The system first needs to determine the reference pixel coordinate position as the benchmark point for calculating the pixel displacement. The reference pixel coordinate position refers to the pixel coordinate position when the subject's eye is focused on the central LED indicator. This position has special reference significance because the central LED indicator is located at the geometric center of the nystagmus detection device, corresponding to the subject's initial gaze direction and zero rotation angle state. The system identifies the pixel coordinate value corresponding to the central LED indicator from the pixel coordinate position data extracted in step S104 and sets it as the origin coordinate for subsequent pixel displacement calculations, ensuring the consistency and accuracy of displacement measurements.

[0075] Next, the system calculates the pixel displacement ΔP corresponding to each target LED indicator. Pixel displacement refers to the distance difference between the pixel coordinate position when the subject's eye is focused on a specific target LED indicator and the reference pixel coordinate position. This parameter reflects the amount of coordinate change in the image when the eye rotates from the initial position to the target position. The system uses a coordinate difference calculation method: for horizontally distributed LED indicators, the difference in the x-coordinate is calculated as the horizontal pixel displacement; for vertically distributed LED indicators, the difference in the y-coordinate is calculated as the vertical pixel displacement; for cases requiring two-dimensional analysis, the system calculates the pixel displacement in both the horizontal and vertical directions separately.

[0076] After obtaining the pixel displacement and the corresponding rotation angle α, the system substitutes these two parameters into the calibration formula K=α / ΔP for calculation. K in the calibration formula represents the calibration coefficient, which physically represents the rotation angle corresponding to a unit pixel displacement, typically expressed in degrees per pixel. This formula establishes a direct conversion relationship from the pixel domain to the angle domain by dividing the rotation angle by the corresponding pixel displacement, enabling the system to accurately convert any pixel change into the corresponding eye rotation angle.

[0077] When applying the calibration formula, the system needs to ensure the accuracy of the data pairing between rotation angle and pixel displacement. Each target LED indicator corresponds to a specific set of rotation angle and pixel displacement data pairs. The system uses data indexing and timestamp matching to ensure that the correct data combination is used during the calculation process. Simultaneously, the system also performs a reasonableness check on the calculation results to ensure that the values ​​of the calibration coefficients are within the expected range, avoiding calculation errors caused by abnormal data.

[0078] To improve the accuracy and stability of calibration coefficients, the system typically uses data from multiple target LED indicators for comprehensive calculations. Since the nystagmus detection device has multiple LED indicators at different locations, the system can obtain multiple sets of data pairs showing rotation angles and pixel displacements. By applying calibration formulas to these data and calculating the average value, more reliable calibration coefficients are obtained. This multi-point calibration method effectively reduces random errors that may exist in single-point measurements, improving the accuracy and reproducibility of the calibration results.

[0079] Figure 2 This is a schematic diagram of the geometric principle of eye rotation angle measurement in an oculomotor detection device provided in this application embodiment. Point O in the figure represents the center of the subject's eyeball, which is the rotation center of the eyeball and a key reference position for angle measurement. C1 (Camera) represents the optical center position of the main camera, used to acquire eyeball images and perform subsequent image processing and feature extraction. L1 (LED1) and L2 (LED2) represent target LED indicators located at different positions. These LED indicators are used to guide the subject to directional fixation and provide known angle reference points for the calibration process.

[0080] Points Z1 and Z2 represent the points where the subject's eye axis intersects the screen when their eyes are focused on LED indicators L1 and L2, respectively. When the subject's gaze shifts from L1 to L2, the eyeball rotates around its center point O, producing a corresponding rotation angle α. The two angles α shown in the figure represent the deflection angles of the eye axis when it rotates from the central position to L1 and L2, respectively. These angles are key parameters that need to be precisely calculated during the calibration process.

[0081] Distance D represents the preset distance from the main camera C1 to the target LED indicator. This is a fixed geometric parameter determined during the design phase of the nystagmus detection device. This preset distance, combined with the actual distance from the subject's eyeball to the main camera, allows for calculation of the accurate rotation angle of the eyeball when focusing on different LED indicators through geometric relationships.

[0082] The entire geometric configuration embodies the core idea of ​​the calibration method: by establishing known spatial geometric relationships, a precise mathematical correspondence is established between the physical rotation angle of the eyeball and the pixel displacement observed in the image. When the subject gazes at LED indicator lights at different positions as instructed, the main camera records the image performance of the eyeball at different rotation angles. The system analyzes the pixel coordinate changes of eyeball feature points in these images, combines them with known geometric parameters to calculate the precise rotation angle, and finally establishes personalized calibration coefficients to achieve high-precision eye movement measurement.

[0083] Figure 3This is a flowchart illustrating another calibration method for measuring the pupil rotation angle and direction provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes S201-S203:

[0084] S201, when there are individual differences in the physiological optical characteristics of the subject's eyeball, a static image of the subject's eyeball under preset lighting conditions is acquired, and the physiological optical parameters of the subject's eyeball are extracted from the static image of the eyeball.

[0085] When there are individual differences in the physiological and optical characteristics of the subject's eyeballs, the system acquires static images of the subject's eyeballs under preset lighting conditions and extracts physiological and optical parameters from them. The purpose of this step is to address the impact of differences in the physiological structure of the eyeballs among different subjects on the accuracy of nystagmus detection, and to establish a more accurate calibration basis by obtaining personalized eyeball optical characteristic parameters.

[0086] Individual physiological optical characteristics refer to the natural differences in the anatomical structure and optical properties of the eyes of different subjects. These differences include variations in parameters such as corneal curvature radius, anterior chamber depth, lens thickness, axial length, pupil size, iris texture, and scleral reflectivity. These differences directly affect the propagation path and reflection characteristics of light within the eye, thereby influencing the imaging position and optical performance of ocular feature points in images. Failure to compensate for these individual differences will lead to decreased calibration accuracy and increased measurement errors, especially in high-precision nystagmus detection applications, where this effect is particularly significant.

[0087] When the system detects significant differences in the individual's physiological and optical characteristics, it initiates a specialized static eye image acquisition process. The preset lighting conditions refer to the standardized infrared illumination environment built into the device, achieved through eight precisely positioned infrared light sources.

[0088] The eyepiece structure of the nystagmus detection device is designed for a fully enclosed darkroom environment. When the subject wears the device, the eyepiece completely blocks external visible light. Before the LED indicator lights up, the subject is in a completely dark visual environment and cannot see any visible light information. However, the device's built-in eight infrared light sources provide stable near-infrared wavelength illumination. These infrared light sources typically have wavelengths around 850 nanometers or 940 nanometers, which are invisible to the human eye and will not cause visual interference or pupillary response in the subject. Simultaneously, they can be effectively captured by the camera's infrared sensor.

[0089] Eight infrared light sources are arranged in a ring or symmetrical pattern, evenly distributed around the main camera to ensure sufficient and uniform infrared illumination of the eye area. The power, emission angle, and illumination range of each infrared light source have been precisely calculated and adjusted to ensure that the entire eye surface receives infrared light of consistent intensity, avoiding the creation of areas that are too bright or too dark. This standardized infrared illumination environment ensures that the camera can obtain clear, high-contrast images of the eye under any external lighting conditions, creating ideal imaging conditions for accurately extracting physiological optical parameters.

[0090] The constancy and controllability of the infrared illumination system eliminate the impact of ambient light variations on image quality, enabling the system to acquire static images of the eye under fully controlled illumination conditions. This ensures the accuracy and reproducibility of physiological optical parameter extraction, providing a reliable data foundation for subsequent individualized calibration.

[0091] During the static image acquisition process, the system guides the subject to keep their head stable and gaze at a fixed target, ensuring that the eyes are in a relatively still state. The advantage of static image acquisition is that it eliminates the interference of eye movement on feature extraction, enabling the system to obtain clear and stable images of the eye structure, which facilitates accurate geometric measurements and optical parameter calculations. The main camera continuously acquires multiple frames of eye images in high-resolution mode under preset lighting conditions, and the system selects the highest quality image frame as the basis for subsequent processing.

[0092] Extraction of physiological optical parameters is the core technical step in this process. The system employs advanced computer vision algorithms to perform deep analysis on static images of the eye. Pupil geometric parameters include the pupil's center coordinates, radius, and ellipticity, reflecting the pupil's shape and spatial position within the image. Corneal reflectance parameters include the location, intensity distribution, and shape of reflected light spots on the corneal surface, revealing the curvature and optical properties of the corneal surface. Iris texture parameters include the iris's color distribution, texture pattern, and boundary sharpness, helping to accurately identify the boundary between the iris and pupil, as well as the boundary between the iris and sclera. Eyeball contour parameters include the geometry, size, and orientation of the visible eye region, reflecting the overall spatial characteristics of the eyeball in the image.

[0093] During the extraction of physiological optical parameters, the system also establishes a personalized eye optical model. This model comprehensively considers various geometric and optical features of the subject's eye, providing a personalized parameter basis for subsequent angle calculations and calibration. By comparing the differences between the standard eye model and the subject's actual parameters, the system can identify optical features requiring special processing and adjust subsequent image processing algorithms and calibration strategies accordingly.

[0094] S202, based on physiological optical parameters, corrects the calibration coefficients to generate target calibration coefficients.

[0095] The necessity of calibration coefficient correction stems from the significant differences in the physiological and optical characteristics of different subjects' eyes, which can lead to varying pixel changes in images from the same eye rotation angle. Using uniform calibration coefficients for measurement would inevitably introduce systematic errors. For example, subjects with larger pupils will experience greater pixel displacement at the same rotation angle than those with smaller pupils. Differences in corneal curvature radius also affect the movement characteristics of corneal reflected light spots. If these physiological differences are not corrected, they will directly impact the accuracy of angle measurements. Therefore, the system needs to establish a correction mechanism based on individual physiological and optical parameters to personalize the initial calibration coefficients.

[0096] In its implementation, the system first establishes a mathematical model relating physiological optical parameters to calibration coefficients and correction factors. This model, based on extensive experimental data and theoretical analysis, quantifies the impact of different physiological optical parameters on the representation of eye movement images. The pupil size correction factor primarily compensates for the effect of pupil diameter changes on pixel displacement; larger pupils produce more pronounced edge movement effects. The system achieves precise correction by establishing a relationship function between pupil diameter and pixel displacement magnification coefficient. The corneal curvature correction factor adjusts for the impact of corneal surface curvature changes on the movement characteristics of reflected light spots. Different corneal curvatures alter the imaging position and trajectory of reflected light spots. The system establishes the correspondence between curvature parameters and correction coefficients through geometric optics calculations.

[0097] The system employs a multi-parameter fusion correction strategy, weighting and combining the correction factors of various physiological and optical parameters to generate a comprehensive correction coefficient. The weighting coefficients are determined based on the influence of each parameter on the overall measurement accuracy. Optimal parameter weight allocation is determined through machine learning algorithm analysis and training on historical data. The general form of the correction formula is K_target = K_initial × (1 + Σ(wi × Ci)), where K_target represents the target calibration coefficient, K_initial represents the initial calibration coefficient, wi represents the weight coefficient of the i-th parameter, and Ci represents the correction factor corresponding to the i-th parameter.

[0098] During the calibration process, the system also considers the interaction effects between different physiological optical parameters. For example, the combined effect of pupil size and corneal curvature may produce nonlinear effects, and the system handles these complex parameter interactions by establishing a multidimensional calibration model. For specific combinations of physiological optical features, the system employs specialized calibration algorithms to ensure the accuracy and stability of the calibration results.

[0099] The target calibration coefficients are the final calibration parameters after individualized correction. They comprehensively consider all relevant physiological and optical characteristics of the subject and accurately reflect the true relationship between the subject's eye movements and image pixel changes. Compared with the initial calibration coefficients, the target calibration coefficients have higher individual adaptability and measurement accuracy. In particular, for subjects with significant differences in physiological and optical characteristics, the corrected calibration coefficients can significantly improve measurement accuracy.

[0100] After generating the target calibration coefficients, the system conducts confirmatory tests to verify the correction effect. By having subjects perform standardized eye movement tests, the differences in measurement results using the initial calibration coefficients and the target calibration coefficients are compared to verify the effectiveness of the correction algorithm. Simultaneously, the system establishes quality evaluation indicators, including the degree of improvement in measurement accuracy, the improvement in repeatability, and the enhancement in stability, providing data support for the continuous optimization of the correction algorithm.

[0101] Based on the above embodiments, as an optional implementation, in S202, the physiological optical parameters include: pupil diameter, radius of curvature of the corneal reflective spot, and depth from the surface of the eyeball to the corneal apex. The calibration coefficients are corrected according to the physiological optical parameters to generate the target calibration coefficients, specifically including:

[0102] The distance correction coefficient is generated by calculating the ratio of the depth from the surface of the eyeball to the corneal apex to a preset standard depth; the optical magnification correction coefficient is generated by calculating the ratio of the radius of curvature of the corneal reflected light spot to a preset standard radius of curvature; the imaging contrast correction coefficient is generated by calculating the ratio of the pupil diameter to a preset standard pupil diameter; the distance correction coefficient, optical magnification correction coefficient, and imaging contrast correction coefficient are substituted into the individualized calibration formula to generate the target calibration coefficient; wherein, the individualized calibration formula is: K'=K×η1×η2×η3; where K' is the target calibration coefficient, K is the calibration coefficient, η1 is the distance correction coefficient, η2 is the optical magnification correction coefficient, and η3 is the imaging contrast correction coefficient.

[0103] The system first calculates the ratio of the depth from the surface of the eyeball to the corneal apex to a preset standard depth, generating a distance correction coefficient η1. The depth from the surface of the eyeball to the corneal apex reflects the anteroposterior diameter of the eyeball. Differences in eyeball depth among different subjects affect the amount of change in the projection of feature points in the image during eyeball rotation. Eyeballs with greater depth produce relatively smaller pixel displacements at the same rotation angle, while eyeballs with less depth produce larger pixel displacements. The distance correction coefficient accurately compensates for this geometric difference by establishing a ratio between individual depth parameters and standard depth parameters.

[0104] Next, the system calculates the ratio of the radius of curvature of the corneal reflected spot to a preset standard radius of curvature, generating an optical magnification correction coefficient η2. The radius of curvature of the corneal reflected spot is a crucial indicator of corneal surface geometry, directly affecting the focusing characteristics of reflected light and the size of the reflected spot in the image. Corneal surfaces with a larger radius of curvature produce relatively smaller reflected spots with sharper edges, while corneal surfaces with a smaller radius of curvature produce larger reflected spots. This difference affects the accuracy of feature point localization and the accuracy of pixel displacement calculation. The optical magnification correction coefficient quantifies the impact of curvature differences on imaging features, enabling personalized correction of optical characteristics.

[0105] The system also calculates the ratio of the pupil diameter to a preset standard pupil diameter, generating an imaging contrast correction coefficient η3. The size of the pupil diameter directly affects the sharpness and contrast characteristics of the pupil edges in the image. Larger pupils provide more distinct edge features and higher positioning accuracy, while smaller pupils may lead to blurred edges and increased positioning errors. The imaging contrast correction coefficient effectively compensates for measurement errors caused by differences in pupil size by establishing a model relating pupil size to image quality.

[0106] After obtaining the three correction coefficients, the system substitutes them into the individualized calibration formula K'=K×η1×η2×η3 for calculation. This formula uses a product form to integrate the effects of each correction coefficient, where K represents the base calibration coefficient, and η1, η2, and η3 represent the distance correction coefficient, optical magnification correction coefficient, and imaging contrast correction coefficient, respectively. Through this multi-parameter joint correction method, the system can simultaneously consider individual differences in multiple aspects such as eye geometry, optical characteristics, and image quality, generating a highly personalized target calibration coefficient K'.

[0107] S203, calculate the target rotation angle of the subject's eyeball based on the target calibration coefficient.

[0108] The target rotation angle refers to the angle by which the subject's eyeball deflects relative to its initial position during actual movement. This angle value has been corrected for individualized physiological and optical parameters, accurately reflecting the true amplitude and directional characteristics of eyeball movement. Compared to traditional rotation angles calculated based on standardized parameters, the target rotation angle offers higher individual adaptability and measurement accuracy. Especially for subjects with significant differences in physiological and optical characteristics, the target rotation angle can effectively eliminate measurement biases caused by individual differences.

[0109] In practice, the system first needs to acquire real-time image data of the subject's eye movements and corresponding pixel coordinate changes. When the subject undergoes nystagmus detection or eye movement testing, the main camera continuously captures a sequence of eye images. The system uses image processing algorithms to extract the pixel coordinates of eye feature points in real time and calculates the pixel displacement relative to a reference position. This pixel displacement reflects the trajectory and magnitude of the eye's movement on the image plane and is the fundamental data for angle calculation.

[0110] The system combines real-time measured pixel displacement with target calibration coefficients to calculate the angle. The formula is θ_target = ΔP × K_target, where θ_target represents the target rotation angle, ΔP represents the pixel displacement, and K_target represents the target calibration coefficients. The core of this calculation process lies in the application of personalized calibration parameters, ensuring that the angle calculation results accurately reflect the true movement characteristics of the subject's eyeball. Compared to calculation methods using standard calibration coefficients, this personalized calculation method significantly improves the accuracy and reliability of angle measurements.

[0111] During angle calculation, the system also needs to consider the multidimensional characteristics and complexity of eye movements. For horizontal eye movements, the system calculates the horizontal rotation angle; for vertical eye movements, the system calculates the vertical rotation angle; for oblique movements, the system calculates the rotation angles of the horizontal and vertical components separately, and obtains the total rotation angle and direction information through vector synthesis. This multidimensional angle calculation can comprehensively describe the spatial characteristics of eye movements, providing a complete data foundation for the analysis of complex nystagmus patterns.

[0112] The system also performs real-time quality control and data verification when calculating the target rotation angle. By comparing the angle change trends between consecutive frames, it detects abnormal angle jumps or unreasonable motion patterns, and promptly identifies and handles potential measurement errors or image interference. Simultaneously, the system establishes a confidence assessment mechanism for angle measurements, evaluating the reliability of each angle measurement value based on image quality, feature point extraction accuracy, and the stability of the calculation process, providing a quality reference for subsequent data analysis and diagnostic judgment.

[0113] Based on the above embodiments, as an optional implementation, in S203, calculating the target rotation angle of the subject's eyeball according to the target calibration coefficient specifically includes:

[0114] The real-time pixel coordinates of the subject's eyeball during the measurement process are obtained; the target pixel displacement between the real-time pixel coordinates and the reference pixel coordinates is calculated; the target pixel displacement is multiplied by the target calibration coefficient to obtain the target rotation angle of the subject's eyeball; the formula for calculating the target rotation angle is: α'=K'×ΔP'; where α' is the target rotation angle, K' is the target calibration coefficient, and ΔP' is the target pixel displacement.

[0115] The system first acquires the real-time pixel coordinates of the subject's eyeballs during the measurement process, which is the data source for the entire angle calculation process. Real-time pixel coordinates refer to the specific coordinate values ​​of eyeball feature points within the current image frame; typically, the center of the pupil or the center of the corneal reflective spot is chosen as the tracking target. The main camera continuously acquires eyeball image sequences at a high frame rate. The system uses real-time image processing algorithms to precisely locate the pixel coordinates of eyeball feature points in each frame. This coordinate data reflects the instantaneous position information of the eyeball on the image plane, providing an accurate positioning basis for subsequent displacement calculations.

[0116] Next, the system calculates the target pixel displacement ΔP' between the real-time pixel coordinate position and the reference pixel coordinate position. The target pixel displacement refers to the change in coordinates in the image as the eye moves from the initial reference position to the current position. The reference pixel coordinate position is typically the eye position of the subject when focusing on the central LED indicator. Unlike traditional pixel displacement calculations, the calculation of the target pixel displacement takes into account the individual physiological and optical characteristics of the subject. The displacement measurement is optimized using previously extracted physiological and optical parameters to ensure the accuracy and reliability of the displacement data.

[0117] The system multiplies the calculated target pixel displacement by the target calibration coefficient and applies the formula α'=K'×ΔP' to obtain the target rotation angle α'. This formula embodies the core advantage of the personalized calibration method, where K' is the target calibration coefficient after individualized correction, and ΔP' is the target pixel displacement considering the influence of physiological characteristics. Through this combination of personalized parameters, the system can accurately convert pixel changes in the image into corresponding eye rotation angles, effectively eliminating the influence of individual differences on the measurement results.

[0118] During angle calculation, the system also performs real-time quality assessment and data verification of the calculation results. By analyzing the angle change trend and motion trajectory continuity between consecutive frames, the system can identify and filter abnormal measurement data, ensuring the accuracy and stability of the target rotation angle. Simultaneously, the system establishes a dynamic evaluation mechanism for measurement accuracy, assessing the confidence level of each angle measurement value based on image quality, feature point localization accuracy, and the stability of the calculation process.

[0119] Figure 4 This is a physical image provided in an embodiment of this application, such as... Figure 4 The diagram shows the internal structure of an nystagmus detection device, viewed from the perspective of the user wearing it. The device employs a binocular separation design, with a complete detection system on each side. At the heart of each side is a black circular main camera used to capture real-time eye movements. Surrounding each camera are multiple green LED indicators that illuminate sequentially according to a preset program, guiding the user's eyes to look in different directions, much like eye movement training. Between the cameras and LEDs are eight small white dots, which are infrared light sources. These emit invisible infrared light to illuminate the eyes, ensuring the cameras can clearly capture images of the eyes in complete darkness. When the user wears the device, their eyes are in a completely sealed, dark environment; the light points are only visible when the green LEDs are lit, while the cameras continuously monitor the position and movement of the eyes through infrared illumination. The system calculates the change in the position of the pupil center in the image when the eye looks at different LED lights. Combined with the known distance between the LED light and the camera, it can accurately measure the angle and direction of eye rotation, thereby achieving accurate detection and quantitative analysis of eye diseases such as nystagmus.

[0120] Figure 5 This is another physical image provided in the embodiments of this application, such as... Figure 5 As shown, this is the real-time monitoring interface of the nystagmus detection device, displaying the system's status when it is working. The right side of the screen displays real-time images of the eye taken by an infrared camera. The pupil (black circular area) and surrounding iris structures are clearly visible. Some white light spots can also be seen in the image; these are reflections formed by the infrared light source on the surface of the eyeball, used to help the system accurately locate and track the eye's position. The left side of the screen displays a real-time waveform of eye movement. The green curve records the changes in the eyeball's position in the horizontal and vertical directions. Each horizontal line represents the angle of the x-axis, convenient for doctors to observe: 0°, ±20°, ±40°. The time increments continuously: 10s, 20s, 30s... allowing doctors to visually observe whether there are any abnormal nystagmus or movement patterns in the eyeball. The blue status bar at the top displays the current test information, including the subject's information and the position of the LED indicator currently being tested (LED on the left). The entire interface design allows doctors to simultaneously see the actual image of the eyeball and the quantitative analysis results of the motion data, facilitating real-time judgment of the severity and characteristics of nystagmus. This is precisely the embodiment of the calibration technology mentioned earlier in actual clinical applications. The system converts the tiny movements of the eyeball into quantifiable medical data by converting precise pixel coordinates into angle measurements.

[0121] Based on the above method, this application also discloses a calibration system for measuring the pupil rotation angle and direction, such as... Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of a calibration system for measuring pupil rotation angle and direction provided in an embodiment of this application. The system includes: an imaging module, a superposition module, an acquisition module, an extraction module, a first combining module, and a second combining module; wherein,

[0122] The device comprises the following modules: a shooting module for capturing a reference image including a scale and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device, using a side-facing camera located on the side of the nystagmus detection device; an overlay module for overlaying the reference image and the real-time image to generate the actual distance from the subject's eyeball to the main camera; an acquisition module for acquiring a preset distance between the main camera and multiple LED indicators in the nystagmus detection device, and acquiring a sequence of eye images of the subject's eyeballs when they are focused on each LED indicator as they are sequentially illuminated; an extraction module for extracting the pixel coordinates of the subject's eyeballs when they are focused on a target LED indicator, which is one of multiple LED indicators; a first combining module for calculating the rotation angle of the subject's eyeballs when they are focused on the target LED indicator by combining the preset distance and the actual distance; and a second combining module for establishing a calibration coefficient between the pixel displacement and the rotation angle by combining the pixel coordinates and the rotation angle, where the calibration coefficient represents the amount of image pixel movement corresponding to a unit angle of eyeball rotation.

[0123] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0124] Please see Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.

[0125] The communication bus 1002 is used to realize the connection and communication between these components.

[0126] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.

[0127] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0128] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 1001 and may be implemented as a separate chip.

[0129] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 7 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a calibration method for measuring the pupil rotation angle and direction.

[0130] exist Figure 7 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 1001 can be used to call an application program stored in the memory 1005 that is a calibration method for measuring the pupil rotation angle and direction. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.

[0131] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more of the methods described in the above embodiments.

[0132] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0133] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.

[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0136] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0138] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A calibration method for measuring the angle and direction of pupil rotation, characterized in that, The method includes: when the subject wears the nystagmus detection device, capturing a reference image including a scale and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device using a side-facing camera located on the side of the nystagmus detection device; superimposing the reference image and the real-time image to generate the actual distance from the subject's eyeball to the main camera; obtaining a preset distance between the main camera and multiple LED indicators in the nystagmus detection device; when each of the LED indicators lights up sequentially, acquiring a sequence of eye images of the subject's eyeball looking at each of the LED indicators; extracting the pixel coordinate position of the subject's eyeball looking at a target LED indicator in the eye image sequence, where the target LED indicator is one of the multiple LED indicators; calculating the rotation angle of the subject's eyeball looking at the target LED indicator by combining the preset distance and the actual distance; and establishing a calibration coefficient for pixel displacement and rotation angle by combining the pixel coordinate position and the rotation angle, where the calibration coefficient represents the amount of image pixel movement corresponding to a unit angle of eyeball rotation.

2. The calibration method for measuring the pupil rotation angle and direction according to claim 1, characterized in that, The step of overlaying the reference image with the real-time image to generate the actual distance from the subject's eyeball to the main camera includes: identifying and extracting scale information from the reference image to obtain the pixel scale of the scale; identifying the eyeball feature points of the subject and the position information of the main camera from the real-time image; performing image registration and overlay processing on the reference image and the real-time image to determine the relative position of the eyeball feature points and the main camera in the same coordinate system; and converting the pixel distance between the eyeball feature points and the main camera into the actual physical distance based on the pixel scale to obtain the actual distance from the subject's eyeball to the main camera.

3. The calibration method for measuring the pupil rotation angle and direction according to claim 1, characterized in that, The step of calculating the rotation angle of the subject's eyeball when it is focused on the target LED indicator by combining the preset distance and the actual distance includes: substituting the preset distance and the actual distance into a preset formula to calculate the rotation angle of the subject's eyeball when it is focused on the target LED indicator; wherein, the preset formula is: tanα=D1 / D2; where α is the rotation angle, D1 is the preset distance, and D2 is the actual distance.

4. The calibration method for measuring the pupil rotation angle and direction according to claim 1, characterized in that, The step of establishing calibration coefficients for pixel displacement and rotation angle by combining the pixel coordinate position and the rotation angle includes: obtaining the pixel displacement amount between the pixel coordinate position and the reference pixel coordinate position, wherein the reference pixel coordinate position is the pixel coordinate position when the subject's eye is focused on the central LED indicator; substituting the rotation angle and the pixel displacement amount into the calibration formula to establish calibration coefficients for pixel displacement and rotation angle; wherein the calibration formula is: K=α / ΔP; where K is the calibration coefficient, α is the rotation angle, and ΔP is the pixel displacement amount.

5. The calibration method for measuring the pupil rotation angle and direction according to claim 1, characterized in that, The method further includes: when there are individual physiological optical characteristics differences in the eyeballs of the test subject, acquiring static images of the eyeballs of the test subject under preset lighting conditions, extracting physiological optical parameters of the eyeballs of the test subject from the static images of the eyeballs; correcting the calibration coefficients according to the physiological optical parameters to generate target calibration coefficients; and calculating the target rotation angle of the eyeballs of the test subject according to the target calibration coefficients.

6. The calibration method for measuring the pupil rotation angle and direction according to claim 5, characterized in that, The physiological optical parameters include: pupil diameter, radius of curvature of corneal reflective spot, and depth from the surface of the eyeball to the corneal apex. Based on these physiological optical parameters, the calibration coefficients are corrected to generate target calibration coefficients. This includes: calculating the ratio of the depth from the surface of the eyeball to the corneal apex to a preset standard depth to generate a distance correction coefficient; calculating the ratio of the radius of curvature of the corneal reflective spot to a preset standard radius of curvature to generate an optical magnification correction coefficient; calculating the ratio of the pupil diameter to a preset standard pupil diameter to generate an imaging contrast correction coefficient; and substituting the distance correction coefficient, the optical magnification correction coefficient, and the imaging contrast correction coefficient into an individualized calibration formula to generate the target calibration coefficients. The individualized calibration formula is: K' = K × η1 × η2 × η3; where K' is the target calibration coefficient, K is the calibration coefficient, η1 is the distance correction coefficient, η2 is the optical magnification correction coefficient, and η3 is the imaging contrast correction coefficient.

7. The calibration method for measuring the pupil rotation angle and direction according to claim 5, characterized in that, The step of calculating the target rotation angle of the subject's eyeball based on the target calibration coefficient includes: obtaining the real-time pixel coordinate position of the subject's eyeball during the measurement process; calculating the target pixel displacement between the real-time pixel coordinate position and the reference pixel coordinate position; multiplying the target pixel displacement by the target calibration coefficient to obtain the target rotation angle of the subject's eyeball; wherein, the formula for calculating the target rotation angle is: α'=K'×ΔP'; where α' is the target rotation angle, K' is the target calibration coefficient, and ΔP' is the target pixel displacement.

8. A calibration system for measuring the angle and direction of pupil rotation, characterized in that, The system includes: a shooting module, a superposition module, a data acquisition module, an extraction module, a first combination module, and a second combination module; wherein, the shooting module is used to capture a reference image including a scale and a real-time image including the subject's eyeball and the main camera of the nystagmus detection device through a side-facing camera set on the side of the nystagmus detection device when the subject wears the nystagmus detection device; the superposition module is used to superimpose the reference image and the real-time image to generate the actual distance from the subject's eyeball to the main camera; the data acquisition module is used to acquire a preset distance between the main camera and multiple LED indicator lights in the nystagmus detection device, and when each of the LED indicator lights... When the LEDs are lit sequentially, an eye image sequence is acquired when the subject's eyes are focused on each LED indicator. The extraction module is used to extract the pixel coordinate position of the subject's eyes when focused on the target LED indicator in the eye image sequence, where the target LED indicator is one of the multiple LED indicators. The first combining module is used to calculate the rotation angle of the subject's eyes when focused on the target LED indicator by combining the preset distance and the actual distance. The second combining module is used to establish a calibration coefficient between the pixel displacement and the rotation angle by combining the pixel coordinate position and the rotation angle, where the calibration coefficient represents the amount of image pixel movement corresponding to a unit angle of eye rotation.

9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Image correction method based on eyeball tracking technology and related device

    CN113395438A

  • Model parameter calibration method and device, sight tracking method and device, medium and equipment

    CN114360043A