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, automatic edge defect detection of contact lenses solves the problems of low manual detection efficiency and low accuracy in the existing technology, and achieves high-precision and high-speed defect detection.

CN119338796AActive Publication Date: 2025-01-21SIGMA SQUARES (BEIJING) TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the detection of the edges of contact lenses mainly relies on manual labor, resulting in frequent and inefficient missed detection and inefficient.

Method used

Using a high-precision multi-light field detection method based on the Cartesian coordinate system, by obtaining the multi-light field original image of the contact lens soaked in the water of the glass bowl, preprocessing, glass bowl detection, contour feature extraction and edge defect detection are performed to achieve Automated identification.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338796A_ABST
    Figure CN119338796A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud and machine vision, in particular to a high-precision multi-light-field contact lens edge defect detection method and device based on a Cartesian coordinate system, and the method comprises the steps: obtaining a multi-light-field original image of a printed contact lens soaked in water of a glass bowl, carrying out the preprocessing of the multi-light-field original image, and obtaining a multi-light-field image of the printed contact lens; obtaining a bright field image, a dark field image and a preprocessed 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; contour feature extraction is performed on the printed contact lenses in the glass bowl area based on the geometric features of the glass bowl; and then performing rough detection and edge defect detection of a Cartesian coordinate system based on the extracted images and features. The contact lens image acquired by the high-resolution camera is further utilized, the image is automatically identified, and whether the corresponding product is normal or not is judged, so that the purposes of reducing the labor cost, saving the time and improving the production yield are achieved.
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 in particular 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 of contact lenses include turning, casting, etc. Due to the different lens materials, various types of defects are prone to occur during the production process, such as lens edge adhesion, deformation, multiple lenses, abnormal size, etc.

[0003] In the prior art, edge detection of printed contact lenses is generally performed manually, which is prone to various misdetections and omissions, and has high efficiency 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] A high-precision multi-light field contact lens edge defect detection method based on a Cartesian coordinate system of the present invention comprises the following steps:

