Contact lens defect detection method and system
Through a non-coaxial optical lighting system, the bright and dark field light sources are synthesized into a synthetic beam of single-shot lighting, and combined with an image enhancement algorithm, the problem of low defect detection efficiency in the contact lens production line is solved, achieving efficient and accurate detection effects.
Patent Information
- Application Number
- CN202410393059.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-04-02
AI Technical Summary
The defect detection efficiency in the contact lens production line is low, resulting in limited production capacity. Existing equipment needs to switch light sources and collect images multiple times, affecting the detection efficiency.
A non-coaxial optical lighting system is used to synthesize bright field illumination light sources and dark field illumination light sources into synthetic light beams, and only a single illumination and image acquisition analysis is performed, and the lens image is processed in combination with an image enhancement algorithm.
It greatly improves the efficiency and accuracy of contact lens defect detection, reduces detection time and cost, and improves production efficiency.
Smart Images

Figure CN118275443B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of contact lens detection, and in particular to a contact lens defect detection method and system. Background Art
[0002] In the contact lens production line, the efficiency of contact lens defect detection often restricts the maximum production capacity of the entire contact lens production line. In the current contact lens defect detection equipment, the contact lens to be inspected usually needs to collect at least two images under the illumination of bright field light source and dark field light source respectively, and then the collected images are fused and analyzed to identify the presence and type of defects.
[0003] Furthermore, in order to perform dark field illumination at multiple angles on different areas of a three-dimensional lens, there is often more than one set of dark field illumination light sources. During the inspection process, the illumination light source needs to be switched at least twice, the image acquisition device needs to acquire images at least twice, and the image processing and analysis system needs to perform image fusion to enhance image information. This results in low efficiency in contact lens defect detection, which in turn affects the production capacity of the contact lens production line. Summary of the invention
[0004] The present invention provides a contact lens defect detection method and system, which adopts a non-coaxial optical lighting system to synthesize a bright field lighting light source and a dark field lighting light source, and can complete the contact lens defect detection by only performing a single illumination and image acquisition and analysis on the contact lens to be inspected, and adopts an image enhancement algorithm to enhance the collected lens image, thereby greatly improving the detection efficiency and accuracy, thereby improving the production efficiency of contact lenses and saving time and cost.
[0005] In a first aspect, an embodiment of the present invention provides a contact lens defect detection method, the contact lens defect detection method comprising:
[0006] Setting up a contact lens defect detection system according to the characteristics of the contact lens to be detected;
[0007] The characteristics of the contact lens to be inspected include: type, focal length, defect location and detection distance, and the contact lens defect detection system includes: multiple illumination light sources and one or more beam splitters;
[0008] Combining a plurality of illumination light sources into a composite light beam by one or more beam splitters;
[0009] irradiating the synthesized light beam onto the surface of the contact lens to be inspected and collecting a lens image of the contact lens to be inspected;
[0010] Performing enhancement processing on the lens image according to a preset image enhancement algorithm;
[0011] Image analysis is performed on the enhanced lens image to determine the defects of the contact lens to be inspected.
[0012] Through the above technical solution, the bright field lighting source and the dark field lighting source can be combined, and the defect detection of the contact lens can be completed by only performing a single illumination and image acquisition and analysis on the contact lens to be inspected, and the collected lens image can be enhanced by using an image enhancement algorithm, which greatly improves the detection efficiency and accuracy, thereby improving the production efficiency of contact lenses and saving time and costs.
[0013] Optionally, a contact lens defect detection system is set according to the characteristics of the contact lens to be detected, including:
[0014] Determine the number of illumination sources and beam splitters according to the type of contact lens to be inspected;
[0015] Wherein, the illumination light source includes at least: a bright field illumination light source and a dark field illumination light source, and the positions of the light sources are not on the same optical axis;
[0016] The beam splitter is used to synthesize the bright field illumination light source and the dark field illumination light source and transmit them to the surface of the contact lens to be inspected;
[0017] The dark field illumination light source includes but is not limited to a ring array of light emitting diodes, and the ring array of light emitting diodes has a tilt angle deviating from 0 degrees.
[0018] Through the above technical solution, a suitable contact lens defect detection system can be set up according to the detection requirements, thereby improving the applicability of contact lens detection technology.
[0019] Optionally, the contact lens defect detection system is set according to the characteristics of the contact lens to be detected, and further includes:
[0020] If the contact lens to be tested is a myopic contact lens, the higher the myopia degree, the smaller the tilt angle value of the annular array light emitting diode;
[0021] If the contact lens to be tested is a hyperopic contact lens, the higher the degree of hyperopia, the greater the tilt angle value of the annular array light emitting diode;
[0022] If the defect position of the contact lens to be inspected is in the first peripheral arc region and the second peripheral arc region, the tilt angle of the annular array light emitting diode is set to a value greater than the first angle threshold;
[0023] If the defect position of the contact lens to be inspected is in the optical zone, the tilt angle of the annular array of light emitting diodes is set to a value smaller than the second angle threshold;
[0024] The tilt angle value of the annular array light emitting diode is inversely proportional to the distance value from the light source to the contact lens to be detected.
[0025] Through the above technical solution, the applicability and accuracy of contact lens detection technology can be greatly improved.
[0026] Optionally, the reflectivity and transmittance of the beam splitter are configured according to the contact lens inspection requirements:
[0027] If the relative strength of the two light sources needs to remain unchanged after passing through the beam splitter, the beam splitter in the contact lens defect detection system should be 50% transmission / 50% reflection;
[0028] If the rate of change of the relative strength of the three light sources after passing through the beam splitter is required to be the lowest, the first beam splitter in the contact lens defect detection system uses 50% transmission / 50% reflection, and the second beam splitter uses 70% transmission / 30% reflection;
[0029] If the relative strength of the four light sources needs to remain unchanged after passing through the beam splitter, the three beam splitters in the contact lens defect detection system should all use 50% transmission / 50% reflection.
[0030] Through the above technical solution, the application scope of contact lens detection technology can be further improved.
[0031] Optionally, the lens image is enhanced according to a preset image enhancement algorithm, including:
[0032] Input the lens image into a pre-trained image recognition model to determine the defect area in the lens image;
[0033] Mark the defect area and determine the coordinate range of the defect area in the lens image;
[0034] According to the coordinate range, nonlinear grayscale transformation and high-pass filtering are applied to the defective area;
[0035] Among them, nonlinear grayscale transformation includes: logarithmic transformation or exponential transformation.
[0036] Through the above technical solution, the accuracy of contact lens defect detection can be improved.
[0037] Optionally, the contact lens defect detection method further includes:
[0038] The light diffuser is used to reshape and diffuse part of the light leaked from the dark field illumination light source and the bright field illumination light source after passing through the beam splitter into a uniformly emitted circular light spot;
[0039] The uniformly emitted circular light spot is transmitted to the pre-packaging detection system or the packaging detection system of the contact lens through the transmission lens group and used as a plane light source for standby use.
[0040] Through the above technical solution, the leaked light source can be collected and processed for secondary use, thereby improving the utilization rate of the light source and reducing energy waste.
[0041] In a second aspect, an embodiment of the present invention provides a contact lens defect detection system, the contact lens defect detection system comprising:
[0042] An optical lighting system for providing the light source required for contact lens inspection;
[0043] A lens carrying unit, used for carrying the contact lens to be tested;
[0044] A loading device for placing the contact lenses to be tested;
[0045] The unloading device is used to grab the contact lenses to be tested and sort the good and defective ones;
[0046] An image acquisition unit, used for acquiring the lens image of the contact lens to be inspected;
[0047] An image analysis unit, used to detect and analyze defect features of the collected lens images;
[0048] A display unit, used for displaying the test results;
[0049] The stepping drive device is used to adjust the position of the optical illumination system and the image acquisition unit to ensure the alignment of the optical illumination system and the image acquisition unit with the contact lens to be inspected.
[0050] Optionally, the optical illumination system comprises:
[0051] a plurality of illumination sources and one or more beam splitters;
[0052] Wherein, the multiple illumination light sources include at least: a bright field illumination light source and a dark field illumination light source, and the positions of the light sources are not on the same optical axis;
[0053] The beam splitter is used to synthesize the bright field illumination light source and the dark field illumination light source and transmit the synthesized light source to the surface of the contact lens to be inspected.
[0054] Optionally, the contact lens defect detection system further comprises:
[0055] The leaked light processing device is used to collect the light leaked after passing through the beam splitter and process it to obtain a planar light source.
[0056] Optionally, the leakage light processing device includes:
[0057] A plurality of light diffusion plates are used to reshape and diffuse part of the light leaked from the dark field illumination light source and the bright field illumination light source after passing through the beam splitter into a uniformly emitted circular light spot;
[0058] A plurality of transmission lens groups are used to transmit uniformly emitted circular light spots to a pre-packaging detection system or a packaging detection system of contact lenses as a plane light source for standby use.
[0059] The present invention provides a contact lens defect detection method and system, the contact lens defect detection method comprising: setting a contact lens defect detection system according to the characteristics of the contact lens to be detected; wherein the characteristics of the contact lens to be detected include: type, focal length, defect position and detection distance, and the contact lens defect detection system comprising: multiple illumination light sources and one or more beam splitters; combining multiple illumination light sources through one or more beam splitters to form a synthetic light beam; irradiating the synthetic light beam to the surface of the contact lens to be detected and collecting the lens image of the contact lens to be detected; enhancing the lens image according to a preset image enhancement algorithm; and performing image analysis on the enhanced lens image to determine the defect of the contact lens to be detected. The present invention adopts a non-coaxial optical illumination system, synthesizes a bright field illumination light source and a dark field illumination light source, and can complete the defect detection of the contact lens by only performing a single illumination and image acquisition and analysis on the contact lens to be detected, and adopts an image enhancement algorithm to enhance the collected lens image, which greatly improves the detection efficiency and accuracy, thereby improving the production efficiency of the contact lens, saving time and cost.
[0060] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0062] Figure 1 is a flow chart of a contact lens defect detection method according to an embodiment of the present invention;
[0063] Figure 2 is a schematic structural diagram of an optical illumination system according to an embodiment of the present invention;
[0064] Figure 3 is a schematic structural diagram of another optical illumination system according to an embodiment of the present invention;
[0065] Figure 4 is a schematic structural diagram of another non-coaxial optical illumination system according to an embodiment of the present invention;
[0066] Figure 5A schematic diagram of functional modules of a contact lens defect detection system according to an embodiment of the present invention;
[0067] Figure 6 A schematic structural diagram of a contact lens defect detection system according to an embodiment of the present invention;
[0068] Figure 7 A schematic diagram of the structure of an optical lighting system is shown;
[0069] Figure 8 A bright field imaging image, a dark field imaging image, and a synthetic light field illumination image of a scratch defective lens according to an embodiment of the present invention;
[0070] Fig. 9 A bright field imaging image, a dark field imaging image, and a synthetic light field illumination image of a lens with edge damage defect according to an embodiment of the present invention;
[0071] Fig.10 A schematic diagram of a contact lens production line detection link according to an embodiment of the present invention;
[0072] Fig.11 It is a structural schematic diagram of a solution for reusing a leaked light source according to an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0074] It should be noted that the description of the embodiments of the present invention is only for more clearly illustrating the technical solutions of the embodiments of the present invention, and does not constitute a limitation on the technical solutions provided by the embodiments of the present invention.
[0075] For example, Figure 1 FIG. 4 is a flow chart of a contact lens defect detection method according to an embodiment of the present invention; Figure 1 As shown, the contact lens defect detection method comprises:
[0076] S101, setting a contact lens defect detection system according to the characteristics of the contact lens to be detected.
[0077] Among them, the characteristics of the contact lenses to be inspected include: type, focal length, defect location and detection distance, and the contact lens defect detection system includes: multiple lighting light sources and one or more beam splitters, and multiple lighting light sources and one or more beam splitters can form a variety of optical lighting systems suitable for different application scenarios.
[0078] Optionally, a contact lens defect detection system is set according to the characteristics of the contact lens to be detected, including:
[0079] Determine the number of illumination sources and beam splitters according to the type of contact lens to be inspected;
[0080] Among them, the lighting source includes at least: a bright field lighting source and a dark field lighting source, and the positions of the light sources are not on the same optical axis; the bright field lighting source and the dark field lighting source are covered with a light diffusion plate; the beam splitter is used to synthesize the bright field lighting source and the dark field lighting source and transmit them to the surface of the contact lens to be tested.
[0081] For example, Figure 2 FIG. 1 is a schematic diagram of the structure of an optical illumination system according to an embodiment of the present invention; Figure 2 As shown, the optical illumination system comprises:
[0082] Bright field illumination light source 201 , dark field illumination light source 202 and beam splitter 203 .
[0083] Optionally, the optical axes of the initial outgoing light between the bright field illumination light source 201 and the dark field illumination light source 202 are respectively the first optical axis and the second optical axis, which are perpendicular to each other, and are synthesized by the beam splitter 203 and incident on the target along the first optical axis.
[0084] For example, Figure 3 FIG. 1 is a schematic diagram of the structure of another optical illumination system according to an embodiment of the present invention; Figure 3 As shown, the optical illumination system comprises:
[0085] A bright field illumination light source 301 , a first dark field illumination light source 302 , a second dark field illumination light source 303 , a first beam splitter 304 , and a second beam splitter 305 .
[0086] Optionally, the bright field illumination light source 301 emits light along the first optical axis, the first dark field illumination light source 302 emits light along the second optical axis, and the second dark field illumination light source 303 emits light along the third optical axis. The three emit light rays are not on the same optical axis, and are synthesized by the first beam splitter 304 and the second beam splitter 305 and then incident on the target.
[0087] For example, Figure 4 FIG. 1 is a schematic diagram of the structure of another optical illumination system according to an embodiment of the present invention; Figure 4 As shown, the optical illumination system comprises:
[0088] A bright field illumination light source 401 , a first dark field illumination light source 402 , a second dark field illumination light source 403 , a third dark field illumination light source 404 , a first beam splitter 405 , a second beam splitter 406 and a third beam splitter 407 .
[0089] Optionally, the bright field illumination light source 401 emits light along the first optical axis, the first dark field illumination light source 402 emits light along the second optical axis, the second dark field illumination light source 403 emits light along the third optical axis, and the fourth dark field illumination light source 404 emits light along the fourth optical axis. The four light rays are not on the same optical axis and are synthesized by the first beam splitter 405, the second beam splitter 406 and the third beam splitter 407 and then incident on the target.
[0090] Optionally, Figure 2-Figure 4 The bright field illumination light source includes but is not limited to a planar array light emitting diode, and the dark field illumination light source includes but is not limited to a circular array light emitting diode, and the circular array light emitting diode has a tilt angle deviating from 0 degrees;
[0091] The tilt angle refers to the angle between the normal direction of the light-emitting surface and the direction of the optical axis.
[0092] Specifically, if the contact lens to be tested is a myopic contact lens, the higher the myopia degree, the smaller the tilt angle value of the annular array light emitting diode;
[0093] If the contact lens to be tested is a hyperopic contact lens, the higher the degree of hyperopia, the greater the tilt angle value of the annular array light emitting diode;
[0094] If the defect position of the contact lens to be inspected is in the first peripheral arc region and the second peripheral arc region, the tilt angle of the annular array light emitting diode is set to a value greater than the first angle threshold;
[0095] If the defect position of the contact lens to be inspected is in the optical zone, the tilt angle of the annular array of light emitting diodes is set to a value smaller than the second angle threshold;
[0096] The tilt angle value of the annular array light emitting diode is inversely proportional to the distance value from the light source to the contact lens to be detected.
[0097] Optionally, the first angle threshold is greater than the second angle threshold, and the first angle threshold and the second angle threshold are set according to actual detection requirements.
[0098] It should be noted that when using a dark field illumination source for illumination, in order to present the best defect contrast, it is necessary to change the direction of the light beam incident on different areas of the lens according to the structural characteristics of the lens.
[0099] Taking the lens placed on a horizontal plane with the opening facing upward as an example, the structural characteristics of the lens mainly refer to the angle between the normal direction of the lens surface and the optical axis direction perpendicular to the horizontal plane; among them, relative to the first peripheral arc and the second peripheral arc, the angle between the surface normal direction of the lens optical zone and the optical axis direction is smaller, so a ring array LED with a smaller inclination angle can be selected; for lenses with focal length, since the higher the myopia degree, the stronger the ability to deflect light, the ring array LED with a smaller inclination angle can be selected; conversely, the higher the hyperopia degree, the stronger the ability to converge light, so a ring array LED with a larger inclination angle can be selected.
[0100] Due to lateral space limitations, in order to ensure that the light is evenly and fully irradiated to the contact lens to be tested, the ring-shaped array of light-emitting diodes with a smaller inclination angle can be placed slightly away from the contact lens to be tested; conversely, the ring-shaped array of light-emitting diodes with a larger inclination angle needs to be placed slightly closer to the contact lens to be tested.
[0101] In summary, the specific size of the tilt angle of the annular array LED can be set according to the actual needs of contact lens inspection and the relationship between the above type, focal length, defect location and detection distance and the tilt angle of the annular array LED.
[0102] Optionally, Figure 2-Figure 4 The reflectivity and transmittance of the beam splitter are configured according to the contact lens testing requirements;
[0103] For example, if the relative strength relationship of the two light sources needs to remain unchanged after passing through the beam splitter, the beam splitter in the contact lens defect detection system is selected to be 50% transmission / 50% reflection;
[0104] If the rate of change of the relative strength of the three light sources after passing through the beam splitter is required to be the lowest, the first beam splitter in the contact lens defect detection system uses 50% transmission / 50% reflection, and the second beam splitter uses 70% transmission / 30% reflection;
[0105] If the relative strength of the four light sources needs to remain unchanged after passing through the beam splitter, the three beam splitters in the contact lens defect detection system should all use 50% transmission / 50% reflection.
[0106] Exemplarily, assuming that the initial light energy of the three light sources is E, the selected beam splitters are 50% transmission / 50% reflection for the first beam splitter and 70% transmission / 30% reflection for the second beam splitter. Then, after 50% transmission and 70% transmission of the first light source, the remaining light energy is 35%; after 50% reflection and 70% transmission of the second light source, the remaining light energy is 35%; after 30% reflection of the third light source, the remaining light energy is 30%.
[0107] Optionally, the above technical solution can make the light energy of the three light sources reaching the surface of the contact lens to be tested not completely the same, but very close; if the three need to be completely the same, then on the premise of selecting this beam splitter configuration, the output light energy of the third light source can be fine-tuned to E*30% / 35%=0.86E.
[0108] Exemplarily, assuming that the initial light energy of the three light sources is E, and all beam splitters are selected to be 50% transmission / 50% reflection, the first light source has 25% remaining light energy after 50% transmission and 50% transmission; the second light source has 25% remaining light energy after 50% reflection and 50% transmission; and the third light source has 50% remaining light energy after 50% reflection.
[0109] Optionally, when adopting the above technical solution, if the three need to be exactly the same, the output light energy of the third light source needs to be adjusted to 0.5E; this will cause the output capacity of the light source to not be fully utilized, and the final total light energy of the three light sources reaching the lens is less, which is 0.75E; while the solution of using 50% transmission / 50% reflection for the first beam splitter and 70% transmission / 30% reflection for the second beam splitter is 0.9E.
[0110] It can be seen that when using three light sources to detect contact lenses, the best solution is to use 50% transmission / 50% reflection for the first beam splitter and 70% transmission / 30% reflection for the second beam splitter.
[0111] It should be noted that the positions and quantities of the components in the optical illumination system are not limited in the present embodiment, and the positions of the bright field illumination light source and the dark field illumination light source as well as the relative positions of the components can be interchanged according to the structural design requirements; and in practical applications, the contact lens structure mainly includes three regions, namely the optical zone, the first peripheral arc, and the second peripheral arc, corresponding to three circular (ring) regions with large differences in curvature, and three dark field light sources with different inclination angles can basically meet most dark field detection requirements; in some special cases, the number of bright field illumination light sources, dark field illumination light sources, and beam splitters can be increased according to requirements, but it should be noted that the number of light sources and beam splitters will be limited by the installation space and the attenuation of the light source.
[0112] S102, combining multiple illumination light sources into a composite light beam through one or more beam splitters.
[0113] S103, irradiating the synthesized light beam onto the surface of the contact lens to be tested and collecting a lens image of the contact lens to be tested.
[0114] For example, Figure 5 FIG. 1 is a schematic diagram of functional modules of a contact lens defect detection system according to an embodiment of the present invention. Figure 5As shown:
[0115] The contact lens defect detection system includes: an optical lighting system 501, which is used to provide the light source required for contact lens detection; a lens carrying unit 502, which is used to carry the contact lenses to be detected; a loading device 503, which is used to place the contact lenses to be detected; a unloading device 504, which is used to grab the contact lenses to be detected and sort good products from defective products; an image acquisition unit 505, which is used to collect lens images of the contact lenses to be detected; an image analysis unit 506, which is used to detect and analyze defect features of the collected lens images; a display unit 507, which is used to display the detection results; and a stepping drive device 508, which is used to adjust the positions of the optical lighting system and the image acquisition unit to ensure the alignment of the optical lighting system and the image acquisition unit with the contact lenses to be detected.
[0116] Optionally, the image acquisition unit 505 generally includes an industrial lens and a camera assembly; the optical illumination system 501 may be a two- to four-light-field non-coaxial optical illumination system.
[0117] For example, the structure of the related equipment to realize the contact lens defect detection system function can be as follows: Figure 6 As shown: Figure 6 A four-light-field non-coaxial optical illumination system 600 is shown, which provides a light source for contact lens inspection and a lens carrying unit 620 for carrying a contact lens to be inspected;
[0118] Optionally, the four-light-field non-coaxial optical illumination system 600 includes:
[0119] Bright field illumination light source group 601, first dark field illumination light source group 602, second dark field illumination light source group 603, third dark field illumination light source group 604, first beam splitter group 605, second beam splitter group 606, third beam splitter group 607, first horizontal height fixed platform 608, second horizontal height fixed platform 609, illumination system housing 610, illumination system stepping guide rail 611.
[0120] Specifically, all the above-mentioned component groups include 5 independent components; the first horizontal height fixing platform 608 is used to fix the first beam splitter group 605 and the first dark field illumination light source group 602 as a whole, and the height of the first beam splitter group 605 and the first dark field illumination light source group 602 can be adjusted by adjusting the relative position between the first beam splitter group 605 and the first dark field illumination light source group 602 and the second horizontal height fixing platform 609 is used to fix the second beam splitter group 606, the third beam splitter group 607 and the second dark field illumination light source group 603 as a whole, and the height of the second beam splitter group 606, the third beam splitter group 607 and the second dark field illumination light source group 603 can be adjusted by adjusting the relative position between the second beam splitter group 606, the third beam splitter group 607 and the second dark field illumination light source group 603 and the second horizontal height fixing platform 609 is used to fix ...
[0121] Optionally, the number of independent components included in all the above component groups may be less than or greater than 5, and the number is considered comprehensively based on production capacity requirements and equipment costs.
[0122] Optionally, the lens carrying unit 620 includes:
[0123] The lens carrier plate 621 and the carrier plate fixing housing 622 .
[0124] Specifically, the lens carrier plate 621 includes two groups of lens carriers, each group of lens carriers includes 5 independent lens carriers. After the lighting system stepping guide 611 adjusts the lighting system's outgoing light to align the image with a group of lens carriers on the right side of the figure, the lighting system will be moved to the left to make the outgoing light align the image with the group of lens carriers on the left side of the figure.
[0125] Specifically, the optical axes of the initial emitted light rays of each group of non-coaxial light sources in the four-light-field non-coaxial optical illumination system are not collinear, and are synthesized by one or more groups of beam splitters and then incident along the first optical axis onto the contact lens carried on the lens carrying plate 621 .
[0126] Optionally, the lens carrier plate 621 may include less than or more than two groups of lens carriers, and the value is comprehensively considered based on production capacity requirements and equipment costs.
[0127] It should be noted that in this embodiment, there is no limitation on the position and number of the various components of the optical illumination system. The relative positions and spatial distances between the various components can be appropriately adjusted, and the number of light sources and beam splitters can be increased or decreased as needed. At the same time, light field synthesis can be performed and single imaging detection can be achieved.
[0128] For example, Figure 7 FIG. 1 shows a schematic diagram of the structure of an optical illumination system, which is an optical illumination system used in the prior art for contact lens defect detection. Figure 7 As shown:
[0129] When performing contact lens defect detection, a single illumination on the optical axis requires the light source switching device 700 to move the light source to be used to the same axis as the light source. For scenarios requiring four illumination light sources, a set of imaging requires the light source switching device 700 to move four times in the horizontal direction to sequentially switch the third dark field light source 701, the second dark field light source 702, the first dark field light source 703 and the bright field light source 704.
[0130] Optionally, it can be seen from the comparison that the technical solution in the present invention can generate an image of a synthetic light field in a single time, which is equivalent to the image after the bright field and dark field images are fused and enhanced in the prior art; therefore, in addition to reducing the time cost caused by light field switching, the present invention can also reduce the time cost required for fusing and enhancing the image.
[0131] In addition, when the technical solution of the present invention is not used, there is often a slight rotation or displacement of the lens between two or more imagings, and image feature matching is required when multiple light field images are fused and enhanced, which often results in a certain amount of information loss. However, when the technical solution of the present invention is used, the composite image obtained is obtained by a single imaging, and there is no information loss, which is conducive to improving the detection accuracy.
[0132] S104: performing enhancement processing on the lens image according to a preset image enhancement algorithm.
[0133] Optionally, the lens image is enhanced according to a preset image enhancement algorithm, including:
[0134] Input the lens image into a pre-trained image recognition model to determine the defect area in the lens image;
[0135] Mark the defect area and determine the coordinate range of the defect area in the lens image;
[0136] According to the coordinate range, nonlinear grayscale transformation and high-pass filtering are applied to the defective area;
[0137] Among them, nonlinear grayscale transformation includes: logarithmic transformation or exponential transformation.
[0138] Exemplarily, the image recognition model can adopt a convolutional neural network model. First, a lens image is acquired and defective areas in the lens image are annotated through manual annotation to form a training set. The training set is then input into the convolutional neural network model for training to obtain an image recognition model.
[0139] Exemplarily, a lens image is input into an image recognition model. If defects are identified in the input lens image, the coordinate range of the defective area in the lens image is determined based on the identified defects. If defects are not identified in the input lens image, the lens image is manually identified and the range of the defective area is determined manually.
[0140] Optionally, lens images in which defective areas are not identified by the image recognition model but are manually determined to have defective areas are collected as a data set, and the image recognition model is trained again to complete the model update and improve the accuracy of model recognition.
[0141] Optionally, the defective area in the lens image belongs to the details such as the edge or thin strips of the image and corresponds to the high-frequency component of the image spectrum. High-pass filtering can be used to allow the high-frequency component to pass smoothly, making the details such as the edge or thin strips of the image clear and achieving image sharpening; wherein, high-pass filtering can be implemented using a space-frequency method or a frequency domain method.
[0142] Specifically, a Gaussian kernel is first generated, and then the Gaussian kernel matrix is Fourier transformed according to the input parameters to achieve the conversion from the spatial domain or time domain to the frequency domain, and a frequency domain filter with a specific pattern and specific resolution is obtained, through which the image is filtered.
[0143] Optionally, the nonlinear transformation can selectively expand a certain grayscale range, while the grayscale of other ranges may be compressed; the nonlinear transformation can be used to perform grayscale processing on the defective area.
[0144] Exemplarily, the logarithmic transformation can be used to expand low-grayscale value pixels with a narrow range in the image and compress high-grayscale value pixels with a wide range in the input image, so that the original low-grayscale value pixel portion can be presented more clearly.
[0145] For example, the exponential transformation can selectively enhance the contrast of low grayscale areas or high grayscale areas according to different values of gamma Exponent.
[0146] S105, performing image analysis on the enhanced lens image to determine defects of the contact lens to be inspected.
[0147] For example, Figure 8 A bright field imaging image, a dark field imaging image, and a synthetic light field illumination image of a scratch defective lens according to an embodiment of the present invention; Figure 8 As shown:
[0148] Defective lenses include scratch defects. In bright field images, scratch defects are submerged in the printing ink of colored lenses and are difficult to identify. In dark field images, scratch defects can scatter dark field light, making them appear highlight features. In images illuminated by synthetic light fields, scratch defects can still scatter dark field light, making them appear highlight features while retaining the image features of the bright field. Scratch defects in contact lenses can be effectively detected without the need to conduct a combined analysis of bright field images and dark field images.
[0149] For example, Fig. 9 The bright field imaging image, dark field imaging image and synthetic light field illumination image of a lens with edge damage defect according to an embodiment of the present invention are shown; Fig. 9 As shown:
[0150] Defective lenses include edge damage defects. In bright field images, edge damage defects are reflected in the fluctuation of the black edge contour line of the lens, and its curve derivative does not change monotonically and continuously; in dark field images, edge damage defects are reflected in the fluctuation of the white edge contour line of the lens, and its curve derivative does not change monotonically and continuously; in images illuminated by synthetic light fields, edge damage defects are reflected in the fluctuation of both the black edge contour line caused by the bright field light source and the white edge contour line caused by the dark field, and their curve derivatives do not change monotonically and continuously; there is no need to perform a combined analysis of bright field images and dark field images, and it is directly possible to clearly analyze whether the lens has defects and the type of defects based on the images illuminated by synthetic light fields.
[0151] Optionally, the defect types that can be found using the technical solution of the present invention are not limited to Figure 8 and Fig. 9 The two defects described are defects that can be presented by various commonly used bright field light sources and dark field light sources. After reasonable light intensity distribution and beam splitter selection, they can always be well imaged by synthetic light beams.
[0152] For example, Fig.10 Schematic diagram of a contact lens production line detection link according to an embodiment of the present invention; Fig.10 As shown:
[0153] The link includes: a defect detection system 1001, which is Figure 5 The contact lens defect detection system in the packaging is used to detect the abnormal release of the contact lenses placed in the packaging box before the contact lenses are finally packaged, to ensure that there are no damage, lack of material, or multiple lenses. The packaging detection system 1003 is used to detect the abnormal pressing between the packaging box and the aluminum foil cover after the contact lenses are packaged, to ensure that there is no poor pressing.
[0154] It should be noted that the lighting systems of the pre-packet detection system and the packet detection system in the contact lens production line detection link both require planar light sources. Considering the waste of some leaked light sources in the optical lighting system of the present invention, an embodiment of the present invention provides a solution for reusing the leaked light sources.
[0155] For example, Figure 4 Based on the optical illumination system shown, Fig.11 FIG. 1 is a structural diagram of a solution for reusing a leaked light source according to an embodiment of the present invention. Fig.11 As shown, the structure includes:
[0156] A first light diffuser plate 1101 , a first transmission lens group 1102 , a second light diffuser plate 1103 , and a second transmission lens group 1104 .
[0157] Optionally, the first light diffuser plate 1101 reshapes and diffuses part of the light leaked from the second dark field illumination light source 403 and the third dark field illumination light source 404 into a uniformly emitted circular light spot, and transmits it to the pre-packaging detection system 1002 through the first transmission lens group 1102 to be used as a plane light source; the second light diffuser plate 1103 reshapes and diffuses part of the light leaked from the bright field illumination light source 401 and the first dark field illumination light source 402 into a uniformly emitted circular light spot, and transmits it to the pre-packaging detection system 1002 through the second transmission lens group 1104 to be used as a plane light source.
[0158] Optionally, the first transmission lens group 1102 should include at least two positive lenses for collecting, transmitting, and emitting the light beam uniformly emitted from 1101 .
[0159] Optionally, the second transmission lens group 1104 should include at least two positive lenses for collecting, transmitting, and emitting the light beam uniformly emitted from 1103 .
[0160] It should be noted that the technical solution in the present invention is not limited to the inspection of contact lenses, but can also be applied to defect inspection of products such as artificial lenses, OK lenses and glass lenses, or other industrial visual inspection equipment that requires switching between multiple different light fields.
[0161] The embodiment of the present invention provides a contact lens defect detection method and system, the contact lens defect detection method includes: setting a contact lens defect detection system according to the characteristics of the contact lens to be detected; wherein the characteristics of the contact lens to be detected include: type, focal length, defect position and detection distance, the contact lens defect detection system includes: multiple lighting sources and one or more beam splitters; combining multiple lighting sources through one or more beam splitters to form a synthetic light beam; irradiating the synthetic light beam to the surface of the contact lens to be detected and collecting the lens image of the contact lens to be detected; enhancing the lens image according to a preset image enhancement algorithm; performing image analysis on the enhanced lens image to determine the defect of the contact lens to be detected. The present invention adopts a non-coaxial optical lighting system, synthesizes a bright field lighting source and a dark field lighting source, and only performs a single illumination and image acquisition and analysis on the contact lens to be detected, so as to complete the defect detection of the contact lens, and adopts an image enhancement algorithm to enhance the collected lens image, which greatly improves the detection efficiency and accuracy, thereby improving the production efficiency of the contact lens, saving time and cost.
[0162] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but also should cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A contact lens defect detection method, characterized in that: The contact lens defect detection method comprises: A contact lens defect detection system is set up according to the characteristics of the contact lens to be detected; the characteristics of the contact lens to be detected include: type, focal length, defect location and detection distance, and the contact lens defect detection system includes: multiple illumination light sources and one or more beam splitters; Combining a plurality of illumination light sources into a composite light beam by one or more beam splitters; irradiating the synthesized light beam onto the surface of the contact lens to be tested and collecting the lens image of the contact lens to be tested; Performing enhancement processing on the lens image according to a preset image enhancement algorithm; The enhanced lens image is subjected to image analysis to determine defects of the contact lens to be inspected.
2. The contact lens defect detection method according to claim 1, characterized in that: The contact lens defect detection system is set according to the characteristics of the contact lens to be detected, comprising: Determining the number of the illumination light sources and the beam splitters according to the type of the contact lens to be tested; Wherein, the illumination light source comprises at least: a bright field illumination light source and a dark field illumination light source, and the positions of the light sources are not on the same optical axis; The beam splitter is used to synthesize the bright field illumination light source and the dark field illumination light source and transmit the synthesized light to the surface of the contact lens to be inspected; The dark field illumination light source is a circular array of light emitting diodes, and the circular array of light emitting diodes has a tilt angle deviating from 0 degrees.
3. The contact lens defect detection method according to claim 2, characterized in that: Also includes: If the contact lens to be tested is a myopic contact lens, the higher the myopia degree, the smaller the tilt angle value of the annular array of light emitting diodes; If the contact lens to be tested is a hyperopic contact lens, the higher the degree of hyperopia, the greater the tilt angle value of the annular array of light emitting diodes; If the defect position of the contact lens to be inspected is in the first peripheral arc area and the second peripheral arc area, the tilt angle of the annular array of light emitting diodes is set to a value greater than the first angle threshold; If the defect position of the contact lens to be inspected is in the optical zone, the tilt angle of the annular array of light emitting diodes is set to a value smaller than the second angle threshold; The tilt angle value of the annular array of light emitting diodes is inversely proportional to the distance value from the light source to the contact lens to be detected.
4. The contact lens defect detection method according to claim 2, characterized in that: The reflectivity and transmittance of the beam splitter are configured according to the contact lens testing requirements: If the relative strength relationship of the two light sources needs to remain unchanged after passing through the beam splitter, the beam splitter in the contact lens defect detection system is selected to be 50% transmission / 50% reflection; If the rate of change of the relative strength of the three light sources after passing through the beam splitter is required to be the lowest, the first beam splitter in the contact lens defect detection system uses 50% transmission / 50% reflection, and the second beam splitter uses 70% transmission / 30% reflection; If the relative strength relationship of the four light sources needs to remain unchanged after passing through the beam splitter, the three beam splitters in the contact lens defect detection system all use 50% transmission / 50% reflection.
5. The contact lens defect detection method according to claim 1, characterized in that: The step of performing enhancement processing on the lens image according to a preset image enhancement algorithm comprises: Inputting the lens image into a pre-trained image recognition model to determine a defect area in the lens image; Marking the defect area and determining the coordinate range of the defect area in the lens image; According to the coordinate range, nonlinear grayscale transformation and high-pass filtering are applied to the defective area; the nonlinear grayscale transformation includes logarithmic transformation or exponential transformation.
6. The contact lens defect detection method according to claim 2, characterized in that: Also includes: Reshaping and diffusing part of the light leaked from the dark field illumination light source and the bright field illumination light source after passing through the beam splitter into a uniformly emitted circular light spot through a light diffusion plate; The uniformly emitted circular light spot is transmitted to the pre-packaging detection system or the packaging detection system of the contact lens through the transmission lens group and used as a plane light source.
7. A contact lens defect detection system, characterized in that: The contact lens defect inspection system includes: An optical illumination system, comprising a plurality of illumination light sources and one or more beam splitters, wherein the plurality of illumination light sources at least include: a bright field illumination light source and a dark field illumination light source, and the positions of the light sources are not on the same optical axis, and the beam splitter is used to synthesize the bright field illumination light source and the dark field illumination light source and transmit them to the surface of the contact lens to be inspected; used to provide the light source required for contact lens inspection, and also used to collect the light leaked after passing through the beam splitter and process it to obtain a planar light source; A lens carrying unit, used for carrying the contact lens to be tested; A loading device for placing the contact lenses to be tested; The unloading device is used to grab the contact lenses to be tested and sort the good ones from the defective ones; An image acquisition unit, used for acquiring the lens image of the contact lens to be inspected; An image analysis unit, used to detect and analyze defect features of the collected lens image, specifically used to enhance the lens image according to a preset image enhancement algorithm; and to perform image analysis on the enhanced lens image to determine the defect of the contact lens to be detected; A display unit, used for displaying the test results; The stepping drive device is used to adjust the positions of the optical illumination system and the image acquisition unit to ensure the alignment of the optical illumination system and the image acquisition unit with the contact lens to be inspected.
8. The contact lens defect detection system according to claim 7, characterized in that: Also includes: The leaked light processing device is used to collect the light leaked after passing through the beam splitter and process it to obtain a planar light source.
9. The contact lens defect detection system according to claim 8, characterized in that: The leakage light processing device comprises: A plurality of light diffusion plates, used for reshaping and diffusing part of the light leaked from the dark field illumination light source and the bright field illumination light source after passing through the beam splitter into a uniformly emitted circular light spot; A plurality of transmission lens groups are used to transmit the uniformly emitted circular light spots to a pre-packaging detection system or a packaging detection system of contact lenses to be used as a plane light source.
Citation Information
Patent Citations
Automatic defect detecting equipment and detecting method for contact lenses
CN105115989A
Optical element defect detection method based on machine vision technology
CN109030495A