A high-precision multi-light field contact lens edge defect detection method and device based on Cartesian coordinate system

Through the multi-light field detection method based on the Cartesian coordinate system, the edge defects of contact lenses are automatically extracted, which solves the problems of low efficiency and poor accuracy of manual inspection, and achieves high-precision defect detection and improved production efficiency.

CN119338796BActive Publication Date: 2025-09-16SIGMA SQUARES (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411474928.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-09-16
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

In the existing technology, contact lens edge detection mainly relies on manual detection, which has the problems of high false detection and missed detection rate and low efficiency.

Method used

A high-precision multi-light field detection method based on the Cartesian coordinate system is adopted. By obtaining the original multi-light field images of the printed contact lens immersed in the glass bowl, the geometric features and contour features of the glass bowl are extracted after preprocessing. The edge defect detection is carried out by combining the bright field and dark field images to realize automated identification.

Benefits of technology

It improves the accuracy and efficiency of contact lens edge defect detection, reduces labor costs, and improves production yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338796B_ABST
    Figure CN119338796B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of cloud and machine vision technology, specifically a high-precision multi-light field contact lens edge defect detection method and device based on a Cartesian coordinate system, which obtains a multi-light field original image of a printed contact lens immersed in water in a glass bowl, pre-processes the multi-light field original image to obtain a bright field image, a dark field image, and a pre-processed image; performs glass bowl detection on the pre-processed image, and extracts the geometric features of the glass bowl when a glass bowl exists in the pre-processed image; extracts contour features of the printed contact lens in the glass bowl area based on the geometric features of the glass bowl; and then performs rough inspection and Cartesian coordinate system edge defect detection based on the above-extracted images and features. This application further utilizes the contact lens images captured by a high-resolution camera, performs automated identification on the images, and determines whether the corresponding products are normal or not, so as to reduce labor costs, save time, and improve production yield.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud and machine vision technology, and specifically to a high-precision multi-light field contact lens edge defect detection method and device based on a Cartesian coordinate system. Background Art

[0002] The main manufacturing methods for contact lenses include turning and molding. Due to the different lens materials, various types of defects are prone to occur during the production process. For example, lens edge contact, deformation, multiple lenses, and abnormal size.

[0003] In the prior art, edge detection of printed contact lenses is generally performed manually, which is prone to various errors and omissions, and is inefficient and low-cost. Summary of the Invention

[0004] In view of this, an object of the present invention is to provide a high-precision multi-light field contact lens edge defect detection method and device based on a Cartesian coordinate system to solve the problems in the background technology.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] The present invention provides a high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system, comprising the steps of:

[0007] Acquire a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and pre-process the multi-light-field original image to obtain a bright-field image, a dark-field image, and a pre-processed image, wherein the pre-processed image is obtained by filtering the bright-field image;

[0008] Performing glass bowl detection on the pre-processed image and extracting geometric features of the glass bowl when the glass bowl exists in the pre-processed image; performing contour feature extraction on the printed contact lens in the glass bowl area based on the geometric features of the glass bowl;

[0009] The printed contact lens is roughly inspected based on the contour features of the printed contact lens to obtain a rough inspection result; the printed contact lens is edge bubble detected based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and the printed contact lens is edge defect detected in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain an edge defect detection result.

[0010] The present application also provides a high-precision multi-light field contact lens edge defect detection device based on a Cartesian coordinate system, which is characterized by comprising:

[0011] an acquisition and preprocessing module, configured to acquire a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and preprocess the multi-light-field original image to obtain a bright-field image, a dark-field image, and a preprocessed image, wherein the preprocessed image is obtained by filtering the bright-field image;

[0012] a feature extraction module, configured to detect a glass bowl in the preprocessed image and, if a glass bowl exists in the preprocessed image, extract geometric features of the glass bowl; and extract contour features of the printed contact lens within the glass bowl region based on the geometric features of the glass bowl;

[0013] The detection module is used to perform a rough inspection on the printed contact lens based on the contour features of the printed contact lens to obtain a rough inspection result; perform edge bubble detection on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and perform edge defect detection on the printed contact lens in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain an edge defect detection result.

[0014] The beneficial effects of the present invention are as follows: a high-precision multi-light field contact lens edge defect detection method and device based on a Cartesian coordinate system is provided, which obtains a multi-light field original image of a printed contact lens immersed in water in a glass bowl, and pre-processes the multi-light field original image to obtain a bright field image, a dark field image, and a pre-processed image; performs glass bowl detection on the pre-processed image, and extracts the geometric features of the glass bowl when a glass bowl exists in the pre-processed image; extracts contour features of the printed contact lens in the glass bowl area based on the geometric features of the glass bowl; and then performs rough inspection and Cartesian coordinate system edge defect detection based on the above-extracted images and features. This application further utilizes the contact lens images captured by a high-resolution camera, performs automated identification on the images, and determines whether the corresponding products are normal or not, so as to reduce labor costs, save time, and improve production yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0016] Figure 1 This is the topological diagram of the technical solution in this application;

[0017] Figure 2 This is a schematic diagram of the computing algorithm in the cloud service of this application;

[0018] Figure 3 This is a schematic diagram of the parameter configuration process in the implementation of this application;

[0019] Figure 4 This is a flow chart of a high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system shown in one embodiment of the present application;

[0020] Figure 5 This is a schematic diagram of the preprocessing process in one embodiment of the present application;

[0021] Figure 6 Schematic diagram of the process of glass bowl detection in one embodiment of the present application;

[0022] Figure 7 A schematic diagram of the process of extracting the edge profile of the lens in this application;

[0023] Figure 8 This is a schematic diagram of the process of obvious defects on the lens in this application;

[0024] Figure 9 Schematic diagram of the process of edge bubble detection in this application;