[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 preprocessed image, and extracting geometric features of the glass bowl when the glass bowl exists in the preprocessed 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 lenses are roughly inspected based on the contour features of the printed contact lenses to obtain a rough inspection result; edge bubble detection is performed on the printed contact lenses based on the contour features of the printed contact lenses, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and edge defect detection is performed on the printed contact lenses in a Cartesian coordinate system based on the contour features of the printed contact lenses, 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, used for 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;

[0012] A feature extraction module, used to detect a glass bowl in the preprocessed image, and extract geometric features of the glass bowl when the glass bowl exists in the preprocessed image; and extract contour features of the printed contact lens in the glass bowl area 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 pre-processed 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 of the present invention 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. The present application further utilizes the contact lens images captured by a high-resolution camera, performs automated identification on the image, and determines whether the corresponding product is 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 a 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 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 an 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 This is a 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 It is a schematic diagram of the process of obvious defects of the lens in this application;

[0024] Fig. 9 A schematic diagram of the process of edge bubble detection in this application;

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

[0026] Fig.11 A schematic diagram of the process of detecting severe defects on the edge of a lens in this application;

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

[0028] Fig.13 It 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 by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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 without 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, and thus the drawings only show the layers related to the present invention rather than being 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 may be changed arbitrarily, and the layer layout may also be more complicated.

[0031] In the following description, numerous details are discussed to provide a more thorough explanation of embodiments of the present invention; however, it is apparent to one skilled in the art that 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 the 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, and reading, loading, color space conversion, noise reduction and other operations on the contact lens images collected by the camera to reduce the interference caused by environmental noise, and finally generate 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 algorithm on process image to extract lens edge contour and detect obvious defects of lens, including lens edge adhesion, deformation, multiple lenses, size abnormality, etc.

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

[0038] E. Result analysis and generation module: Integrate 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 table file. This parameter configuration file contains lens system parameters, light source configuration parameters, algorithm configuration parameters, system setting parameters, etc. Among them, load the system configuration parameters to set whether to enable the surface detection module and whether to output images; load the algorithm parameters, including 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 and the latter is the upper bound;

[0044] For module C: lens edge determination threshold T touch , the major and 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 , the minimum edge detection size EMinL, the minimum bright field edge detection grayscale BEMinG, the 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 the parameters with the industrial computer light source system. 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. This embodiment 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, load the light source parameters used by the system, and compare the parameters with the industrial computer light source system. 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 Schematic diagram of the preprocessing process in one embodiment of the present application. Figure 5 As shown, the process of preprocessing the multi-light field original image in the present application includes:

[0073] A2, pre-processing:

[0074] A21 reads the image data transmitted by the camera, divides the image data according to the multi-light field settings of bright field, dark field, and point light source, that is, the multi-light field original 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 processing on the bright field image BrightImage in the LensImageGroup in A22 to obtain a denoised preprocessed image ProcessImage, the purpose of which is to reduce the interference caused by environmental noise.

[0077] S420, performing glass bowl detection on the preprocessed image, and extracting geometric features of the glass bowl when the glass bowl exists in the preprocessed 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 FIG. 1 is a flow chart of glass bowl detection in an embodiment of the present application. Figure 6 As shown, the glass bowl test includes:

[0079] B. Glass bowl detection module: It is responsible for applying the segmentation algorithm to the preprocessed image ProcessImage and determining whether there is a glass bowl and whether the size is consistent based on the extracted relevant pixel content. 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 preprocessed image and extracting the contour features of the glass bowl in the binarized preprocessed image; applying a segmentation algorithm to the preprocessed image ProcessImage in B1 to perform binarization segmentation and extract the corresponding region of interest ROI;

[0082] B3. Fit the minimum inscribed circle of the glass bowl contour whose area is larger than the pre-configured glass bowl area BlisterArea to obtain the radius R and center C of the minimum inscribed circle. First, filter the contours extracted in B2 in turn by area. If it is larger than BlisterArea in B1, fit the minimum inscribed circle to the contour and obtain the radius R and center C of the circle, and then proceed to B4. If none of them are satisfied, end.

[0083] B4. Compare the radius R of the minimum inscribed circle with a preconfigured radius range (BlisterRL, BlisterRU), and 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 "No Blister"; otherwise, it is considered that this module has passed and BlisterResult is assigned "Pass" and enters B5. The expression is as follows:

[0085]

[0086] B5. Store the radius R and center C obtained 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 pre-processed 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] The printed contact lenses are roughly inspected based on their contour features, and the rough inspection results are obtained, including:

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

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

[0091] The details are as follows:

[0092] C. Lens rough inspection, responsible for: extraction of lens edge contour and detection of obvious lens defects, including lens edge adhesion, deformation, multiple lenses, abnormal size, etc., including:

[0093] C1. Contour extraction, Figure 7 The schematic diagram of the process of extracting the edge profile of the lens in this application is as follows: Figure 7 As shown, including:

[0094] C11, filtering and binarizing the preprocessed image to obtain a binary image C1a; specifically, performing two low-pass filtering processes on the preprocessed image ProcessImage generated by A, wherein the first filtering kernel size is 5×5, and the second filtering kernel size is a Gaussian kernel of 3×3, to obtain a filtered image Filtered; then performing an adaptive algorithm on the filtered image Filtered to obtain a binary image C1a;

[0095] C12. Constructing a glass bowl region BlisterROI based on the geometric features of the glass bowl; specifically, constructing a small bowl ROI, BlisterROI, using the small bowl fitting circle information (radius R and center C) stored in BlisterResult in B;

[0096] C13, constructing 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 region BlisterROI;

