Pupil monitoring analysis method, system and device
Through the elastic frame and standard ring design pupil monitoring device, combined with the dynamic threshold algorithm, the problems of portability and high-precision imaging are solved, and accurate pupil monitoring and dynamic analysis in non-fixed scenarios are realized, which reduces the risk of misdiagnosis and is suitable for scenarios such as first aid and bedside monitoring.
Patent Information
- Application Number
- CN202510488709.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-25
AI Technical Summary
The existing pupil monitoring technology is difficult to combine high-precision imaging with portable design, and insufficient dynamic analysis function, resulting in low monitoring accuracy and complex operation in non-fixed scenarios, which cannot meet the real-time needs of first aid, bedside monitoring and other scenarios.
The eyelids are opened with an elastic frame, combined with a standard ring and camera design, and the geometric model of the largest incision circle and the smallest circumferential circle and a dynamic threshold algorithm are used to realize high-precision measurement and dynamic analysis of pupil shape and size, and data display and abnormal parts are displayed in combination with a hand-held analyzer.
It realizes high-precision pupil monitoring in non-fixed scenarios, reduces distortion and shooting distance errors, supports millimeter-level accuracy measurement, provides portability and dynamic response capabilities, assists doctors in quickly positioning the lesion area and reducing the risk of missed diagnosis.
Smart Images