[0025] Figure 10 This is a schematic diagram of the process of lens lace detection in this application;

[0026] Figure 11 Schematic diagram of the process for detecting severe defects on the edge of a lens in this application;

[0027] Figure 12 This is a schematic diagram of the process of lens edge tear detection in this application;

[0028] Figure 13 This is a schematic diagram of the process of detecting residual material defects on the edge of the lens in this application. DETAILED DESCRIPTION

[0029] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0030] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. Therefore, the drawings only show the layers related to the present invention and are not drawn according to the number, shape and size of the layers in actual implementation. In actual implementation, the type, quantity and proportion of each layer can be changed arbitrarily, and the layer layout type may also be more complicated.

[0031] In the following description, numerous details are set forth to provide a more thorough explanation of the embodiments of the present invention; however, it is apparent to one skilled in the art that the embodiments of the present invention may be practiced without these specific details.

[0032] Figure 1 This is the topological diagram of the technical solution in this application, such as Figure 1 As shown, in this application, the printed contact lens product is photographed by an industrial camera to obtain a corresponding grayscale image; the image is transmitted to an industrial computer and forwarded to a cloud server via the industrial computer for defect detection; the product inspection result is obtained and pushed to the industrial computer and subsequent data processing center.

[0033] Figure 2 This is a schematic diagram of the computing algorithm in the cloud service of this application, such as Figure 2 As shown, the algorithm of this application is mainly composed of 6 modules, including:

[0034] A. Initialization configuration module: responsible for initializing the configuration of the detection system, reading, loading, color space conversion, and noise reduction of the contact lens images collected by the camera to reduce the interference caused by environmental noise, and finally generating the process image;

[0035] B. Glass bowl detection module: responsible for extracting the small bowl ROI and determining the size of the small bowl.

[0036] C. Lens rough inspection module: Responsible for using edge extraction algorithms on the process image to extract the edge contour of the lens and detect obvious defects on the lens, including lens edge adhesion, deformation, multiple lenses, and size abnormalities;

[0037] D. Lens edge detection module: responsible for two functions: edge bubble extraction and edge defect detection in Cartesian coordinate system;

[0038] E. Result analysis and generation module: Integrate and process the results in modules B to D to obtain the final lens test results.

[0039] F. Output module: Package and output the results in step E.

[0040] Before conducting formal testing, this application needs to load relevant configuration parameters. Figure 3 This is a schematic diagram of the parameter configuration process in the implementation of this application. Figure 3 As shown in the figure, the parameter configuration process includes:

[0041] A1. The initialization configuration process is as follows.

[0042] A11. Import the configuration file. This parameter configuration file contains lens system parameters, light source configuration parameters, algorithm configuration parameters, system setting parameters, etc. Among them, loading system configuration parameters sets whether to enable the surface detection module and whether to output images; loading algorithm parameters includes extraction parameters and analysis parameters, etc. The details are as follows:

[0043] For module B: small bowl area BlisterArea; effective small bowl radius (BlisterRL, BlisterRU), the former is the lower bound, the latter is the upper bound;

[0044] For module C: lens edge determination threshold T touch , the major-minor axis difference judgment threshold T abdif , lens aspect ratio threshold T edge_asp , lens size diameter setting threshold range LensDiaRange;

[0045] For module D: lace threshold T flower , minimum edge detection size EMinL, minimum bright field edge detection grayscale BEMinG, minimum dark field edge detection grayscale DEMinG;

[0046] For module E: defect priority configuration table Priority;

[0047] Read and load the light source configuration parameters and verify them. Load the light source parameters used by the system and compare them with the industrial computer light source system parameters. If the light source settings are inconsistent, return the corresponding error code and exit the system. Otherwise, enter A14.

[0048] Initialize the image object related data structure used by the algorithm. In this embodiment, it includes the following:

[0049] Input image group, ImagePacket;

[0050] Apply the image group, LensImageGroup;

[0051] Defect data group, Set;

[0052] Initialize the relevant result objects used by the algorithm. In this embodiment, it includes the following:

[0053] Step B, glass bowl detection result, BlisterResult;

[0054] Step C, edge extraction result, LensEdgeExtRes;

[0055] Step C, lens rough inspection result, LensRoughRes;

[0056] Step D, lens edge detection result, LensEdgeRes;

[0057] Step E, detecting the final result, LensResult;

[0058] A12. Read and load the light source configuration parameters and verify them. Load the light source parameters used by the system and compare them with the industrial computer light source system parameters. If the light source settings are inconsistent, return the corresponding error code and exit the system. Otherwise, enter A14.

[0059] A13. Initialize the image object related data structure used by the algorithm. In this embodiment, the following is included:

[0060] Input image group, ImagePacket;

[0061] Apply the image group, LensImageGroup;

[0062] Polar coordinate image group, LensPolarImageGroup;

[0063] Defect data group, Set;

[0064] A14. Initialize the relevant result objects used by the algorithm. In this embodiment, the following is included:

[0065] Step B, glass bowl detection result, BlisterResult;

[0066] Step C, edge extraction result, LensEdgeExtRes;

[0067] Step C, lens rough inspection result, LensRoughRes;

[0068] Step D, lens edge detection result, LensEdgeRes;

[0069] Step E: Detect the final result, LensResul

[0070] Figure 4 FIG. 1 is a flow chart of a high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system in one embodiment of the present application. Figure 4 As shown in the figure, a high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system in this embodiment may include the following steps:

[0071] S410, acquiring a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and preprocessing the multi-light-field original image to obtain a bright-field image, a dark-field image, and a preprocessed image, wherein the preprocessed image is obtained by filtering the bright-field image;

[0072] Figure 5 This is a schematic diagram of the preprocessing process in one embodiment of the present application, as shown in FIG. Figure 5 As shown, the process of preprocessing the multi-light field original image in this application includes:

[0073] A2, preprocessing:

[0074] A21 reads the image data passed in by the camera, segments the image data according to the multi-light field settings of bright field, dark field, and point light source, i.e., the multi-light field raw image, converts the image data from RAW to RGB format, and temporarily stores it in ImagePacket.

[0075] A22 transforms all light field image data in ImagePackett in A21 into grayscale space, obtains grayscale images and stores them in the corresponding array in LensImageGroup, specifically including bright field image BrightImage, dark field image DarkImage, and point light source image.

[0076] A23 performs Gaussian filtering with a kernel of 3×3 and normalization stretching on the bright field image BrightImage in the LensImageGroup in A22 to obtain a noise-reduced preprocessed image ProcessImage, the purpose of which is to reduce interference caused by environmental noise.

[0077] S420, performing glass bowl detection on the pre-processed image, and extracting geometric features of the glass bowl when the glass bowl exists in the pre-processed image; and extracting contour features of the printed contact lens in the glass bowl area based on the geometric features of the glass bowl;

[0078] Figure 6 This is a flow chart of glass bowl detection in one embodiment of the present application. Figure 6 As shown, glass bowl testing includes:

[0079] B. Glass bowl detection module: This module is responsible for applying a segmentation algorithm to the preprocessed image ProcessImage and determining whether the extracted pixels contain a glass bowl and whether the size matches the requirements. Specifically, it includes:

[0080] B1, load the pre-processed image ProcessImage obtained in A23, the effective small bowl radius (BlisterRL, BlisterRU), and the glass bowl area BlisterArea configured in A11;

[0081] B2, binarizing the pre-processed image and extracting the outline features of the glass bowl in the binarized pre-processed image; applying a segmentation algorithm to the pre-processed image ProcessImage in B1 to perform binarization segmentation and extract the corresponding region of interest (ROI);

[0082] B3. Fit a minimum inscribed circle to the glass bowl outline whose area is larger than the pre-configured BlisterArea to obtain the radius R and center C of the minimum inscribed circle. First, filter the area of ​​the outline extracted in B2. If it is larger than BlisterArea in B1, fit a minimum inscribed circle to the outline and obtain the radius R and center C of the circle. Then proceed to B4. If neither of the conditions are met, terminate.

[0083] B4. Compare the radius R of the minimum inscribed circle with a preconfigured radius range (BlisterRL, BlisterRU). When the radius of the minimum inscribed circle falls within the preconfigured radius range, determine that a glass bowl exists in the preprocessed image, and use the radius and center of the minimum inscribed circle as geometric features of the glass bowl.

[0084] Specifically, the radius R obtained in B3 is judged using (BlisterRL, BlisterRU) in B1. If R is not within the range, the result item in the glass bowl detection result BlisterResult is assigned the value "No Blister". Otherwise, this module is considered to have passed and BlisterResult is assigned the value "Pass" and the process proceeds to B5. The expression is as follows:

[0085]

[0086] B5. Store the radius R and center C obtained in B3 in BlisterResult.

[0087] S430, performing a rough inspection on the printed contact lens based on the contour features of the printed contact lens to obtain a rough inspection result; performing edge bubble detection on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and performing edge defect detection on the printed contact lens in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain an edge defect detection result.

[0088] A rough inspection of printed contact lenses is performed based on the contour features of the printed contact lenses, and the rough inspection results are obtained, including:

[0089] Extracting contour features of the printed contact lens within the glass bowl region based on the pre-processed image and the geometric features of the glass bowl to obtain an elliptical contour of the printed contact lens;

[0090] Obvious defect detection is performed based on the elliptical contour of the printed contact lens and the geometric features of the glass bowl to obtain a rough inspection result.

[0091] The details are as follows:

[0092] C. Lens rough inspection is responsible for: extracting the edge contour of the lens and detecting obvious defects of the lens, including lens edge adhesion, deformation, multiple lenses, and abnormal size, etc. Specifically including:

[0093] C1. Contour extraction, Figure 7 This is a schematic diagram of the process of extracting the edge profile of the lens in this application, such as Figure 7 Shown, including:

[0094] C11. Filter and binarize the preprocessed image to obtain a binary image C1a. Specifically, perform two low-pass filtering operations on the preprocessed image ProcessImage generated by A, wherein the first filtering kernel size is 5×5, and the second filtering kernel size is 3×3 Gaussian kernel, to obtain a filtered image Filtered. Then, perform an adaptive algorithm on the filtered image Filtered to obtain a binary image C1a.

[0095] C12. Construct a BlisterROI of the glass bowl region based on the geometric features of the glass bowl. Specifically, use the small bowl fitting circle information (radius R and center C) stored in BlisterResult in B to construct the small bowl ROI, BlisterROI.

[0096] C13. Construct a first feature image C1fea based on the glass bowl region BlisterROI and the binary image C1a, wherein the mathematical expression of the first feature image C1fea is:

[0097]

[0098] Where C1fea i,j is the pixel with coordinates (i, j) in the first feature image C1fea, C1a i,j is the pixel with coordinates (i, j) in the binary image C1a, BlisterROI i,j is the pixel with coordinates (i, j) in the glass bowl area BlisterROI;

[0099] C14, extracting the contour features in the first feature image C1fea, and extracting the inner contour inner and outer contour outer of the printed contact lens based on pre-built lens parameters, wherein the lens parameters include the major and minor axis difference determination threshold T abdif , lens aspect ratio threshold T edge_asp , set the lens diameter threshold interval LensDiaRange; fit the outer contour of the printed contact lens to obtain the ellipse contour. Save it to the data structure corresponding to LensEdgeExtRes and enter C 1 5; if neither the inner nor the outer contour exists, it is considered that there is no lens, and the result item in LensEdgeExtRes is assigned the value "NoLens" and exit;

