Tear mold rupture time acquisition method, system and device based on image processing and medium
By establishing a coordinate system for grayscale processing based on image processing, calculating the number of abnormal grayscales, solving the problem of tear film rupture time recording error in the prior art, and achieving accurate acquisition of tear mold rupture time and rate.
Patent Information
- Application Number
- CN202410959402.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art has errors in evaluating tear film rupture time, mainly because the tear film has formed before the drop of fluorescein sodium, resulting in inaccurate time intervals of recording.
Using an image processing method, a coordinate system of grayscale processing is established by taking multiple shots on the eyes, a coordinate system for grayscale processing is calculated, the number of abnormal grayscales is calculated, the tear mold rupture time is judged, and the burst rate is calculated.
The accuracy of tear mold rupture time is improved, error is reduced, and accurate acquisition and rate calculation of tear mold rupture time is achieved.
Smart Images

Figure CN119130897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, system, device and medium for acquiring tear mold breakup time based on image processing. Background Art
[0002] The tear film is a layer of liquid covering the front surface of the eyeball. It is an important part of the ocular surface structure. It is divided into the tear film in front of the eyeball (conjunctival surface) and the tear film in front of the cornea (corneal surface). The tear film is divided into three layers, namely the lipid layer on the surface, which is mainly formed by the secretion of the facial glands. The aqueous layer in the middle is mainly formed by the secretion of the lacrimal glands and accessory lacrimal glands. The mucin layer at the bottom is mainly formed by the secretion of the ocular surface epithelial cells and conjunctival goblet cells.
[0003] Currently, when assessing whether the tear mold is broken, the main test process is to drip sodium fluorescein into the eyelid, then quickly observe the first break under the slit lamp with cobalt blue light, and record the time interval from the moment of observation to the appearance of the first break.
[0004] However, when sodium fluorescein is instilled into the eye and the eye is observed using cobalt blue light, the tear mold has already formed before the sodium fluorescein is instilled, and what is recorded is the time between the time when sodium fluorescein is instilled and the time when the tear film ruptures, thereby increasing the error in reading the tear mold rupture time. Summary of the invention
[0005] In order to improve the accuracy of tear mold breakup time acquisition, the present invention provides a tear mold breakup time acquisition method, system, device and medium based on image processing.
[0006] In the first aspect, the present invention provides a method for obtaining tear mold breakup time based on image processing, which adopts the following technical solution:
[0007] The tear mold rupture time acquisition method based on image processing includes:
[0008] Initial image acquisition: Take n photos of the eyes after opening them within time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking the photo. n ;
[0009] Image processing: grayscale processing is performed on the photo Mn in the photo set M. A coordinate system is established with the pixel of the photo Mn as the unit, and the coordinates on the photo Mn are assigned so that each pixel corresponds to a coordinate;
[0010] Initial information acquisition: Scan the processed photo Mn to obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i, the grayscale value Z of each grayscale, and the coordinates (X Z , YZ );
[0011] Determination of standard value: The gray value Z obtained from the first photo M1 taken within time T and the coordinates (X Z , Y Z ) is a standard value, and the mapping step and the abnormal grayscale number calculation step are performed on the second to nth photos;
[0012] Mapping: grayscale processing is performed on the second to nth photos, and the second to nth photos are mapped to the coordinate system established in the image processing step;
[0013] Abnormal grayscale count: Calculate the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows:
[0014] K=∑R[M j+1 (X Z , Y Z )];
[0015]
[0016] 2≤j+1≤n;
[0017] Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value;
[0018] Abnormal photo judgment: For the M in the j+1th photo j+1 The number K of abnormal gray levels in the image is judged, if K≠0, the output step is performed, if K=0, the mapping step is performed on the j+2th photo and the abnormal gray level number calculation step is performed;
[0019] Output: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 .
[0020] The above technical solutions in the embodiments of the present application have at least the following technical effects:
[0021] When obtaining the tear mold rupture time, the person's eyes are photographed. When photographing, the person closes his eyes first, and opens his eyes when the tear mold covers the eyeball. When the eyes are opened, the eyes are photographed multiple times continuously. The photographing can be continuous photo shooting or video shooting. For example, 30 photos are taken within 10 seconds, the first photo is image processed, and the outline of the eye in the first photo is obtained. The number of grayscales in the scanned eye outline (for example, the number of grayscales i is 500) is the grayscale value corresponding to the 20th grayscale point is 425, and the corresponding coordinates are (300 425 ,335 425 ), and then perform the same processing on the second to thirtieth photos, map the second to thirtieth photos to the coordinate system, and when calculating the number of abnormal grayscales for the fifth photo, when the tear mold of the eye in the fifth photo is not broken, the grayscale value corresponding to the coordinate (300,335) should be 425. If the grayscale value corresponding to the coordinate (300,335) is not 425, it proves that the tear mold of the eye in the fifth photo is broken, and the shooting time of the fifth photo is output; if the grayscale value corresponding to the coordinate (300,335) is 425, it proves that the tear mold of the eye in the fifth photo has not been broken, and the mapping step and the abnormal grayscale number calculation step are performed on the sixth photo.
[0022] Since the tear mold rupture time is obtained by recording from the moment the tear mold first appears until a photo of the tear mold rupture is found, when monitoring the tear mold rupture, the image of the tear mold of the eye is gray-processed, the data is compared based on the first photo, and the gray-scale is calculated for subsequent photos to achieve accurate acquisition of the tear mold rupture time.
[0023] Optionally, a rupture rate calculation step is further provided after the abnormal photo judgment step;
[0024] Rupture rate calculation: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows:
[0025]
[0026] Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time when the nth photo was obtained, t j+1 is the moment when the j+1th photo is obtained, and Kn is the number of abnormal grayscales in the last photo.
[0027] Optionally, the output step also outputs the tear mold rupture rate V and the coordinates (X Z , Y Z ).
[0028] In a second aspect, the tear mold breakup time acquisition system based on image processing provided by the present invention adopts the following technical solution:
[0029] The tear mold breakup time acquisition system based on image processing includes an acquisition module I, a processing module, an acquisition module II, a determination module, a mapping module, a calculation module I, a judgment module and an output module;
[0030] Acquisition module I: The output end is electrically connected to the input end of the processing module, and is used to take n photos after the eyes are opened within a time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking photos. n ;
[0031] Processing module: The output end is electrically connected to the input end of the acquisition module II, and is used to perform grayscale processing on the photo Mn in the photo set M, establish a coordinate system with the pixel of the photo Mn as the unit, and assign values to the coordinates on the photo Mn so that each pixel corresponds to a coordinate;
[0032] Acquisition module II: The output end is electrically connected to the input end of the determination module, and is used to scan the image Mn after image processing, obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i in the eye contour P, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z );
[0033] Determination module: The output end is connected to the input end of the mapping module for electrical signal, and is used to determine the standard data, such as the gray value Z obtained in the first photo M1 taken within the time T and the coordinates (X Z , Y Z ) is a standard value, and the mapping module and the calculation module I are executed on the second to nth photos;
[0034] Mapping module: the output end is electrically connected to the input end of the calculation module I, and is used to perform grayscale processing on the second to nth photos and map the second to nth photos to the coordinate system established in the image processing step;
[0035] Calculation module I: The output terminal is connected to the input terminal of the judgment module for calculating the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows:
[0036] K=∑R[M j+1 (X Z , Y Z )];
[0037]
[0038] 2≤j+1≤n;
[0039] Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value;
[0040] Judgment module: The output terminal is connected to the input terminal of the output module for electrical signal, and is used to judge the M in the j+1th photo. j+1 The number of abnormal gray levels K in the image is judged. If K≠0, the output step is executed. If K=0, the mapping module is executed on the j+2th photo and the calculation module I is executed.
[0041] Output module: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 .
[0042] Optionally, a calculation module II is further provided after the judgment module;
[0043] Calculation module II: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows:
[0044]
[0045] Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time taken for the last photo, t j+1 is the moment when the j+1th photo is obtained, and Kn is the number of abnormal grayscales in the last photo.
[0046] Optionally, the output step also outputs the tear mold rupture rate V and the coordinates (X Z , Y Z ).
[0047] In a third aspect, the present invention provides a device for acquiring tear mold breakup time based on image processing, which adopts the following technical solution:
[0048] A device comprises a processor and a storage, wherein the storage is used to store a computer program, and the processor is used to execute the computer program stored in the storage, so that the device executes the method as described in the first aspect.
[0049] In a fourth aspect, the present invention provides a computer storage medium for obtaining tear mold breakup time based on image processing, which adopts the following technical solution:
[0050] A medium having a computer program stored thereon; when the computer program is executed by a processor, the method described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of Example 1 of the present application;
[0052] Figure 2 is a schematic diagram of the system structure of Example 2 of the present application;
[0053] Figure 3 This is a schematic diagram of the bus communication structure of Example 3 of the present application. DETAILED DESCRIPTION
[0054] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0056] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0057] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0059] In this application, "and / or" is only a description of the association relationship of associated objects, indicating that there can be three relationships; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0060] It should be noted that, in the present application, words such as "in some embodiments", "exemplarily", "for example", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described in the present application as "in some embodiments", "exemplarily", "for example" should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "in some embodiments", "exemplarily", "for example", etc. is intended to present related concepts in a concrete way, meaning that specific features, structures or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the above words in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0061] The following combination Figures 1 to 3 The present invention is described in further detail.
[0062] Example 1: This example discloses a method for obtaining tear mold breakup time based on image processing, referring to Figure 1 The tear mold rupture time acquisition method based on image processing includes the following steps:
[0063] S1: Initial image acquisition: Take n photos of the eyes after opening them within a time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking the photo n ; (For example: photographing a person's eyes. When photographing, the person closes his eyes first, and opens his eyes when the tear mold covers the eyeball. When the eyes are opened, multiple consecutive photographs are taken of the eyes. The shooting can be continuous photos or video shots. For example: it is strictly forbidden to take 30 photos within 10 seconds.)
[0064] S2: Image processing: grayscale processing is performed on the photo Mn in the photo set M, a coordinate system is established with the pixel of the photo Mn as the unit, and the coordinates on the photo Mn are assigned so that each pixel corresponds to a coordinate.
[0065] S3: Initial information acquisition: Scan the processed photo Mn to obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i in the eye contour P, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z ); (For example: perform image processing on the first photo, and obtain the outline of the eye in the first photo, scan the number of grayscales in the eye outline (for example: the number of grayscales i is 500), the grayscale value corresponding to the 20th grayscale point is 425, and the corresponding coordinates are (300 425 ,335 425 ),).
[0066] S4: Determine the standard value: Take the gray value Z obtained from the first photo M1 taken within the time T and the coordinates (X Z , Y Z ) is a standard value, and the mapping step and the abnormal grayscale number calculation step are performed on the second to nth photos;
[0067] S5: Mapping: grayscale processing is performed on the second to nth photos, and the second to nth photos are mapped to the coordinate system established in the image processing step;
[0068] S6: Abnormal grayscale number calculation: Calculate the number of j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows:
[0069] K=∑R[M j+1 (X Z , Y Z )];
[0070]
[0071] 2≤j+1≤n;
[0072] Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value;
[0073] S7: Abnormal photo judgment: For the M in the j+1th photo j+1The number K of abnormal gray levels in the image is judged, if K≠0, the output step is performed, if K=0, the mapping step is performed on the j+2th photo and the abnormal gray level number calculation step is performed;
[0074] For example: (Map the second to thirtieth photos to the coordinate system. When calculating the number of abnormal grayscales for the fifth photo, when the tear mold of the eye in the fifth photo is not broken, the grayscale value corresponding to the coordinate (300,335) should be 425. If the grayscale value corresponding to the coordinate (300,335) is not 425, it proves that the tear mold of the eye in the fifth photo is broken, and the shooting time of the fifth photo is output; if the grayscale value corresponding to the coordinate (300,335) is 425, it proves that the tear mold of the eye in the fifth photo has not been broken, and the mapping step and the abnormal grayscale number calculation step are performed on the sixth photo.).
[0075] S8: Calculation of rupture rate: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows:
[0076]
[0077] Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time taken for the last photo, t j+1 is the time when the j+1th photo is acquired, and Kn is the number of abnormal gray levels in the last photo;
[0078] For example: (the contour area S obtained after scanning is 5, the total number of grayscales is 100, the number of abnormal grayscales is 10, the rupture area is 0.5, the time when the last photo was obtained is 5:0:0, the fifth photo begins to rupture, the rupture time is 4:59:51, the rupture time is 9 seconds, and the rupture rate is 0.06).
[0079] S9: Output: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 , tear mold rupture rate V, and output the coordinates of abnormal gray values (X Z , Y Z ).
[0080] The implementation principle of the tear mold breakup time acquisition method based on image processing in this embodiment is as follows: when acquiring the tear mold breakup time, the eyes of the person are photographed. When photographing, the person closes his eyes first, and opens his eyes when the tear mold covers the eyeball. When opening the eyes, the eyes are photographed multiple times continuously. The photographing can be continuous photo shooting or video shooting. For example, 30 photos are taken within 10 seconds, the first photo is image processed, and the outline of the eye in the first photo is obtained. The number of grayscales in the eye outline is scanned (for example, the number of grayscales i is 500), and the grayscale value corresponding to the 20th grayscale point is 425, and the corresponding coordinates are (300 425 ,335 425 ), and then the second to thirtieth photos are processed in the same way, and the second to thirtieth photos are mapped to the coordinate system. When the fifth photo is subjected to abnormal grayscale number calculation, when the tear mold of the eye in the fifth photo is not broken, the grayscale value corresponding to the coordinate (300,335) should be 425. If the grayscale value corresponding to the coordinate (300,335) is not 425, it proves that the tear mold of the eye in the fifth photo is broken, and the shooting time of the fifth photo is output; if the grayscale value corresponding to the coordinate (300,335) is 425, it proves that the tear mold of the eye in the fifth photo has not been broken, and the mapping step and the abnormal grayscale number calculation step are performed on the sixth photo; after obtaining the first cracked photo, the scanned contour area S is 5, the total number of grayscales is 100, and the number of abnormal grayscales is 10, then the broken area is 0.5, and the time when the last photo is obtained is 5:0:0, the fifth photo begins to break, and the break time is 4:59:51, then the break time is 9 seconds, and the break rate is 0.06.
[0081] Embodiment 2: This embodiment discloses a tear mold breakup time acquisition system based on image processing, referring to Figure 2 ,The tear mold rupture time acquisition system based on image processing includes;
[0082] Acquisition module I, processing module, acquisition module II, determination module, mapping module, calculation module I, judgment module, calculation module II and output module;
[0083] Acquisition module I: The output end is electrically connected to the input end of the processing module, and is used to take n photos after the eyes are opened within a time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking photos. n ;
[0084] Processing module: The output end is electrically connected to the input end of the acquisition module II, and is used to perform grayscale processing on the photo Mn in the photo set M, establish a coordinate system with the pixel of the photo Mn as the unit, and assign values to the coordinates on the photo Mn so that each pixel corresponds to a coordinate;
[0085] Acquisition module II: The output end is electrically connected to the input end of the determination module, and is used to scan the image Mn after image processing, obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i in the eye contour P, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z );
[0086] Determination module: The output end is connected to the input end of the mapping module for electrical signal, and is used to determine the standard data, such as the gray value Z obtained in the first photo M1 taken within the time T and the coordinates (X Z , Y Z ) is a standard value, and the mapping module and the calculation module I are executed on the second to nth photos;
[0087] Mapping module: the output end is electrically connected to the input end of the calculation module I, and is used to perform grayscale processing on the second to nth photos and map the second to nth photos to the coordinate system established in the image processing step;
[0088] Calculation module I: The output terminal is connected to the input terminal of the judgment module for calculating the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows:
[0089] K=∑R[M j+1 (X Z , Y Z )];
[0090]
[0091] 2≤j+1≤n;
[0092] Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value;
[0093] Judgment module: The output terminal is connected to the input terminal of the output module for electrical signal, and is used to judge the M in the j+1th photo. j+1 The number of abnormal gray levels K in the image is judged. If K≠0, the output step is executed. If K=0, the mapping module is executed on the j+2th photo and the calculation module I is executed.
[0094] Calculation module II: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows:
[0095]
[0096] Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time taken for the last photo, t j+1 is the moment when the j+1th photo is obtained, and Kn is the number of abnormal grayscales in the last photo.
[0097] Output module: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 , the tear mold rupture rate V, and the coordinates of the abnormal gray value (X Z , Y Z ).
[0098] In this embodiment, the tear mold breakup time acquisition system based on image processing: the acquisition module I takes n photos of the eyes after opening within the time T, forms a photo set M with the n photos, and records the photo taking time t of each photo when taking photos. n ; The processing module performs grayscale processing on the photo Mn in the photo set M, establishes a coordinate system with the pixel of the photo Mn as the unit, and assigns values to the coordinates on the photo Mn so that each pixel corresponds to a coordinate; the acquisition module II scans the photo Mn after image processing, obtains the eye image contour P in the processed photo Mn, and obtains the total number of grayscales i in the eye contour P, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z ); The determination module determines the standard data to obtain the gray value Z in the first photo M1 taken within the time T and the coordinates (X Z , Y Z ) is the standard value, and the mapping module and the calculation module I are executed on the second to nth photos; the mapping module performs grayscale processing on the second to nth photos, and maps the second to nth photos to the coordinate system established in the image processing step; the calculation module I calculates the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The number of abnormal gray levels K in the image is judged. If K≠0, the output step is executed. If K=0, the mapping module is executed on the j+2th photo and the calculation module I is executed; the calculation module II calculates the tear mold rupture rate V, and the output module outputs the j+1th photo and the shooting time t of the j+1th photo. j+1 , the tear mold rupture rate V, and the coordinates of the abnormal gray value (X Z , Y Z ).
[0099] Embodiment 3, this embodiment discloses a tear mold breakup time acquisition device based on image processing, referring to Figure 3 , a tear mold rupture time acquisition device based on image processing comprises:
[0100] Storage for storing computer programs;
[0101] The processor is used to execute the computer program stored in the memory, thereby implementing the method described in Example 1.
[0102] The storage may include a large capacity storage for storing data or instructions. By way of example and not limitation, the storage may include a hard disk, a floppy disk, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a combination of two or more of these. Where appropriate, the storage may include a removable or non-removable (or fixed) medium. Where appropriate, the storage may be inside or outside the data processing device. In a particular embodiment, the storage is a non-volatile solid-state storage. In a particular embodiment, the storage includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EBROM), or a combination of two or more of these.
[0103] Example 4: This example discloses a computer storage medium for obtaining tear mold breakup time based on image processing, wherein the computer storage medium stores a program, which, when executed, can implement part or all of the steps of the method described in Example 1.
[0104] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. Tear mold rupture time acquisition method based on image processing, Features: include: Initial image acquisition: Take n photos of the eyes after opening them within time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking the photo. n ; Image processing: grayscale processing is performed on the photo Mn in the photo set M. A coordinate system is established with the pixel of the photo Mn as the unit, and the coordinates on the photo Mn are assigned so that each pixel corresponds to a coordinate; Initial information acquisition: Scan the processed photo Mn to obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z ); The standard value is determined by taking the first photo M taken within the time T. 1 The gray value Z obtained in the above code and the coordinates (X Z , Y Z ) is a standard value, and the mapping step and the abnormal grayscale number calculation step are performed on the second to nth photos; Mapping: grayscale processing is performed on the second to nth photos, and the second to nth photos are mapped to the coordinate system established in the image processing step; Abnormal grayscale count: Calculate the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows: K=∑R[M j+1 (X Z ,Y Z )]; 2≤j+1≤n; Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value; Abnormal photo judgment: For the M in the j+1th photo j+1 The number K of abnormal gray levels in the image is judged, if K≠0, the output step is performed, if K=0, the mapping step is performed on the j+2th photo and the abnormal gray level number calculation step is performed; Output: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 .
2. The tear mold breakup time acquisition method based on image processing according to claim 1, Features: A rupture rate calculation step is also provided after the abnormal photo judgment step; Rupture rate calculation: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows: Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time when the nth photo was obtained, t j+1 is the moment when the j+1th photo is obtained, and Kn is the number of abnormal grayscales in the last photo.
3. The tear mold breakup time acquisition method based on image processing according to claim 2, Features: The output step also outputs the tear mold rupture rate V and the coordinates (X Z , Y Z ).
4. A tear mold breakup time acquisition system based on image processing, applying the tear mold breakup time acquisition method based on image processing according to any one of claims 1 to 3, Features: It includes an acquisition module I, a processing module, an acquisition module II, a determination module, a mapping module, a calculation module I, a judgment module and an output module; Acquisition module I: The output end is electrically connected to the input end of the processing module, and is used to take n photos after the eyes are opened within a time T, form a photo set M with the n photos, and record the photo-taking time t of each photo when taking photos. n ; Processing module: The output end is electrically connected to the input end of the acquisition module II, and is used to perform grayscale processing on the photo Mn in the photo set M, establish a coordinate system with the pixel of the photo Mn as the unit, and assign values to the coordinates on the photo Mn so that each pixel corresponds to a coordinate; Acquisition module II: The output end is electrically connected to the input end of the determination module, and is used to scan the image Mn after image processing, obtain the eye image contour P in the processed photo Mn, and obtain the total number of grayscales i in the eye contour P, the grayscale value Z of each grayscale, and the coordinates (X Z , Y Z ); Determination module: The output end is connected to the input end of the mapping module for electrical signal, and is used to determine the standard data, such as the first photo M taken within the time T. 1 The gray value Z obtained in the above code and the coordinates (X Z , Y Z ) is a standard value, and the mapping module and the calculation module I are executed on the second to nth photos; Mapping module: the output end is electrically connected to the input end of the calculation module I, and is used to perform grayscale processing on the second to nth photos and map the second to nth photos to the coordinate system established in the image processing step; Calculation module I: The output terminal is connected to the input terminal of the judgment module for calculating the j+1th photo M j+1 The number of abnormal gray levels K in the j+1th photo M j+1 The calculation model of the number of abnormal gray levels K in is as follows: K=∑R[M j+1 (X Z ,Y Z )]; 2≤j+1≤n; Where M j+1 (X Z , Y Z ) is the coordinate (X Z , Y Z ) corresponding to the gray value; Judgment module: The output terminal is connected to the input terminal of the output module for electrical signal, and is used to judge the M in the j+1th photo. j+1 The number of abnormal gray levels K in the image is judged. If K≠0, the output step is executed. If K=0, the mapping module is executed on the j+2th photo and the calculation module I is executed. Output module: When K≠0, output the j+1th photo and the shooting time t of the j+1th photo j+1 .
5. The tear mold breakup time acquisition system based on image processing according to claim 4, Features: A calculation module II is also provided after the judgment module; Calculation module II: Calculate the tear mold rupture rate V. The calculation model of the tear mold rupture rate V is as follows: Where i is the total number of gray levels in the eye contour P, S is the total area of the eye contour P, and t n The time taken for the last photo, t j+1 is the moment when the j+1th photo is obtained, and Kn is the number of abnormal grayscales in the last photo.
6. The tear mold breakup time acquisition system based on image processing according to claim 5, Features: The output step also outputs the tear mold rupture rate V and the coordinates (X Z , Y Z ).
7. A tear mold rupture time acquisition device based on image processing, Features: The device comprises a processor and a storage, wherein the storage is used to store a computer program, and the processor is used to execute the computer program stored in the storage, so that the device executes the method according to any one of claims 1 to 3.
8. A computer storage medium for obtaining tear mold breakup time based on image processing, having a computer program stored thereon, Features: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Human tear film rupture detection method
CN111028234A
Dry eye FBUT detection method and system based on deep learning and storage medium
CN114820537A
Casting material surface flaw edge visual detection method, system and device and medium
CN117333480A
Data processing method, system and device based on drug long-term test and medium
CN117352193A