[0099] C14, extracting the contour features in the first feature image C1fea, and extracting the inner contour inner and the outer contour outer of the printed contact lens based on the pre-constructed lens parameters, wherein the lens parameters include the major and minor axis difference determination threshold T abdif , lens aspect ratio threshold T edge_asp , the lens size diameter sets the threshold interval LensDiaRange; fit the outer contour of the printed contact lens to obtain the ellipse contour ellipse. And save it to the data structure corresponding to LensEdgeExtRes, enter C 1 5; if both the inner and outer contours do not exist, 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. Detection of obvious defects on the lens. Figure 8 It is a schematic diagram of the process of obvious defects of the lens in this application, such as Figure 8 As shown, including:

[0102] C21, using BlisterROI and ellipse integrated by LensEdgeExtRes in C15 to judge the edge of the lens. It includes generating a lens area image based on the ellipse outline ellipse, and extracting the intersection image C21Img of the glass bowl area BlisterROI and the lens area image by "and" operation. When the number of pixels in the intersection image C21Img is greater than a preset number threshold, it is determined that there is a lens edge defect;

[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, it is determined that the lens has a large-scale edge defect;

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

[0107]

[0108] C23, extracting the major axis a and the minor axis b of the ellipse profile 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; 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, determining that the lens has a deformation defect;

[0109] The long axis a and short axis b in the ellipse in C15 are used to judge the lens deformation. If the difference between the long axis and the short axis is greater than the difference between the long axis and the short 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 Based on the ellipse center and the assumed radius r, the contour features in the first feature image Clfea are expanded in polar coordinates, and the average value and variance of the polar diameters of all contour pixel points in the polar coordinates are calculated, and a filtering range based on the 3sigma principle is constructed based on the average value and variance of the polar diameters, and contour points that do not fall into the filtering range are regarded as abnormal points. When the number of abnormal points is greater than a preset multiple-piece determination number 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 center of the ellipse EC in ellipse and the assumed radius of the major and minor axes. Polar coordinates are expanded, and the "multi-piece" detection is performed using an outlier detection algorithm based on mathematical statistics. That is, the mean and variance of the polar diameters of all contour pixel points 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 exits. Otherwise, the next step is expressed as follows:

[0113]

[0114] C25, extract the major axis a and minor axis b of the ellipse outline ellipse, and use the major axis a and minor axis b in ellipse in C15 to determine the lens size. Calculate the mean d=mean(a, b) of the major axis a and the minor axis b, consider d as 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 of "Offsize" and exits. Otherwise, the next step, the expression is as follows:

[0115]

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

[0117] D1. Edge bubble detection, Fig. 9 Schematic diagram of the process of edge bubble detection in this application, such as Fig. 9 As shown, including:

[0118] D11, extracting the lens edge area of ​​the bright field image based on the ellipse outline ellipse; specifically, constructing the lens edge area D1ROI by combining the ellipse information in LensEdgeExtRes in C15 and the bright field image BrightImage in LensImageGroup, using 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 in the bright field binary image based on the edge area of ​​the lens;

[0121] D14, extract edge features in the bright field binary image that meet the bubble features, and obtain edge bubble defect detection results. Specifically, it is necessary to combine the bright field image data BrightImage in LensImageGroup and the dark field image data DarkImage to perform feature analysis and filtering on the edge feature D1feature, and store the features that meet the edge bubble in D1EB. The bubble features include the roundness of the edge being greater than the preset roundness threshold, the length and width of the edge being greater than the preset bubble aspect ratio threshold, and the grayscale of the contour being less than the preset bubble grayscale threshold;

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

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

[0124] In a Cartesian coordinate system, based on the contour features of the printed contact lens, a lens edge detection and a lens edge severe defect detection are performed on 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 edge detection based on profile statistics, Fig.10 The flowchart of the lens lace detection in this application is as follows: Fig.10 As shown, including:

[0128] D211, use the convex hull extraction algorithm for the inner contour and outer contour of the printed contact lens 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, inner_pt and outer_pt are looped, and the Euclidean distance between them is determined. If the lace threshold T in A11 is satisfied, flower , consider this point as the location of the "lace" and store it in Set;

[0131] D22, severe defect detection of lens edge, Fig.11 The schematic diagram of the process of detecting severe defects on the edge of the lens in this application is as follows: Fig.11 As shown, including:

[0132] D221, use the convex hull extraction algorithm for the inner contour inner 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 serious edge feature D22feature, and when the length of the minimum circumscribed rectangle of the first serious edge feature D22feature is greater than the preset minimum edge detection size, determine that the printed contact lens has serious defects on the lens edge; if satisfied, store to Set; otherwise, next one.

[0135] D23, lens edge tear detection, Fig.12 The schematic diagram of the process of lens edge tear detection in this application is as follows: Fig.12 As shown, including:

[0136] D231, use the convex hull extraction algorithm for the inner contour inner 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 filter image to eliminate noise; and performing bubble interference elimination on the median filter image based on the edge bubble template image EdgeBubble to obtain a second severe edge feature D23feature;

[0139] When removing bubble interference, the features in the edge bubble template image EdgeBubble in the median filter image can be removed. The same is true for the bubble interference removal in the following text.

[0140] D234. Extract the geometric features of the second severe edge feature D23feature, wherein 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, it is determined 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] The 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 a preset aspect ratio tear detection interval (Min_spASP, Max_spASP), where Min_spASP is the lower limit of the aspect ratio tear detection interval and Max_spASP is the upper limit of the aspect ratio tear detection interval;

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

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

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

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