[0100] C15. Verify and integrate the internal and external contours saved in C14, and supplement the relevant data in LensEdgeExtRes, including the effective ROI area BlisterROI, the lens edge fitting ellipse ellipse, the number of detected contours edge_num, the edge feature data C1fea, etc.

[0101] C2, lens obvious defect detection, Figure 8 This is a schematic diagram of the process of obvious defects in the lens in this application, such as Figure 8 Shown, including:

[0102] C21. Using the BlisterROI and ellipse obtained by integrating LensEdgeExtRes in C15, the lens edge defect is determined. This includes generating a lens area image based on the ellipse outline, and using an AND operation to extract the intersection image C21Img of the glass bowl area BlisterROI and the lens area image. If the number of pixels in the intersection image C21Img exceeds a preset threshold, a lens edge defect is determined to exist.

[0103] If the number of pixel values ​​at the intersection is greater than the lens edge parameter threshold T in A12 touch , then the lens is considered to be touching the edge, the result item in LensRoughRes is assigned the value "Touch" and exit, otherwise the next step, the expression is as follows;

[0104]

[0105] C22. When the printed contact lens only has an outer contour, determining that the lens has a large-scale edge defect;

[0106] Use edge_num in C15 to identify large-scale lens defects. If edge_hum is not 2, that is, only the outer edge exists but not the inner edge, then the lens is considered to have large-scale edge defects. The result item in LensRoughRes is assigned to "EdgeDefect" and the process exits. Otherwise, the next step is as follows:

[0107]

[0108] C23. Extracting the major axis a and the minor axis b of the elliptical outline ellipse, calculating the difference between the major axis a and the minor axis b, and calculating the aspect ratio of the major axis a and the minor axis b; if the difference is greater than a preset major-minor axis difference threshold, or if the aspect ratio is less than a preset aspect ratio threshold, determining that the lens has a deformation defect;

[0109] The lens deformation is judged by using the major axis a and minor axis b in the ellipse in C15. If the difference between the major axis and the minor axis is greater than the difference between the major axis and the minor axis in A13, the threshold T is set. abdif , the lens is considered deformed; in addition, the aspect ratio of a and b is checked. If the aspect ratio is less than the preset lens aspect ratio threshold T edge_asp , the lens is considered deformed. If the lens is deformed, the result item in LensRoughRes is assigned the value "Distort" and exits. Otherwise, the next step is as follows:

[0110]

[0111] C24, extracting the ellipse center and assumed radius r of the ellipse outline, wherein the assumed radius Performing polar coordinate expansion on the contour features in the first feature image Clfea based on the ellipse center and the assumed radius r, and calculating the average and variance of the polar diameters of all contour pixel points in the polar coordinates. A filtering range based on the 3sigma principle is established based on the average and variance of the polar diameters. Contour points that do not fall within the filtering range are considered outliers. When the number of outliers is greater than a preset multiple-lens determination threshold, it is determined that the lens has multiple defects.

[0112] Use C1fea and ellipse in C15 to detect whether the lens is "multiple". For C1fea, use the ellipse center EC in ellipse and the assumed radius of the major and minor axes. Polar coordinate expansion is performed, and an outlier detection algorithm based on mathematical statistics is used to detect "multi-pieces". That is, the mean and variance of the polar diameters of all contour pixels in polar coordinates are used to construct a filtering range based on the 3sigma principle. Contour points that do not fall into the filtering range are regarded as outliers. When the number of outliers is greater than the preset multi-piece judgment threshold, it is considered to meet the "multi-piece" feature. The result item in LensRoughRes is assigned to "MutilLens" and the algorithm exits. Otherwise, the next step is as follows:

[0113]

[0114] C25. Extract the major axis a and minor axis b of the ellipse outline, and use the major axis a and minor axis b in the ellipse in C15 to determine the size of the lens. Calculate the mean d=mean(a, b) of the major axis a and the minor axis b, consider d to be the lens diameter, and compare the mean d of the major axis a and the minor axis b with the preset lens size diameter setting threshold interval LensDiaRange. When the mean of the major axis a and the minor axis b is not within the preset lens size diameter setting threshold interval LensDiaRange, it is determined that the lens has a size non-compliant defect. If it is not within this size range, it is considered that the size does not match, and the result item in LensRoughRes is assigned the value "Offsize" and exit. Otherwise, the next step, the expression is as follows:

[0115]

[0116] D. Lens edge detection module: This module is responsible for applying the edge extraction algorithm to the pre-processed image ProcessImage generated by A. It is mainly responsible for three functions: edge bubble extraction, edge defect detection in the Cartesian coordinate system, and edge defect detection in the polar coordinate system.

[0117] D1, edge bubble detection, Figure 9 This is a schematic diagram of the process of edge bubble detection in this application, such as Figure 9 Shown, including:

[0118] D11. Extract the lens edge region of the bright field image based on the ellipse outline ellipse. Specifically, construct the lens edge region D1ROI by combining the ellipse information in LensEdgeExtRes in C15 and the bright field image BrightImage in LensImageGroup, using the parameters of the major axis a, the minor axis b, and the ellipse center EC.

[0119] D12, sequentially filtering, morphologically processing, and binarizing the bright field image to obtain a bright field binary image D1bin;

[0120] D13, extracting edge features D1feature from the bright field binary image based on the lens edge area;

[0121] D14. Extract edge features from the brightfield binary image that match bubble characteristics to obtain edge bubble defect detection results. Specifically, it is necessary to combine the brightfield image data BrightImage and the darkfield image data DarkImage in LensImageGroup to perform feature analysis and filtering on the edge feature D1feature, and store the features that match edge bubbles in D1EB. The bubble characteristics include edge roundness greater than a preset roundness threshold, edge length and width greater than a preset bubble aspect ratio threshold, and outline grayscale less than a preset bubble grayscale threshold.