Figure CN120360487A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pupil monitoring and analysis, and in particular to a pupil monitoring and analysis method, system and device. Background Art
[0002] Pupils are key indicators for assessing central nervous system function and critical illnesses. Abnormal changes in their morphology, size, and light reflex are highly correlated with diseases such as glaucoma, brain trauma, increased intracranial pressure, and drug poisoning. Traditional pupil monitoring methods mainly rely on manual observation or special fixed instruments, which have significant limitations: 1. Strong dependence on manual observation: In clinical practice, pupil size, symmetry, and light reflex need to be judged by naked eyes or handheld light sources, which is highly subjective and easily affected by operator experience, ambient lighting, and patient cooperation. Especially when dynamically monitoring subtle changes in pupils (such as irregular morphology, slow contraction / expansion), it is difficult to achieve accurate quantification, resulting in the risk of missed diagnosis or misdiagnosis; 2. Insufficient portability of equipment: Although existing electronic monitoring instruments (such as infrared pupil meters and high-resolution imaging systems) can provide objective data, most of them are large, high-power fixed devices that need to be used in specific clinics or operating rooms, and cannot meet the real-time monitoring needs of emergency transport, bedside monitoring, community medical care, or remote areas. In addition, such equipment is complex to operate and requires professional training, which limits its popularization and application.
[0003] In recent years, despite the rapid development of computer vision and micro-sensing technology, in the field of pupil monitoring, how to effectively integrate high-precision imaging, portable design, eyelid stabilization and dynamic analysis functions remains an unresolved technical difficulty. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a pupil monitoring and analysis method, system and device, which solves the problem that high-precision imaging, portable design and dynamic analysis functions are difficult to effectively integrate in the current pupil monitoring field.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A pupil monitoring and analysis device comprises an elastic frame whose upper and lower sides can be compressed toward the middle, the elastic frame is provided with two pairs of upper support bodies with adjustable positions for holding open the upper eyelids, the elastic frame is also provided with two pairs of lower support bodies with adjustable positions for cooperating with the upper eyelids to hold open the lower eyelids, a camera for photographing the user's pupils is arranged between the upper support bodies and the lower support bodies, a standard circular ring with a diameter larger than the pupil is arranged on the line connecting the lens of the camera and the center of the user's pupil, and the standard circular ring is fixed relative to the camera, and the analysis device also comprises a handheld analyzer for receiving images collected by the camera and displaying pupil analysis data.
[0007] Preferably, mounting blocks are fixed on both the upper support and the lower support. A sliding rod is slidably arranged between two mounting blocks corresponding to the same pupil. The camera is installed at the middle of the sliding rod. Limit pieces are fixed at both ends of the sliding rod. A spring is arranged between the limit piece and the mounting block for elastically limiting the camera at the middle of the upper support and the lower support.
[0008] Preferably, a circular cutting edge is arranged inside the standard ring.
[0009] A pupil monitoring and analysis method specifically includes the following steps:
[0010] S1. Obtain an initial image including the patient's eye and the standard ring, and extract the pupil feature of the patient and the standard circle feature inside the standard ring;
[0011] S2. Obtain the boundary line of the pupil feature according to the initial image, and obtain the largest inscribed circle, the smallest circumscribed circle and the pupil center of the boundary line;
[0012] S3. Set a largest pupil circle and a smallest pupil circle centered on the pupil center on the initial image, and corresponding to the maximum and minimum values of a normal pupil;
[0013] S4. Identify and output for display the abnormal parts of the pupil feature according to the pupil boundary line and the pupil center.
[0014] Preferably, in step S2, it specifically includes the following steps:
[0015] S21. Extract the initial boundary line of the pupil feature;
[0016] S22. Construct the largest inscribed circle with the largest diameter and the smallest circumscribed circle with the smallest diameter of the initial boundary line;
[0017] S23. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the largest inscribed circle, that is, the first average distance;
[0018] S24. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the smallest inscribed circle, that is, the second average distance;
[0019] S25. Calculate the ratio of the first average distance to the second average distance to obtain a scale factor;
[0020] S26. Respectively obtain the center coordinates of the largest inscribed circle and the smallest circumscribed circle, and calculate the coordinate of the pupil center according to the scale factor.
[0021] Preferably, in step S3, it specifically includes the following steps:
[0022] S31. Obtain the diameter of the standard circle feature in the initial image and the actual diameter of the standard ring.
[0023] S32. Calculate the ratio of the actual diameter of the standard ring to the diameter of the standard circle feature in the initial image to obtain a scale factor.
[0024] S33. Establish a maximum pupil circle and a minimum pupil circle centered at the pupil center according to the scale factor, the maximum value of the normal pupil, and the minimum value of the normal pupil respectively.
[0025] Preferably, in step S4, it specifically includes the following steps:
[0026] S41. Subtract the set of pixel points included in the pupil feature from the set of pixel points included in the minimum pupil circle to obtain the set of pixel points of the first abnormal part.
[0027] S42. Subtract the set of pixel points included in the maximum pupil circle from the set of pixel points included in the pupil feature to obtain the set of pixel points of the second abnormal part.
[0028] S43. Successively establish a first connection line between the pupil center and any pixel point on the pupil boundary line, and a second connection line between the center of the standard circle feature and any pixel point and any one of its adjacent pixel points respectively.
[0029] S44. Obtain the first included angle between any two adjacent first connection lines and the second included angle between any two adjacent second connection lines.
[0030] S45. Calculate the ratio of the number of all pixel points on the pupil boundary line to the number of all pixel points on the boundary of the standard circle feature to obtain an angle scale factor.
[0031] S46. Divide the second included angle by the angle scale factor to obtain a standard first included angle.
[0032] S47. Set a change rate threshold, and calculate a first included angle standard range according to the change rate threshold. The expression of the first included angle standard range is: [θ1(1 - ε), θ1(1 + ε)], where θ1 represents the standard first included angle and ε represents the change rate threshold.
[0033] S48. Mark the pixel points on the pupil boundary line whose first included angle is outside the first included angle standard range as the pixel points of the third abnormal part.
[0034] S49. Output all the pixel points of the first abnormal part, the second abnormal part, and the third abnormal part, and display them.
[0035] Preferably, in step S26, the calculation formula for the coordinates of the pupil center is:
[0036]
[0037] In the above formula, x t and y t respectively represent the x - coordinate and y - coordinate of the pupil center, τ1 represents the abscissa coefficient, τ2 represents the ordinate coefficient, x1 and x2 respectively represent the abscissa values of the first average distance and the second average distance, and y1 and y2 respectively represent the ordinate values of the first average distance and the second average distance. is the reciprocal of the scale factor, that is, the ratio of the second average distance and the first average distance of the ratio.
[0038] The present invention also provides a pupil monitoring and analysis system, including a processor and a memory. The memory is used to store a computer program, and when the computer program is executed by the processor, the described pupil monitoring and analysis method is realized.
[0039] Compared with the prior art, the present invention provides a pupil monitoring and analysis method, system and device, having the following beneficial effects:
[0040] 1. The elastic mirror frame of the present invention effectively spreads the eyelids through the cooperation of the upper support body and the lower support body, avoiding interference caused by blinking or eyelid occlusion, ensuring that the camera is always aligned with the pupil center. The edge - cutting design inside the standard ring provides a circular contour with high contrast. Combined with the calculation of the proportional coefficient, it greatly reduces the camera distortion and the shooting distance error, and realizes millimeter - level precision measurement of the actual size of the pupil.
[0041] 2. The elastic limit structure of the spring and the sliding rod in the present invention buffers the slight movement of the patient's head, ensures the stability of image acquisition, reduces the data jitter in the dynamic scene, and ensures the stability of the data.
[0042] 3. The total weight of the foldable elastic mirror frame and the handheld analyzer is light and the volume is small, which is convenient to carry around, and is suitable for non - fixed scenarios such as ambulances, field rescues or home medical treatments.
[0043] 4. The present invention is based on a dual geometric model of the largest inscribed circle and the smallest circumscribed circle, combined with a dynamic threshold algorithm, quantifies the irregular degree of the pupil shape (such as ellipse, serrated edge), supports multi - frame image acquisition per second, and real - time tracks the dynamic response of the pupil to light reflection (such as the process of pupil dilation in patients with brain hernia), providing an early warning for the deterioration of the condition.
[0044] 5. The present invention automatically outputs the pixel points of all the first abnormal parts, the second abnormal parts and the third abnormal parts through the abnormal pixel set and the angle marking, and highlights them through the visualization interface, assisting the doctor to quickly locate the lesion area and providing accurate reference data for diagnosis. Brief Description of the Drawings
[0045] The accompanying drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0046] Figure 1 is a first three-dimensional structural schematic diagram of the pupil monitoring and analyzing device of the present invention;
[0047] Figure 2 is a second three-dimensional structural schematic diagram of the pupil monitoring and analyzing device of the present invention;
[0048] Figure 3 is a schematic diagram of the handheld analyzer of the present invention;
[0049] Figure 4 is a cross-sectional view of the standard ring of the present invention;
[0050] Figure 5 is a flowchart of the pupil monitoring and analyzing method of the present invention.
[0051] In the figure: 1. Elastic mirror frame; 2. Upper support body; 3. Lower support body; 31. Mounting block; 32. Slide bar; 33. Limiting piece; 34. Spring; 4. Camera; 5. Standard ring; 51. Edge; 6. Handheld analyzer. Detailed embodiments
[0052] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Thereby, a full understanding of the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be obtained and implemented accordingly.
[0053] Those of ordinary skill in the art can understand that all or part of the steps in the following embodiments can be completed by instructing relevant hardware through a program. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] The pupil is a hole in the center of the iris, which can provide the general functional status of the central nervous system and is a major monitoring item for critically ill patients. When examining, pay attention to the shape and size of the pupil, whether the bilateral sides are equal in size and roundness, and whether the light reflex is normal, etc.
[0055] (1) Pupil shape and size: Normal pupils are round and equal in size on both sides, with a diameter of 2 to 5 mm. They are slightly smaller in infants and the elderly and larger in adolescents. They are larger in bright places and smaller in dim places. When the sympathetic nerves are excited, such as in pain or fear, the pupils are larger. When the parasympathetic nerves are excited, such as in deep breathing or mental work, the pupils are smaller.
[0056] Common abnormalities in pupil shape and size include:
[0057] ① Changes in pupil shape: The pupil becomes oval in glaucoma or intraocular tumors; the shape may be irregular in iris adhesion.
[0058] ② Pupil constriction: seen in iris inflammation, organophosphorus pesticide poisoning, and drug reactions such as pilocarpine, morphine, and chlorpromazine.
[0059] ③Pupillary dilation: seen in trauma, stimulation of the cervical sympathetic nerves, absolute stage glaucoma, optic nerve atrophy, and reactions to drugs such as atropine, belladonna, and cocaine.
[0060] ④ Bilateral pupils are of different sizes: seen in intracranial diseases such as brain trauma, brain tumors, and brain hernia; bilateral pupils are of different sizes and change unpredictably, which is mostly a manifestation of midbrain function damage.
[0061] (2) Pupillary light reflex: includes direct light reflex and indirect light reflex. In normal people, when the eye is stimulated by light, the pupil shrinks immediately, and the pupil recovers quickly after the light source is removed. The reaction of one pupil to direct light stimulation is called direct light reflex, and the pupil of the other eye will also have the same reaction, which is called indirect light reflex. When checking, a flashlight is usually used to illuminate the pupils on both sides and observe their reactions. The pupil light reflex is described as agile, slow, or absent. In normal people, the pupil light reflex is agile. The pupil light reflex is slow or absent, which is seen in comatose patients. Dilated pupils on both sides accompanied by absent light reflex are manifestations of dying.
[0062] For example, the pupil changes of patients with transtentorial herniation are shown in Table 1:
[0063]
[0064] For another example, pupil changes in patients with increased intracranial pressure are shown in Table 2:
[0065]
[0066]
[0067] In the existing technology, when detecting a patient's pupil in a temporary place such as a hospital bed, it is necessary to judge the pupil size, symmetry and light reflex by the naked eye or a handheld light source. This is highly subjective and easily affected by the operator's experience, ambient lighting and patient cooperation. It is difficult to dynamically monitor subtle changes in the pupil, leading to the risk of missed diagnosis or misdiagnosis. Moreover, most existing electronic monitoring instruments are bulky and need to be used in specific consulting rooms or operating rooms. They cannot meet the real-time monitoring needs of scenarios such as emergency transfer, bedside monitoring, community medical care or remote areas.
[0068] Therefore, the present invention provides a pupil monitoring and analysis device suitable for accurately and efficiently detecting changes in the pupil state of a patient in a temporary place, such as Figures 1-4 As shown, the elastic frame 1 includes upper and lower sides that can be compressed toward the middle, that is, the upper and lower sides of the elastic frame 1 will deform inward when pressed by hands, and will automatically open to both sides after the external force is removed. Figure 1 The nose pads and temples shown in the figure do not need to be held by the patient all the time when the glasses are temporarily used outside, and can be dropped through the nose pads and temples placement device. The elastic frame 1 is provided with two pairs of upper support bodies 2 with adjustable positions for opening the upper eyelids. The elastic frame 1 is also provided with two pairs of lower support bodies 3 with adjustable positions for cooperating with the upper eyelids to open the lower eyelids. The positions of the upper support bodies 2 and the lower support bodies 3 are adjustable to accommodate patients with different eye distances. A camera 4 for photographing the user's pupil is arranged between the upper support bodies 2 and the lower support bodies 3, so that the lens of the camera 4 is directly facing the pupil of the user, i.e., the patient, to reduce the degree of distortion of the acquired image. A standard circular ring 5 with a diameter larger than the pupil is arranged on the line connecting the lens of the camera 4 and the center of the user's pupil. The standard circular ring 5 has a diameter larger than the pupil. The ring 5 is used as a reference for comparison with the patient's pupil, so as to obtain the size and shape of the patient's pupil more quickly and accurately. The standard circular ring 5 is relatively fixed to the camera 4, so as to achieve the stability and invariance of the distance between the standard circular ring 5, the camera 4, the upper support body 2 and the lower support body 3, so as to facilitate the actual size of the patient's pupil to be inferred according to the size of the standard circular ring 5 and the scaling ratio of the standard circular ring 5 in the image, which is more accurate. The analysis device also includes a handheld analyzer 6 for receiving images collected by the camera 4 and displaying pupil analysis data. The doctor holds the handheld analyzer 6 to observe the analysis data of the patient's pupil, so as to realize convenient and accurate monitoring and automatic analysis of the patient's pupil in a temporary place.
[0069] The upper support 2 and the lower support 3 can approach and move away from each other as the user presses the elastic spectacle frame 1. When in use, first make the upper support 2 and the lower support 3 approach each other, and then place them on the eyelids and release the pressing on the upper and lower sides of the elastic spectacle frame 1. Then, the elastic restoring force of the elastic spectacle frame 1 can lift the upper and lower eyelids of the user, facilitating more accurate acquisition of the pupil image. Installation blocks 31 are fixed on both the upper support 2 and the lower support 3. A sliding rod 32 is slidably arranged between two installation blocks 31 corresponding to the same pupil. The camera 4 is installed at the middle of the sliding rod 32. Limit pieces 33 are fixed at both ends of the sliding rod 32. A spring 34 for elastically limiting the camera 4 at the middle between the upper support 2 and the lower support 3 is arranged between the limit pieces 33 and the installation blocks 31. Thus, the camera 4 is elastically limited at the middle between the upper support 2 and the lower support 3 by the elastic force of the spring 34, and the sliding rod 32 can prevent the upper support 2 and the lower support 3 from rotating along the upper and lower frames of the elastic spectacle frame 1, ensuring the stability of the mutual distance between the upper support 2, the lower support 3, the camera 4 and the standard ring 5 in the direction of the line connecting the standard ring 5 and the patient's pupil, and ensuring more accurate subsequent analysis and calculation of the size and shape of the pupil.
[0070] A circular cutting edge 51 is arranged on the inner side of the standard ring 5. The cutting edge 51 is a concentric circular structure arranged along the inner side of the standard ring 5. Thus, when obtaining the image inside the standard ring 5, the contour at the cutting edge 51 can be extracted more accurately. Therefore, only by ensuring the roundness of the cutting edge 51 can it be used as a reference object for comparison with the pupil, and the size and shape of the pupil can be calculated more accurately and quickly.
[0071] The present invention also provides a pupil monitoring and analysis method, as Figure 5 shown. The method specifically includes the following steps:
[0072] S1. Obtain an initial image including the patient's eye and the standard ring, and extract the pupil feature of the patient and the standard circle feature inside the standard ring. The standard circle feature is preferably the contour of the cutting edge 51. The extraction algorithm can be a visual detection algorithm such as YOLO.
[0073] S2. Obtain the boundary line of the pupil feature according to the initial image, and obtain the largest inscribed circle, the smallest circumscribed circle and the pupil center of the boundary line.
[0074] In step S2, it specifically includes the following steps:
[0075] S21. Extract the initial boundary line of the pupil feature. The initial boundary line of the pupil is extracted through image segmentation technology (such as edge detection) to provide basic data for subsequent analysis.
[0076] S22. Construct the largest inscribed circle with the largest diameter and the smallest circumscribed circle with the smallest diameter on the initial boundary line. The smallest circumscribed circle can be constructed by algorithms such as the Welzl algorithm and the Ritter algorithm for the largest inscribed circle and the smallest circumscribed circle. After obtaining the coordinate set of the pupil boundary points, for the largest inscribed circle, perform a distance transformation on the pupil area, calculate the shortest distance from each internal point to the boundary, and select the point with the largest value in the distance transformation as the center, and its value is the radius of the largest inscribed circle.
[0077] S23. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the largest inscribed circle, that is, the first average distance, to quantify the average deviation degree between the pupil boundary and the inscribed circle. The smaller the value, the closer the pupil is to a regular circle.
[0078] S24. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the smallest inscribed circle, that is, the second average distance, to quantify the average deviation degree between the pupil boundary and the circumscribed circle. The smaller the value, the more compact the pupil edge is and the closer it is to a regular circle.
[0079] S25. Calculate the ratio of the first average distance and the second average distance to obtain a scale factor, integrating the deviation information of the inscribed circle and the circumscribed circle, so as to dynamically adjust the weight of pupil center positioning in the subsequent step S26.
[0080] S26. Obtain the center coordinates of the largest inscribed circle and the smallest circumscribed circle respectively, and calculate the coordinates of the pupil center according to the scale factor.
[0081] The calculation formula for the coordinates of the pupil center is:
[0082]
[0083] In the above formula, x t and y t respectively represent the x coordinate and the y coordinate of the pupil center, τ1 represents the abscissa coefficient, τ2 represents the ordinate coefficient, x1 and x2 respectively represent the abscissa values of the first average distance and the second average distance, and y1 and y2 respectively represent the ordinate values of the first average distance and the second average distance. is the reciprocal of the scale factor, that is, the ratio of the second average distance and the first average distance In each step, through mathematical modeling and quantitative analysis, the abstract "pupil feature extraction" is transformed into an executable algorithm process, and finally high-precision and anti-interference pupil monitoring is realized.
[0084] S3. Set a maximum pupil circle and a minimum pupil circle centered at the pupil center on the initial image, corresponding to the maximum and minimum values of the normal pupil. The pupil sizes of people in different age groups are generally different. Generally speaking, the pupil diameter is generally 2 - 5 mm. Therefore, to facilitate doctors to quickly observe whether the pupil size of the patient is normal on the handheld analyzer 6, the following steps are specifically included:
[0085] S31. Obtain the diameter of the standard circle feature and the actual diameter of the standard ring in the initial image. By extracting the pixel diameter of the standard ring in the image (such as through edge detection or feature matching) and its actual physical diameter, basic data is provided for subsequent ratio calibration.
[0086] S32. Calculate the ratio of the actual diameter of the standard ring to the diameter of the standard circle feature in the initial image to obtain a scale factor. The scale factor is equal to the actual diameter of the standard ring divided by the diameter of the standard circle feature in the initial image. The core of this step is to establish the correlation between the image space (pixels) and the actual physical space (millimeters). If the actual diameter of the standard ring is 10 mm and it is measured as 100 pixels in the image, then the scale factor is 0.1 mm / pixel.
[0087] S33. Based on the scale factor and the maximum and minimum values of the normal pupil, establish a maximum pupil circle and a minimum pupil circle centered at the pupil center respectively. Based on the scale factor and the normal pupil physiological range (such as 2 - 5 mm), dynamically generate a maximum pupil circle and a minimum pupil circle centered at the pupil center in the image. For the maximum pupil circle, convert the normal maximum value (5 mm) to pixels (5 mm ÷ 0.1 mm / px = 50 px) to identify the abnormally enlarged pupil area. For the minimum pupil circle: Similarly, convert the minimum value (2 mm) to pixels to detect the abnormally constricted pupil area.
[0088] S4. Identify and output the abnormal parts of the pupil features according to the pupil boundary line and the pupil center. To improve the applicability of this device and enable it to detect the eye pupils of different patients, the following steps are specifically included:
[0089] S41. Subtract the set of pixel points included in the pupil feature from the set of pixel points included in the minimum pupil circle to obtain the set of pixel points of the first abnormal part. By set difference operation (minimum pupil circle pixel set - actual pupil pixel set), identify the abnormal area in the pupil region that is smaller than the normal minimum value (such as abnormally constricted pupil). For example, if the normal minimum pupil diameter is 2 mm and the actual pupil is locally constricted to 1.5 mm, then this area is marked as the first abnormality, which may indicate iris inflammation or drug reaction.
[0090] S42. Subtract the set of pixel points included in the maximum pupil circle from the set of pixel points included in the pupil features to obtain the set of pixel points of the second abnormal part, perform a reverse difference operation (subtracting the maximum pupil circle pixel set from the actual pupil pixel set), and locate the dilated area where the pupil exceeds the normal maximum value (such as pupil dilation). For example, an area where the pupil diameter exceeds 5 mm may be caused by brain trauma or drug poisoning, and such areas are marked as the second abnormality.
[0091] S43. Successively establish the first connection line between the pupil center and any pixel point on the pupil boundary line, and the second connection lines between the center of the standard circle feature and any pixel point and its any adjacent pixel point respectively.
[0092] S44. Obtain the first included angle between any two adjacent first connection lines and the second included angle between any two adjacent second connection lines. The fluctuation of the first included angle reflects the local distortion of the pupil boundary (such as oval or irregular deformation), and the second included angle is the standard angle of an ideal circle (such as 360° / number of pixels with uniform distribution).
[0093] S45. Calculate the ratio of the number of all pixel points on the pupil boundary line to the number of all pixel points on the boundary of the standard circle feature to obtain the angle scale factor, which is used to standardize the distribution density of the included angles at different resolutions and eliminate the influence of image scaling on angle calculation.
[0094] S46. Divide the second included angle by the angle scale factor to obtain the standard first included angle. For example, if each pixel of the standard circle corresponds to 1°, and the number of pupil boundary pixels is halved, the standard first included angle is adjusted to 2°, ensuring the angle comparability of pupils of different sizes.
[0095] S47. Set the change rate threshold, and calculate the standard range of the first included angle according to the change rate threshold. The expression of the standard range of the first included angle is: [θ1(1 - ε), θ1(1 + ε)], where θ1 represents the standard first included angle and ε represents the change rate threshold. By setting, a dynamic threshold range is defined, and the included angles exceeding this range are regarded as abnormal, adapting to individual differences and environmental interferences.
[0096] S48. Mark the pixel points on all pupil boundary lines whose first included angles are outside the standard range of the first included angle as the pixel points of the third abnormal part, reflecting the local irregularity of the pupil edge (such as deformation caused by iris adhesion or tumor compression).
[0097] S49. Output all the pixel points of the first abnormal part, the second abnormal part, and the third abnormal part and display them. Combine the three types of abnormal pixel sets (too small, too large, shape distortion), and highlight them through a visualization interface to assist doctors in quickly locating the lesion area and providing accurate reference data for diagnosis.
[0098] After obtaining the reference data, since the reference data is output in real time, the changes in the pupil size and shape of the patient and the corresponding data, such as the pupil diameter, can be obtained in real time by continuously acquiring. When the doctor detects the sensitivity of the patient's pupillary light response through light illumination, one eye can be irradiated with light, and the data obtained in real time can be used to visually obtain the changes in the pupil size and shape of the patient during the light response, including the direct light response of the irradiated eye and the indirect light response of the non-directly irradiated eye, so as to compare with the standard pupil change speed during the light response and determine whether the pupillary light response is sensitive or sluggish. Moreover, the change data of the patient's pupil size and shape at any moment can be saved and output in real time to form a report for convenient later reference.
[0099] Corresponding to the pupil monitoring and analysis method provided in the above embodiment, this embodiment also provides a system for implementing the pupil monitoring and analysis method. Since the pupil monitoring and analysis system provided in this embodiment corresponds to the pupil monitoring and analysis method provided in the above embodiment, the implementation manners of the foregoing pupil monitoring and analysis method are also applicable to the pupil monitoring and analysis system provided in this embodiment and will not be described in detail in this embodiment.
[0100] The system includes a processor and a memory. The memory is used to store a computer program, and when the computer program is executed by the processor, the pupil monitoring and analysis method is implemented.
[0101] The above embodiments have introduced the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A pupil monitoring and analyzing device, characterized in that, It includes an elastic spectacle frame (1) whose upper and lower sides can be compressed towards the middle. There are two pairs of upper support bodies (2) with adjustable positions on the elastic spectacle frame (1) for propping open the upper eyelids. There are also two pairs of lower support bodies (3) with adjustable positions on the elastic spectacle frame (1) for cooperating with the upper eyelids to prop open the lower eyelids. A camera (4) for photographing the user's pupil is arranged in the middle of the upper support body (2) and the lower support body (3). A standard ring (5) with a diameter larger than the pupil is arranged on the line connecting the lens of the camera (4) and the center of the user's pupil. The standard ring (5) is relatively fixed to the camera (4). The analysis device also includes a handheld analyzer (6) for receiving the images collected by the camera (4) and displaying pupil analysis data.
2. The pupil monitoring and analyzing device according to claim 1, wherein Mounting blocks (31) are fixed on both the upper support body (2) and the lower support body (3). A sliding rod (32) is slidably arranged between the two mounting blocks (31) corresponding to the same pupil. The camera (4) is installed in the middle of the sliding rod (32). Limit pieces (33) are fixed at both ends of the sliding rod (32). A spring (34) for elastically limiting the camera (4) at the middle of the upper support body (2) and the lower support body (3) is arranged between the limit piece (33) and the mounting block (31).
3. The pupil monitoring and analysis device according to claim 1, characterized in that, A circular cutting edge (51) is arranged inside the standard ring (5).
4. A pupil monitoring and analysis method based on the pupil monitoring and analysis device according to any one of claims 1-3, characterized in that, The method specifically includes the following steps: S1. Obtain an initial image containing the patient's eye and the standard ring, and extract the pupil characteristics of the patient and the standard circle characteristics inside the standard ring. S2. Obtain the boundary line of the pupil characteristics according to the initial image, and obtain the largest inscribed circle, the smallest circumscribed circle and the pupil center of the boundary line. S3. Set a largest pupil circle and a smallest pupil circle with the pupil center as the center of the circle on the initial image, and corresponding to the maximum and minimum values of a normal pupil. S4. Identify and output for display the abnormal parts of the pupil characteristics according to the pupil boundary line and the pupil center.
5. The pupil monitoring and analysis method according to claim 4, characterized in that, In step S2, it specifically includes the following steps: S21. Extract the initial boundary line of the pupil characteristics. S22. Construct the largest inscribed circle with the largest diameter and the smallest circumscribed circle with the smallest diameter of the initial boundary line. S23. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the largest inscribed circle, that is, the first average distance. S24. Calculate the average distance of the shortest distances from each pixel point on the initial boundary line to the smallest inscribed circle, that is, the second average distance. S25. Calculate the ratio of the first average distance and the second average distance to obtain a scale factor. S26. Respectively obtain the center coordinates of the largest inscribed circle and the smallest circumscribed circle, and calculate the coordinates of the pupil center according to the scale factor.
6. The pupil monitoring and analysis method according to claim 4, wherein In step S3, it specifically includes the following steps: S31. Obtain the diameter of the standard circle characteristics in the initial image and the actual diameter of the standard ring. S32. Calculate the ratio of the actual diameter of the standard ring to the diameter of the standard circle characteristics in the initial image to obtain a scale coefficient. S33. Respectively establish a largest pupil circle and a smallest pupil circle with the pupil center as the center of the circle according to the scale coefficient and the maximum value of a normal pupil and the minimum value of a normal pupil.
7. The pupil monitoring and analysis method according to claim 4, characterized in that In step S4, it specifically includes the following steps: S41. Subtract the set of pixel points included in the pupil feature from the set of pixel points included in the minimum pupil circle to obtain the set of pixel points of the first abnormal part; S42. Subtract the set of pixel points included in the maximum pupil circle from the set of pixel points included in the pupil feature to obtain the set of pixel points of the second abnormal part; S43. Successively establish a first connection line between the pupil center and any pixel point on the pupil boundary line, and a second connection line between the center of the standard circle feature and any pixel point and any of its adjacent pixel points respectively; S44. Obtain a first included angle between any two adjacent first connection lines, and a second included angle between any two adjacent second connection lines; S45. Calculate the ratio of the number of all pixel points on the pupil boundary line to the number of all pixel points on the boundary of the standard circle feature to obtain an angle scale factor; S46. Divide the second included angle by the angle scale factor to obtain a standard first included angle; S47. Set a change rate threshold, and calculate a standard range of the first included angle according to the change rate threshold. The expression of the standard range of the first included angle is: [θ1(1 - ε), θ1(1 + ε)], where θ1 represents the standard first included angle and ε represents the change rate threshold; S48. Mark the pixel points on all pupil boundary lines whose first included angle is outside the standard range of the first included angle as the pixel points of the third abnormal part; S49. Output and display the pixel points of all the first abnormal part, the second abnormal part and the third abnormal part.
8. The pupil monitoring and analysis method according to claim 5, characterized in that, In step S26, the calculation formula for the coordinates of the pupil center is: In the above formula, x t and y t respectively represent the x-coordinate and y-coordinate of the pupil center, τ1 represents the abscissa coefficient, τ2 represents the ordinate coefficient, x1 and x2 respectively represent the abscissa values of the first average distance and the second average distance, and y1 and y2 respectively represent the ordinate values of the first average distance and the second average distance. is the reciprocal of the scaling factor, that is, the second average distance and the first average distance is the ratio of.
9. A pupil monitoring and analysis system for implementing the pupil monitoring and analysis method according to any one of claims 4-8, characterized in that, Comprising a processor and a memory, the memory is used for storing a computer program, and when the computer program is executed by the processor, it implements the pupil monitoring and analysis method according to any one of claims 4 - 8.