[0151] D24, lens edge residual material defect detection, Fig.13 The schematic diagram of the process of detecting residual material defects on the edge of the lens in this application is as follows: Fig.13 As 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 , where 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 to obtain a second feature image D24feature;

[0162] D246. Perform contour feature extraction on the second feature image, the contour features including length length', width width', aspect ratio aspect', roundness', density 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 interval (Min_fIASP, Max_fIASP), Min_flASP is the lower limit value of the aspect ratio residual material detection interval, and Max_flASP is the upper limit value of the aspect ratio residual material detection interval;

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

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

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

[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: It is mainly responsible for making a comprehensive judgment on the above-mentioned glass bowl inspection results, lens rough inspection results, lens edge inspection and surface inspection results by combining the project defect priority file, and outputting the final result of the lens and the corresponding annotation information, including:

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

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

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

[0178] E4. Load the Priority data in A11, build a priority queue, prioritize the defect codes in Set, assign the defect code with the highest priority to LensResult.result, and copy the related 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 it is necessary 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 detection 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 the 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. 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 products are normal or not, so as to reduce labor costs, save time, and improve production yields.

[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, used for 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;

[0186] A feature extraction module, used to detect a glass bowl in the preprocessed image, and extract geometric features of the glass bowl when the glass bowl exists in the preprocessed image; and extract contour features of the printed contact lens in the glass bowl area 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 pre-processed 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; performs glass bowl detection on the pre-processed image, and extracts the geometric features of the glass bowl when the 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. 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 products are normal or not, so as to reduce labor costs, save time, and improve production yields.

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

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

[0191] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[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 to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step 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 memory.

[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, discrete hardware components.

[0195] In the above-mentioned embodiments, although the present invention has been described in conjunction with the specific embodiments of the present invention, many replacements, modifications and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. The embodiments of the present invention are intended to cover all such replacements, modifications and variations falling 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 familiar with 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 a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still 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: Includes 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 preprocessed image, and extracting geometric features of the glass bowl when the glass bowl exists in the preprocessed 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 lenses are roughly inspected based on the contour features of the printed contact lenses to obtain a rough inspection result; edge bubble detection is performed on the printed contact lenses based on the contour features of the printed contact lenses, the bright field image, the dark field image and the preprocessed image to obtain an edge bubble template image; and edge defect detection is performed on the printed contact lenses in a Cartesian coordinate system based on the contour features of the printed contact lenses, 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: Performing glass bowl detection on the preprocessed image and extracting geometric features of the glass bowl when the glass bowl exists in the preprocessed image includes: Binarizing the preprocessed image and extracting the contour features of the glass bowl in the preprocessed image after the binarization process; 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: 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; Extracting contour features of the printed contact lens in the glass bowl region based on the preprocessed image and the geometric features of the glass bowl to obtain an elliptical contour of the printed contact lens; Based on the elliptical contour of the printed contact lens and the geometric features of the glass bowl, obvious defect detection is performed 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 preprocessed image and the geometric features of the glass bowl to obtain an elliptical contour of the printed contact lens includes: Based on the geometric features of the glass bowl, contour features of the printed contact lens in the glass bowl area are extracted, including: 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: In the formula, 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 Clfea, and extract the inner contour and outer contour of the printed contact lens based on the pre-constructed 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 contour features of printed contact lenses, including: Generate a lens area image based on the ellipse outline, and extract an intersection image C21Img between the glass bowl area BlisterROI and the lens area image, and determine that there is a lens edge defect when the number of pixel points in the intersection image C21Img is greater than a preset number threshold; When the printed contact lens only has an outer contour, it is determined that the lens has a large-scale edge defect; Extracting the major axis a and the minor axis b of the ellipse profile 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; 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, determining that the lens has a deformation defect; Extract the ellipse center and assumed radius r of the ellipse outline ellipse, where the assumed radius Based on the ellipse center and the assumed radius r, the contour features in the first feature image Clfea are expanded in polar coordinates, and the average value and variance of the polar diameters of all contour pixel points in the polar coordinates are calculated, and a filtering range based on the 3sigma principle is constructed based on the average value and variance of the polar diameters, and contour points that do not fall into the filtering range are regarded as abnormal points. When the number of abnormal points is greater than a preset multiple-piece determination number threshold, it is determined that the lens has multiple defects; The major axis a and the minor axis b of the ellipse outline ellipse are extracted, the mean of the major axis a and the minor axis b are calculated, and the mean of the major axis a and the minor axis b are compared with a 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 region; Extract edge features in the bright field binary image that meet the 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: 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, including: In a Cartesian coordinate system, based on the contour features of the printed contact lens, a lens edge detection and a lens edge severe defect detection are performed on 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, the printed contact lens is subjected to a lens edge detection and a lens edge severe defect detection based on the contour features of the printed contact lens, and a lace detection result and a lens edge severe defect detection result are obtained, including: Using a convex hull extraction algorithm for the inner contour and the outer contour of the printed contact lens respectively, obtaining the vertices of the inner contour convex hull and the vertices of the outer contour convex hull, 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 lace defects and storing the lace position; Perform morphological processing on the inner contour convex hull image to obtain an inner edge image; perform a differential operation on the inner edge image and the outer contour to obtain a first severe edge feature; perform a minimum circumscribed rectangle extraction on 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, determine 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, based on the contour features of the printed contact lens, the bright field image, the dark field image, and the edge bubble template image, the printed contact lens is subjected to lens edge tear detection and lens edge residual material defect detection, 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 , where the Euclidean distance dis and the angle angle i The mathematical expression is: dis i =sqrt((xp ix ) 2 +(yp iy ) 2 ) In the formula, (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, used for 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; A feature extraction module, used to detect a glass bowl in the preprocessed image, and extract geometric features of the glass bowl when the glass bowl exists in the preprocessed image; and extract contour features of the printed contact lens in the glass bowl area based on the geometric features of the glass bowl; A detection module, used for 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; 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

  • Contact lens edge defect detection method

    CN112529876A

  • Method and system for detecting flaws of printed contact lenses based on cloud-machine vision

    CN118505634A

  • 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

  • Visual inspection method and apparatus for contact lenses

    US6134342A