[0122] D15, reconstruct the outline of the bubble feature to obtain an edge bubble template image. Finally, use D1EB in D14 to reconstruct the edge bubble template image EdgeBubble in LensImageGroup to generate the corresponding edge bubble template image EdgeBubble.

[0123] D2. Defect detection based on Cartesian coordinates, mainly including:

[0124] In a Cartesian coordinate system, performing lens edge detection and lens edge severe defect detection on the printed contact lens based on the contour features of the printed contact lens to obtain a lace detection result and a lens edge severe defect detection result;

[0125] In a Cartesian coordinate system, lens edge tear detection and lens edge residual material defect detection are performed on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain lens edge tear detection results and lens edge residual material defect detection results.

[0126] The specific process is as follows:

[0127] D21, Lens lace detection based on profile statistics, Figure 10 This is a flow chart of the lens lace detection process in this application, such as Figure 10 Shown, including:

[0128] D211. Use the convex hull extraction algorithm to extract the inner and outer contours of the printed contact lens, respectively, to obtain the inner contour convex hull vertex inner_pt and the outer contour convex hull vertex outter_p;

[0129] D212, calculating the Euclidean distance between the vertices of the inner contour convex hull and the vertices of the outer contour convex hull one by one, and when the Euclidean distance is greater than a preset lace threshold, determining that the printed contact lens has a lace defect and storing the lace position;

[0130] Specifically, loop over inner_pt and outer_pt, and perform Euclidean distance judgment between them. If the lace threshold T in A11 is met, flower , consider this point as the location of the "lace" and store it in Set;

[0131] D22, detection of severe defects on the edge of the lens, Figure 11 This is a flow chart of the detection of severe defects on the edge of the lens in this application, such as Figure 11 Shown, including:

[0132] D221. Use the convex hull extraction algorithm on the inner contour stored in LensEdgeExtRes in C15 to obtain the inner contour convex hull image inner_hull.

[0133] D221, performing morphological processing on the inner contour convex hull image inner_hull to obtain an inner edge image inner_edg; performing a difference operation on the inner edge image inner_edg and the outer contour outter to obtain a first severe edge feature D22feature;

[0134] D223. Extract the minimum circumscribed rectangle of the first severe edge feature D22feature, and when the length of the minimum circumscribed rectangle of the first severe edge feature D22feature is greater than the preset minimum edge detection size, determine that the printed contact lens has a severe defect on the lens edge; if satisfied, store to Set; otherwise, next.

[0135] D23, lens edge tear detection, Figure 12 This is a schematic diagram of the process of lens edge tear detection in this application, such as Figure 12 Shown, including:

[0136] D231. Use the convex hull extraction algorithm on the inner contour stored in LensEdgeExtRes in C15 to obtain the inner contour convex hull image inner_hull.

[0137] D232, performing morphological processing on the inner contour convex hull image inner_hull to obtain an inner edge image inner_edg;

[0138] D233, performing a median filter of size 3 on the inner edge image to obtain a median filtered image to eliminate noise; and performing bubble interference elimination on the median filtered image based on the edge bubble template image EdgeBubble to obtain a second severe edge feature D23feature;

[0139] When performing bubble interference elimination, the features in the edge bubble template image EdgeBubble in the median filter image can be eliminated. The same applies to the bubble interference elimination in the following text.

[0140] D234. Extract the geometric features of the second severe edge feature D23feature, where the geometric features of the second severe edge feature D23feature include length, width, aspect ratio, roundness, convexity, sharpness, and rectangularity. When the geometric features of the second severe edge feature meet a preset edge tearing condition, determine that the printed contact lens has an edge tearing defect; if the edge tearing condition is met, store the corresponding minimum circumscribed rectangle in Set; otherwise, discard it.

[0141] Edge tearing conditions include:

[0142]

[0143] This means that for the feature image to be judged, its following geometric features satisfy:

[0144] The length is greater than the preset minimum tear detection length Min_spL;

[0145] The width width is greater than the preset minimum tear detection width Min_spW;

[0146] The aspect ratio aspect is within the preset aspect ratio tear detection range (Min_spASP, Max_spASP), where Min_spASP is the lower limit of the aspect ratio tear detection range and Max_spASP is the upper limit of the aspect ratio tear detection range;

[0147] The roundness is within the preset roundness tear detection range (Min_spRD, Max_spRD), where Min_spRD is the lower limit of the roundness tear detection range and Max_spRD is the upper limit of the roundness tear detection range;

[0148] The density convexity is within the preset density tear detection range (Min_spConv, Max_spConv), where Min_spConv is the lower limit of the density tear detection range and Max_spConv is the upper limit of the density tear detection range;

[0149] The sharpness is within the preset sharpness tear detection range (Min_spsharp, Max_spsharp), where Min_spsharp is the lower limit of the sharpness tear detection range and Max_spsharp is the upper limit of the sharpness tear detection range;

[0150] The rectangularity is within a preset rectangularity tear detection range (Min_spRL, Max_spRL), where Min_spRL is the lower limit of the rectangularity tear detection range, and Max_spRL is the upper limit of the rectangularity tear detection range.

[0151] D24, detection of residual material defects on the edge of the lens, Figure 13 This is a flow chart of the lens edge residual material defect detection process in this application, such as Figure 13 Shown, including:

[0152] D241, fitting the outer contour outter of the printed contact lens to obtain the outer contour ellipse outter_ellipse;

[0153] D242, calculate the Euclidean distance dis between the center D24EC (x, y) of the outer contour ellipse and all points of the outer contour i and angle i , wherein the Euclidean distance dis and the angle angle i The mathematical expression is:

[0154] dis i =sqrt((xp ix ) 2 +(yp iy ) 2 )

[0155]

[0156] In the formula, (i≤n), where (p ix , P iy ) is the coordinate of each outer contour point, n is the length of the outer contour point, and finally the arrays dis and angle are obtained;

[0157] dis=(dis1, dis2,..., dis i )

[0158] angle=(angle1,angle2,...,angle i )

[0159] D243, Euclidean distance dis based on all points i and angle i Generate a Euclidean distance set dis and an angle set angle, perform normalization filtering and smoothing processing on the Euclidean distance set and the angle set, and generate a normalized, filtered and smoothed Euclidean distance set norm_dis;

[0160] D244, Euclidean distance set norm_dis and angle set angle based on normalized filtering and smoothing i Generate outer contour image fit img ;

[0161] D245, fitting the outer contour image based on the edge bubble template image EdgeBubble img Eliminate bubbles and obtain the second feature image D24feature;

[0162] D246. Perform contour feature extraction on the second feature image. The contour features include length', width', aspect ratio', roundness', convexity', sharpness', and rectangularity'. When the contour features of the second feature image meet the preset edge residual material defect conditions, it is determined that the printed contact lens has residual material defects (FLASH defects). If the edge residual material defect conditions are met, the corresponding minimum circumscribed rectangle is stored in Set; otherwise, it is discarded.

[0163] Residue defects refer to defects such as burrs and curling that occur on the edges of contact lenses when they are cut.

[0164] Among them, the edge material defect conditions include:

[0165]

[0166] This means that for the feature image to be judged, its following geometric features satisfy:

[0167] The length 'length' is greater than the preset minimum residual material detection length Min_flL;

[0168] The width 'width' is greater than the preset minimum residual material detection width Min_flW;

[0169] The aspect ratio aspect′ is within the preset aspect ratio residual material detection range (Min_fIASP, Max_fIASP), where Min_flASP is the lower limit of the aspect ratio residual material detection range, and Max_flASP is the upper limit of the aspect ratio residual material detection range;

[0170] The roundness' is within the preset roundness residual material detection range (Min_flRD, Max_flRD), where Min_flRD is the lower limit of the roundness residual material detection range and Max_flRD is the upper limit of the roundness residual material detection range;

[0171] The density convexity′ is within the preset density residual material detection range (Min_flConv, Max_flConv), where Min_flConv is the lower limit of the density residual material detection range and Max_flConv is the upper limit of the density residual material detection range;

[0172] The sharpness' is within the preset sharpness residual detection range (Min_flsharp, Max_flsharp), where Min_flsharp is the lower limit of the sharpness residual detection range and Max_flsharp is the upper limit of the sharpness residual detection range;

[0173] The rectangularity' is within a preset rectangularity residual material detection interval (Min_flRL, Max_flRL), where Min_flRL is the lower limit value of the rectangularity residual material detection interval, and Max_flRL is the upper limit value of the rectangularity residual material detection interval.

[0174] E. Result Analysis and Generation Module: This module is responsible for comprehensively judging the above-mentioned glass bowl inspection results, lens rough inspection results, lens edge inspection results, and surface inspection results by combining them with the project defect priority file, and outputting the final results and corresponding annotation information for the lens. Specifically, it includes:

[0175] E1. Initialize the result data in LensResult to "Pass";

[0176] E2. Search BlisterResult in module B and LensEdgeExtRes and LensRoughRes in module C. If any of the results in the three modules is not "Pass", assign the same defect code to LensResult.result and copy the relevant annotation data to the data structure corresponding to LensResult. Then go to E5. Otherwise, go to E3.

[0177] E3. Determine the length of the defect set in module D. If the length is 0, end this module; otherwise, proceed to E4.

[0178] E4. Load the Priority data from A11, build a priority queue, prioritize the defect codes in Set, assign the highest-priority defect code to LensResult.result, and copy the relevant annotation data to the data structure corresponding to LensResult.

[0179] E5. According to the corresponding detection results, output the corresponding detection information and annotation information, and end this module.

[0180] F. Result output: Package and output the result in step E.

[0181] F1. Combine the system parameters in A14 to package the output results. If you need to draw an image to mark the location of the defect, use the relevant position coordinates of module F, such as min_rect.

[0182] F2. Output the product inspection result Res corresponding to the image analyzed in step F through the relevant API, and present the result to the corresponding front-end display interface and related data processing center, such as physical software, Web, mobile APP, etc.

[0183] The present invention provides a high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system. The method obtains a multi-light field original image of a printed contact lens immersed in water in a glass bowl, and pre-processes the multi-light field original image to obtain a bright field image, a dark field image, and a pre-processed image; performs glass bowl detection on the pre-processed image, and extracts the geometric features of the glass bowl when a glass bowl exists in the pre-processed image; extracts contour features of the printed contact lens in the glass bowl area based on the geometric features of the glass bowl; and then performs a rough inspection and Cartesian coordinate system edge defect detection based on the extracted images and features. The present application further utilizes the contact lens images captured by a high-resolution camera, performs automated identification on the images, and determines whether the corresponding product is normal or not, so as to reduce labor costs, save time, and improve production yield.

[0184] The present application also provides a high-precision multi-light field contact lens edge defect detection device based on a Cartesian coordinate system, comprising:

[0185] an acquisition and preprocessing module, configured to acquire a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and preprocess the multi-light-field original image to obtain a bright-field image, a dark-field image, and a preprocessed image, wherein the preprocessed image is obtained by filtering the bright-field image;

[0186] a feature extraction module, configured to detect a glass bowl in the preprocessed image and, if a glass bowl exists in the preprocessed image, extract geometric features of the glass bowl; and extract contour features of the printed contact lens within the glass bowl region based on the geometric features of the glass bowl;

[0187] The defect detection module is used to perform a rough inspection on the printed contact lens based on the contour features of the printed contact lens to obtain a rough inspection result; perform edge bubble detection on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and perform edge defect detection on the printed contact lens in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain an edge defect detection result.

[0188] The present invention provides a high-precision multi-light field contact lens edge defect detection device based on a Cartesian coordinate system. The device obtains a multi-light field original image of a printed contact lens immersed in water in a glass bowl, and pre-processes the multi-light field original image to obtain a bright field image, a dark field image, and a pre-processed image. The pre-processed image is subjected to glass bowl detection, and when a glass bowl exists in the pre-processed image, the geometric features of the glass bowl are extracted. The contour features of the printed contact lens in the glass bowl area are extracted based on the geometric features of the glass bowl. Then, based on the extracted images and features, a rough inspection and Cartesian coordinate system edge defect detection are performed. The present application further utilizes the contact lens images captured by a high-resolution camera, performs automated identification on the images, and determines whether the corresponding product is normal or not, so as to reduce labor costs, save time, and improve production yield.

[0189] This embodiment also provides an electronic terminal, including: a processor and a memory;

[0190] The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the terminal executes any one of the methods in this embodiment.

[0191] Regarding the computer-readable storage medium in this embodiment, those skilled in the art will appreciate that all or part of the steps in the aforementioned method embodiments can be implemented using hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0192] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used for communication, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes the various steps of the above method.

[0193] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0194] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0195] In the above embodiments, although the present invention has been described in conjunction with specific embodiments of the present invention, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. The embodiments of the present invention are intended to cover all such replacements, modifications and variations that fall within the broad scope of the appended claims.

[0196] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system, characterized in that: Including steps: Acquire a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and pre-process the multi-light-field original image to obtain a bright-field image, a dark-field image, and a pre-processed image, wherein the pre-processed image is obtained by filtering the bright-field image; Performing glass bowl detection on the pre-processed image and extracting geometric features of the glass bowl when the glass bowl exists in the pre-processed image; performing contour feature extraction on the printed contact lens in the glass bowl area based on the geometric features of the glass bowl; The printed contact lens is roughly inspected based on the contour features of the printed contact lens to obtain a rough inspection result; the printed contact lens is edge bubble detected based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and the printed contact lens is edge defect detected in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain an edge defect detection result.

2. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 1, characterized in that: Detecting a glass bowl in the preprocessed image and extracting geometric features of the glass bowl when the glass bowl exists in the preprocessed image includes: performing binarization processing on the pre-processed image, and extracting the contour features of the glass bowl in the binarized pre-processed image; Fitting the minimum inscribed circle of the glass bowl contour whose area is larger than the pre-configured glass bowl area to obtain the radius and center of the minimum inscribed circle; The radius of the minimum inscribed circle is compared with a preconfigured radius range, and when the radius of the minimum inscribed circle falls within the preconfigured radius range, it is determined that a glass bowl exists in the preprocessed image, and the radius and center of the minimum inscribed circle are used as geometric features of the glass bowl.

3. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 1, characterized in that: Performing a rough inspection on the printed contact lens based on the contour features of the printed contact lens to obtain a rough inspection result; Extracting contour features of the printed contact lens within the glass bowl region based on the pre-processed image and the geometric features of the glass bowl to obtain an elliptical contour of the printed contact lens; Obvious defect detection is performed based on the elliptical contour of the printed contact lens and the geometric features of the glass bowl to obtain a rough inspection result.

4. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 3, characterized in that: Extracting contour features of the printed contact lens in the glass bowl region based on the pre-processed image and the geometric features of the glass bowl to obtain an elliptical contour of the printed contact lens includes: Extracting contour features of the printed contact lens within the glass bowl region based on the geometric features of the glass bowl includes: Filtering and binarizing the preprocessed image to obtain a binarized image C1a; Constructing a glass bowl region BlisterROI based on the geometric features of the glass bowl; A first feature image C1fea is constructed based on the glass bowl region BlisterROI and the binary image C1a, wherein the mathematical expression of the first feature image C1fea is: Where, C1feai ,j is the pixel with coordinates (i, j) in the first feature image C1fea, C1ai ,j is the pixel with coordinates (i, j) in the binary image C1a, BlisterROIi ,j is the pixel with coordinates (i, j) in the glass bowl region BlisterROI; Extract the contour features in the first feature image C1fea, and extract the inner and outer contours of the printed contact lens based on the pre-built lens parameters, wherein the lens parameters include the major and minor axis difference determination threshold T abdif , lens aspect ratio threshold T edge_asp , lens size diameter setting threshold range LensDiaRange; The outer contour of the printed contact lens is fitted to obtain an ellipse contour.

5. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 4, characterized in that: Detect obvious defects based on the outline features of printed contact lenses, including: Generate a lens area image based on the elliptical outline ellipse, and extract an intersection image C21Img between the glass bowl area BlisterROI and the lens area image. When the number of pixels in the intersection image C21Img is greater than a preset threshold, determine that a lens edge defect exists; When the printed contact lens only has an outer contour, it is determined that the lens has large-scale edge defects; Extracting the major axis a and the minor axis b of the ellipse, calculating the difference between the major axis a and the minor axis b, and calculating the aspect ratio of the major axis a and the minor axis b; determining that the lens has a deformation defect when the difference is greater than a preset major-minor axis difference threshold, or when the aspect ratio is less than a preset aspect ratio threshold; Extract the ellipse center and the assumed radius r of the ellipse outline, wherein the assumed radius Performing polar coordinate expansion on the contour features in the first feature image Clfea based on the ellipse center and the assumed radius r, and calculating the average and variance of the polar diameters of all contour pixel points in the polar coordinates. A filtering range based on the 3sigma principle is established based on the average and variance of the polar diameters. Contour points that do not fall within the filtering range are considered outliers. When the number of outliers is greater than a preset multiple-lens determination threshold, it is determined that the lens has multiple defects. Extract the major axis a and the minor axis b of the elliptical outline ellipse, calculate the mean of the major axis a and the minor axis b, and compare the mean of the major axis a and the minor axis b with the preset lens size diameter setting threshold interval LensDiaRange. When the mean of the major axis a and the minor axis b is not within the preset lens size diameter setting threshold interval LensDiaRange, it is determined that the lens has a size non-compliance defect.

6. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 3, characterized in that: The method performs edge bubble detection on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image, and the pre-processed image to obtain an edge bubble template image, including: Extracting the lens edge area of ​​the bright field image based on the ellipse outline; The bright field image is sequentially filtered, morphologically processed, and binarized to obtain a bright field binary image; Extracting edge features in the bright field binary image based on the lens edge area; Extracting edge features from the bright field binary image that meet bubble characteristics to obtain edge bubble defect detection results, wherein the bubble characteristics include edge roundness greater than a preset roundness threshold, edge length and width greater than a preset bubble aspect ratio threshold, and contour grayscale less than a preset bubble grayscale threshold; The contour of the bubble feature is reconstructed to obtain an edge bubble template image.

7. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 5, characterized in that: The edge defect detection of the printed contact lens is performed in a Cartesian coordinate system based on the contour features of the printed contact lens, the bright field image, the dark field image, and the edge bubble template image, to obtain an edge defect detection result, including: In a Cartesian coordinate system, performing lens edge detection and lens edge severe defect detection on the printed contact lens based on the contour features of the printed contact lens to obtain a lace detection result and a lens edge severe defect detection result; In a Cartesian coordinate system, lens edge tear detection and lens edge residual material defect detection are performed on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image to obtain lens edge tear detection results and lens edge residual material defect detection results.

8. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 7, characterized in that: In a Cartesian coordinate system, lens lace detection and lens edge severe defect detection are performed on the printed contact lens based on the contour features of the printed contact lens, and lace detection results and lens edge severe defect detection results are obtained, including: A convex hull extraction algorithm is used on the inner and outer contours of the printed contact lens to obtain the vertices of the inner and outer contour convex hulls, and the Euclidean distance between the vertices of the inner and outer contour convex hulls is calculated one by one. When the Euclidean distance is greater than a preset lace threshold, it is determined that the printed contact lens has a lace defect and the lace position is stored; Morphological processing is performed on the inner contour convex hull image to obtain an inner edge image; a difference operation is performed on the inner edge image and the outer contour to obtain a first severe edge feature; a minimum circumscribed rectangle is extracted from the first severe edge feature, and when the length of the minimum circumscribed rectangle of the first severe edge feature is greater than a preset minimum edge detection size, it is determined that the printed contact lens has a severe defect on the lens edge.

9. The high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system according to claim 7, characterized in that: In a Cartesian coordinate system, lens edge tear detection and lens edge residual material defect detection are performed on the printed contact lens based on the contour features of the printed contact lens, the bright field image, the dark field image, and the edge bubble template image, and lens edge tear detection results and lens edge residual material defect detection results are obtained, including: Performing median filtering on the inner edge image to obtain a median filtered image; performing bubble interference elimination on the median filtered image based on the edge bubble template image to obtain a second severe edge feature; extracting geometric features of the second severe edge feature, and determining that the printed contact lens has an edge tear defect when the geometric features of the second severe edge feature meet a preset edge tear condition; Fit the outer contour of the printed contact lens to obtain an outer contour ellipse; calculate the Euclidean distance dis between the center of the outer contour ellipse and all points of the outer contour i and angle i , wherein the Euclidean distance dis and the angle angle i The mathematical expression is: dis i =sqrt((xp ix ) 2 +(yp iy ) 2 ) Where, (p ix ,p iy ) is the coordinate of the outer contour point, (x, y) is the coordinate of the center of the outer contour ellipse; based on the Euclidean distance dis of all points i and angle i Generate a Euclidean distance set and an angle set, perform normalization filtering and smoothing on the Euclidean distance set and the angle set, and generate an outer contour image fit based on the normalized, filtered and smoothed Euclidean distance set and the angle set img , fit the outer contour image based on the edge bubble template image img Bubble elimination is performed to obtain a second characteristic image, contour features and geometric features are extracted from the second characteristic image, and contour features of the second characteristic image are extracted from the bright field image. When the contour features of the second characteristic image meet the preset edge residual material defect conditions, it is determined that the printed contact lens has residual material defects.

10. A high-precision multi-light field contact lens edge defect detection device based on a Cartesian coordinate system, characterized in that: include: an acquisition and preprocessing module, configured to acquire a multi-light-field original image of a printed contact lens immersed in water in a glass bowl, and preprocess the multi-light-field original image to obtain a bright-field image, a dark-field image, and a preprocessed image, wherein the preprocessed image is obtained by filtering the bright-field image; a feature extraction module, configured to detect a glass bowl in the preprocessed image and, if a glass bowl exists in the preprocessed image, extract geometric features of the glass bowl; and extract contour features of the printed contact lens within the glass bowl region based on the geometric features of the glass bowl; A detection module, configured to perform a rough inspection on the printed contact lens based on the contour features of the printed contact lens to obtain a rough inspection result; Based on the contour features of the printed contact lens, the bright field image, the dark field image and the preprocessed image, edge bubble detection is performed on the printed contact lens to obtain an edge bubble template image; and based on the contour features of the printed contact lens, the bright field image, the dark field image and the edge bubble template image, edge defect detection is performed on the printed contact lens in a Cartesian coordinate system to obtain an edge defect detection result.

Citation Information

Patent Citations

  • High-precision multi-light-field contact lens edge defect detection method and device based on polar coordinate system

    CN119338797A

  • High-precision multi-light-field contact lens edge defect detection method and device based on cloud-machine vision

    CN119399232A