Contact lens pattern comparison method
By combining adaptive histogram equalization and illumination normalization with multiple feature extraction methods, the problem of insufficient feature points in contact lens pattern recognition is solved, achieving high-precision pattern comparison and reducing computational load.
Patent Information
- Application Number
- CN202510989056.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-28
AI Technical Summary
Existing contact lens pattern recognition technology has an insufficient number of feature points when processing tiny, low-contrast patterns, resulting in a high matching failure rate.
Image enhancement is achieved by employing adaptive histogram equalization and illumination normalization techniques. Combined with LBP binary mode, Haar wavelet decomposition, HSV histogram stitching, and a pre-trained VGG16 model, feature images and depth feature images are extracted. High-precision comparison is achieved through feature fusion and dynamic threshold adjustment.
It improves the accuracy of contact lens pattern matching, reduces computational load, and enhances the matching success rate under small, low-contrast conditions.
Smart Images

Figure CN120852814A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of contact lens technology, specifically relating to a method for comparing contact lens patterns. Background Art
[0002] Pattern comparison technology plays a crucial role in the production, quality inspection, and anti-counterfeiting traceability of contact lenses. The fine texture on the surface of contact lenses is an important basis for distinguishing different brands, batches, and even individual products.
[0003] Existing contact lens pattern recognition technologies mainly rely on traditional computer vision methods, such as SIFT (Scale Invariant Feature Transform) and SURF (Speed Robust Feature Transform). These algorithms extract and match local feature points, but when dealing with small, low-contrast contact lens patterns, the number of feature points extracted by these algorithms is insufficient, resulting in a high matching failure rate. Summary of the Invention
[0004] Purpose of the invention: To provide a method for comparing patterns on contact lenses, which solves the aforementioned problems existing in the prior art.
[0005] Technical solution: A method for comparing contact lens patterns, comprising the following steps:
[0006] The pattern image of the contact lens is obtained. The pattern image is then equalized using an adaptive histogram to obtain an enhanced image. The enhanced image is then resized and normalized to obtain enhanced images of uniform size and a unified image set is established.
[0007] Feature images and depth feature images are extracted from the image set. The feature images and depth feature images are then concatenated and normalized using a feature fusion strategy to obtain a combined feature image set.
[0008] Images from the combined feature image set are obtained, and a dynamic threshold adjustment mechanism is introduced to perform pyramid scaling on the obtained combined feature images to obtain images with high similarity as output results.
[0009] The preferred formula for image equalization is as follows:
[0010] I enhanced =CLAHE(I gray ,clip_limit=2.0,tile_size=8×8);
[0011] In the formula: I enhanced This represents the output image after image equalization and enhancement; I grayThe input grayscale image matrix (H×W) is represented; clip_limit represents the histogram clipping limit value, which controls the contrast enhancement intensity, wherein the default value of the histogram clipping limit value is 2.0; tile_size represents the size of the local region, within which histogram equalization is performed.
[0012] Preferably, the illumination normalization process is as follows:
[0013] First, the mean pixel value and standard deviation of the enhanced image are calculated. The formula for calculating the mean pixel value of the enhanced image is as follows:
[0014]
[0015] In the formula: H represents the height of the image, W represents the width of the image; i represents the i-th row of the image; j represents the j-th column of the image; I(i,j) represents the pixel intensity value of the image at the i-th row and j-th column.
[0016] The formula for calculating the standard deviation of image pixels in an enhanced image is as follows:
[0017]
[0018] After calculating the mean and standard deviation of the pixels in the enhanced image, substitute them into formula (1) to calculate the normalization of the mean and standard deviation. Formula (1) is as follows:
[0019]
[0020] Preferably, the process of extracting feature images from the image set is as follows:
[0021] The rotation-invariant features in the image set are calculated by using the LBP binary mode in the Uniform mode. The images corresponding to the rotation-invariant local textures are extracted to obtain the feature images. The feature images are then normalized using a 256-dimensional histogram to obtain the feature image.
[0022] The calculation formula for the LBP binary mode is as follows:
[0023]
[0024] In the formula: P represents the number of neighboring pixels; R represents the neighborhood radius; g c Indicates the grayscale value of the center pixel; g P This represents the grayscale value of the P-th neighboring pixel; s(x) represents the step function, which generates binary code.
[0025] The formula for normalizing the size of the feature image using a 256-dimensional histogram is as follows:
[0026]
[0027] In the formula: hist[i] represents the number of pixels with encoded value i in the LBP binary mode; h LBP This represents the normalized 256-dimensional histogram; ε represents the minimum value to prevent division by zero errors, ε = 1e-6, where 1e-6 represents 1 × 10⁻⁶. -6 .
[0028] Preferably, the process of extracting feature images from the image set is as follows:
[0029] The images in the image set are decomposed using a second-order Haar wavelet to extract low-frequency and high-frequency coefficients. After obtaining the low-frequency and high-frequency coefficients, the top 100 energy coefficients from the low-frequency and high-frequency components are extracted to obtain the feature image. The decomposition calculation formula for the second-order Haar wavelet is as follows:
[0030]
[0031] cA1 represents the first-order low-frequency approximation coefficients; cH1 represents the first-order horizontal high-frequency detail coefficients; cV1 represents the first-order vertical high-frequency detail coefficients; cD1 represents the first-order diagonal high-frequency detail coefficients; DWT2 represents the two-dimensional discrete wavelet transform;
[0032] The formula for calculating the energy cutoff coefficient is as follows:
[0033] f wavelet =Flatten([cA2,cH2,cV2])[:100];
[0034] In the formula: cA2 represents the second-order low-frequency approximate wavelet decomposition coefficient; cH2 represents the second-order horizontal high-frequency detail wavelet decomposition coefficient; cV2 represents the second-order vertical high-frequency detail wavelet decomposition coefficient; Flatten represents flattening the matrix into a vector; [:100] represents the energy coefficient of the first 100.
[0035] Preferably, the process of extracting feature images from the image set is as follows:
[0036] The images in the image set are converted to HSV space, and the 8-bin histogram of each channel is calculated using the following formula:
[0037]
[0038] Where: h H Represents a hue histogram; h S Represents a saturation histogram; h V H represents the brightness histogram; S represents the hue channel matrix; V represents the saturation channel matrix; and V represents the brightness channel matrix.
[0039] After calculating the histograms for each channel, the channel histograms are stitched together and merged. The merging calculation formula is as follows:
[0040] f color =[h H ,h S ,h V ];
[0041] After the splicing and fusion are completed, the manual feature vector is calculated using the following formula.
[0042]
[0043] In the formula: It represents a 380-dimensional real space.
[0044] Preferably, the process of extracting feature images from the image set is as follows:
[0045] The pre-trained VGG16 model is pruned by removing fully connected layers and retaining convolutional layers. The formula for calculating the convolutional layers is as follows:
[0046] Model=VGG16(pretrained=True).features[:30];
[0047] In the formula: pretrained=true indicates that the VGG16 model weights pre-trained on the ImageNet dataset are loaded; frames[:30] represents all convolutional layers of VGG16 and the first 30 sub-modules are truncated;
[0048] After completing the convolutional layer calculation, feature depth is extracted from the images in the image set. The calculation formula is as follows:
[0049]
[0050] In the formula: I norm Represents an augmented graph; It represents a 25088-dimensional real space.
[0051] Preferably, during depth extraction, the extracted features are reduced in dimension and compressed using the PCA projection matrix. The dimension reduction calculation formula is as follows:
[0052]
[0053] In the formula: T represents the transpose of the matrix; f deep Represents a depth feature image.
[0054] Preferably, the feature image and depth feature image are acquired, stitched together, and then normalized. The normalization calculation formula is as follows:
[0055]
[0056] In the formula: f handcrafted f represents the handcrafted feature vector. deep Represents a depth feature image; R represents the neighborhood radius; Represents N-dimensional real space; ||·|| represents Euclidean distance;
[0057] The similarity between a feature image and a depth feature image is calculated using cosine similarity, which measures the feature matching degree. The formula is as follows:
[0058]
[0059] In the formula: f1 represents the feature vector of the feature image; f2 represents the feature vector of the depth feature image;
[0060] The similarity between the feature image and the depth feature image is calculated using the above formula. The output range is [-1, 1]. The closer the output value is to 1, the higher the similarity between the feature image and the depth feature image. The judgment threshold is as follows:
[0061] When the score is greater than or equal to 0.9, it is determined to be the same pattern;
[0062] When 0.7 ≤ Score < 0.9, manual review is triggered;
[0063] When the score is less than 0.7, it is determined to be a different pattern.
[0064] Preferably, the matching criteria in a blurred image state are adjusted by dynamically adjusting the judgment threshold based on image sharpness. The dynamic adjustment calculation formula is as follows:
[0065] τ adaptive =τ base -α·(1-sharpness)
[0066] In the formula: α represents the adjustment coefficient; sharpness represents the image sharpness score; τ base This indicates the threshold for judgment.
[0067] Beneficial effects: This invention relates to a method for comparing contact lens patterns. The method involves enhancing the acquired contact lens pattern images, adjusting the size of the enhanced images and normalizing the illumination to obtain enhanced images of the same size. A unified image set is then established. Feature images are extracted manually, and a pre-trained VGG16 model is used to extract depth feature images. The feature images and depth feature images are then stitched together to achieve high-precision comparison of contact lens patterns while reducing the computational load. Attached Figure Description
[0068] Figure 1 This is a flowchart of the present invention;
[0069] Figure 2 This is an example drawing of the original invention;
[0070] Figure 3 This is a grayscale image of the present invention;
[0071] Figure 4 This is an enhanced diagram of the present invention;
[0072] Figure 5 This is the denoised image of the present invention;
[0073] Figure 6 This is a diagram showing the threshold binarization process of the present invention;
[0074] Figure 7 This is the combined feature image set of the present invention;
[0075] Figure 8 This is a schematic diagram of the first 5 blocks of the VGG16 structure of the present invention. Detailed Implementation
[0076] like Figure 1 As shown, the present invention provides a technical solution: a method for comparing contact lens patterns, comprising the following steps:
[0077] The pattern image of the contact lens is obtained, and the enhanced image is obtained after equalization of the pattern image using adaptive histogram. The equalization formula for the pattern image is as follows:
[0078] I enhanced =CLAHE(I gray ,clip_limit=2.0,tile_size=8×8);
[0079] In the formula: I enhanced This represents the output image after image equalization and enhancement; I gray This represents the input grayscale image matrix (H×W); `clip_limit` represents the histogram clipping limit, controlling the contrast enhancement intensity, where the default value of the histogram clipping limit is 2.0; `tile_size` represents the size of the local region, within which histogram equalization is performed, followed by resizing and illumination normalization of the enhanced image to obtain a uniformly sized enhanced image set. The illumination normalization process is as follows:
[0080] First, the mean pixel value and standard deviation of the enhanced image are calculated. The formula for calculating the mean pixel value of the enhanced image is as follows:
[0081]
[0082] In the formula: H represents the height of the image, W represents the width of the image; i represents the i-th row of the image; j represents the j-th column of the image; I(i,j) represents the pixel intensity value of the image at the i-th row and j-th column.
[0083] The formula for calculating the standard deviation of image pixels in an enhanced image is as follows:
[0084]
[0085] After calculating the mean and standard deviation of the pixels in the enhanced image, substitute them into formula (1) to calculate the normalization of the mean and standard deviation. Formula (1) is as follows:
[0086] Feature images and depth feature images are extracted from the image set. The process of extracting feature images from the image set is as follows:
[0087] The rotation-invariant features in the image set are calculated by using the LBP binary mode in the Uniform mode. The images corresponding to the rotation-invariant local textures are extracted to obtain the feature images. The feature images are then normalized using a 256-dimensional histogram to obtain the feature image.
[0088] The calculation formula for the LBP binary mode is as follows:
[0089]
[0090] In the formula: P represents the number of neighboring pixels; R represents the neighborhood radius; g c Indicates the grayscale value of the center pixel; g P This represents the grayscale value of the P-th neighboring pixel; s(x) represents the step function, which generates binary code.
[0091] The formula for normalizing the size of the feature image using a 256-dimensional histogram is as follows:
[0092]
[0093] In the formula: hist[i] represents the number of pixels with encoded value i in the LBP binary mode; h LBP This represents the normalized 256-dimensional histogram; ε = 1e-6, where ε represents the minimum value to prevent division by zero errors, and 1e-6 represents 1 × 10⁻⁶. -6 ;
[0094] The process of extracting feature images from the image set is as follows:
[0095] The images in the image set are decomposed using a second-order Haar wavelet to extract low-frequency and high-frequency coefficients. After obtaining the low-frequency and high-frequency coefficients, the top 100 energy coefficients from the low-frequency and high-frequency components are extracted to obtain the feature image. The decomposition calculation formula for the second-order Haar wavelet is as follows:
[0096]
[0097] cA1 represents the first-order low-frequency approximation coefficients; cH1 represents the first-order horizontal high-frequency detail coefficients; cV1 represents the first-order vertical high-frequency detail coefficients; cD1 represents the first-order diagonal high-frequency detail coefficients; DWT2 represents the two-dimensional discrete wavelet transform;
[0098] The formula for calculating the energy cutoff coefficient is as follows:
[0099] f wavelet =Flatten([cA2,cH2,cV2])[:100];
[0100] In the formula: cA2 represents the second-order low-frequency approximate wavelet decomposition coefficient; cH2 represents the second-order horizontal high-frequency detail wavelet decomposition coefficient; cV2 represents the second-order vertical high-frequency detail wavelet decomposition coefficient; Flatten represents flattening the matrix into a vector; [:100] represents the energy coefficient of the first 100.
[0101] The process of extracting feature images from an image set is as follows:
[0102] The images in the image set are converted to HSV space, and the 8-bin histogram of each channel is calculated using the following formula:
[0103]
[0104] Where: h H Represents a hue histogram; h S Represents a saturation histogram; h V H represents the brightness histogram; S represents the hue channel matrix; V represents the saturation channel matrix; and V represents the brightness channel matrix.
[0105] In this embodiment, h H, h S, h V All use 8-dimensional vectors to represent the corresponding histograms, and H, S, and V each represent an HxW matrix.
[0106] After calculating the histograms for each channel, the channel histograms are stitched together and merged. The merging calculation formula is as follows:
[0107] f color =[h H ,h S ,h V];
[0108] After the splicing and fusion are completed, the manual feature vector is calculated using the following formula.
[0109]
[0110] In the formula: It represents a 380-dimensional real space.
[0111] The process of extracting feature images from a depth image set is as follows:
[0112] The pre-trained VGG16 model is pruned by removing fully connected layers and retaining convolutional layers. The formula for calculating the convolutional layers is as follows:
[0113] Model=VGG16(pretrained=True).features[:30];
[0114] In the formula: `pretrained=true` indicates that the VGG16 model weights pre-trained on the ImageNet dataset are loaded; `fraatures[:30]` indicates that all convolutional layers of VGG16 are included and the first 30 sub-modules are truncated, which means creating a VGG16 object in the pre-trained VGG16 model, and the parameters in parentheses are the function parameters called when creating the object. `Pretrained=True` indicates that the VGG16 model weights pre-trained on the ImageNet dataset are loaded, and `fraatures[:30]` indicates that all convolutional layers of VGG16 are included and the first 30 sub-modules are truncated. The final returned initialization is `Model`, such as... Figure 8 The image shown is a schematic diagram of the first 5 blocks of a given VGG16, and this image is cropped into features[:30].
[0115] After completing the convolutional layer calculation, feature depth is extracted from the images in the image set. The calculation formula is as follows:
[0116]
[0117] In the formula: I norm This represents an augmented graph; This represents a 25088-dimensional real space. During depth extraction, the extracted features are compressed and reduced in dimensionality using the PCA projection matrix. The dimensionality reduction calculation formula is as follows:
[0118]
[0119] In the formula: T represents the transpose of the matrix; f deepRepresenting the depth feature image, after extracting the feature image and the depth feature image, the feature image and the depth feature image are concatenated and then normalized. The normalization calculation formula is as follows:
[0120]
[0121] In the formula: f handcrafted f represents the handcrafted feature vector. deep Represents a depth feature image; Let || represent N-dimensional real space; ||·|| represents Euclidean distance. A combined feature image set is obtained by concatenating and normalizing the feature image and the depth feature image through a feature fusion strategy.
[0122] The similarity between a feature image and a depth feature image is calculated using cosine similarity, which measures the feature matching degree. The formula is as follows:
[0123]
[0124] In the formula: f1 represents the feature vector of the feature image; f2 represents the feature vector of the depth feature image;
[0125] The similarity between the feature image and the depth feature image is calculated using the above formula. The output range is [-1, 1]. The closer the output value is to 1, the higher the similarity between the feature image and the depth feature image. The judgment threshold is as follows:
[0126] When the score is greater than or equal to 0.9, it is determined to be the same pattern;
[0127] When 0.7 ≤ Score < 0.9, manual review is triggered;
[0128] When the score is less than 0.7, it is determined to be a different pattern. After calculating the judgment threshold, the judgment threshold is dynamically adjusted according to the image sharpness to adjust the matching standard in the blurred image state. The dynamic adjustment calculation formula is as follows:
[0129] τ adaptive =τ base -α·(1-sharpness)
[0130] In the formula: α represents the adjustment coefficient; sharpness represents the image sharpness score; τ base The threshold value is used to perform pyramid scaling on the acquired combined feature images, and the images with high similarity are used as the output.
[0131] Through the above technical solution, the present invention can achieve the following working process:
[0132] A feature database is constructed using a small sample of images with different patterns. In this embodiment, 42 images of contact lenses with different patterns are used. Additional photos of a specific pattern from the feature database are used as input for the experiment. The results show the three patterns that most closely resemble the pattern. Figure 2 The image shown is an example of the original image. The result is obtained by converting the original image to grayscale. Figure 3 The grayscale image shown is subjected to adaptive histogram equalization to obtain... Figure 4 The enhanced image is then processed by denoising and threshold binarization, such as... Figure 5 and Figure 6 As shown, an image set is established by extracting feature images and depth feature images, and then using a feature fusion strategy to stitch and fuse the feature images and depth feature images to create a combined feature image set, such as... Figure 7 As shown, the combined feature image set is used as the basis for comparison to compare subsequent patterns.
[0133] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A method for comparing patterns on contact lenses, characterized in that, The following steps are involved: The pattern image of the contact lens is obtained. The pattern image is then equalized using an adaptive histogram to obtain an enhanced image. The enhanced image is then resized and normalized to obtain enhanced images of uniform size and a unified image set is established. Feature images and depth feature images are extracted from the image set. The feature images and depth feature images are then concatenated and normalized using a feature fusion strategy to obtain a combined feature image set. Images from the combined feature image set are obtained, and a dynamic threshold adjustment mechanism is introduced to perform pyramid scaling on the obtained combined feature images to obtain images with high similarity as output results.
2. The method for comparing contact lens patterns according to claim 1, characterized in that, The formula for equalizing textured images is as follows: I enhanced =CLAHE(I gray ,clip_limit=2.0,tile_size=8×8); In the formula: I enhanced This represents the output image after image equalization and enhancement; I gray The input grayscale image matrix (H×W) is represented; clip_limit represents the histogram clipping limit value, which controls the contrast enhancement intensity, wherein the default value of the histogram clipping limit value is 2.0; tile_size represents the size of the local region, within which histogram equalization is performed.
3. The method for comparing contact lens patterns according to claim 1, characterized in that, The illumination normalization process is as follows. First, the mean pixel value and standard deviation of the enhanced image are calculated. The formula for calculating the mean pixel value of the enhanced image is as follows: In the formula: H represents the height of the image, W represents the width of the image; i represents the i-th row of the image; j represents the j-th column of the image; I(i,j) represents the pixel intensity value of the image at the i-th row and j-th column. The formula for calculating the standard deviation of image pixels in an enhanced image is as follows: After calculating the mean and standard deviation of the pixels in the enhanced image, substitute them into formula (1) to calculate the normalization of the mean and standard deviation. Formula (1) is as follows:
4. The method for comparing contact lens patterns according to claim 1, characterized in that, The process of extracting feature images from an image set is as follows: The rotation-invariant features in the image set are calculated by using the LBP binary mode in the Uniform mode. The images corresponding to the rotation-invariant local textures are extracted to obtain the feature images. The feature images are then normalized using a 256-dimensional histogram to obtain the feature image. The calculation formula for the LBP binary mode is as follows: In the formula: P represents the number of neighboring pixels; R represents the neighborhood radius; g c Indicates the grayscale value of the center pixel; g P s(x) represents the grayscale value of the Pth neighboring pixel; s(x) represents the step function, which generates binary code. The formula for normalizing the size of the feature image using a 256-dimensional histogram is as follows: In the formula: hist[i] represents the number of pixels with encoded value i in the LBP binary mode; h LBP This represents the normalized 256-dimensional histogram; ε represents the minimum value to prevent division by zero errors, ε = 1e-6, where 1e-6 represents 1 × 10⁻⁶. -6 .
5. The method for comparing contact lens patterns according to claim 4, characterized in that, The process of extracting feature images from an image set is as follows: The images in the image set are decomposed using a second-order Haar wavelet to extract low-frequency and high-frequency coefficients. After obtaining the low-frequency and high-frequency coefficients, the top 100 energy coefficients from the low-frequency and high-frequency components are extracted to obtain the feature image. The decomposition calculation formula for the second-order Haar wavelet is as follows: cA1 represents the first-order low-frequency approximation coefficients; cH1 represents the first-order horizontal high-frequency detail coefficients; cV1 represents the first-order vertical high-frequency detail coefficients; cD1 represents the first-order diagonal high-frequency detail coefficients; DWT2 represents the two-dimensional discrete wavelet transform; The formula for calculating the energy cutoff coefficient is as follows: f wavelet =Flatten([cA2,cH2,cV2])[:100]; In the formula: cA2 represents the second-order low-frequency approximate wavelet decomposition coefficient; cH2 represents the second-order horizontal high-frequency detail wavelet decomposition coefficient; cV2 represents the second-order vertical high-frequency detail wavelet decomposition coefficient; Flatten represents flattening the matrix into a vector; [:100] represents the energy coefficient of the first 100.
6. The method for comparing contact lens patterns according to claim 5, characterized in that, The process of extracting feature images from an image set is as follows: The images in the image set are converted to HSV space, and the 8-bin histogram of each channel is calculated using the following formula: Where: h H Represents a hue histogram; h S Represents a saturation histogram; h V H represents the brightness histogram; S represents the hue channel matrix; V represents the saturation channel matrix; and V represents the brightness channel matrix. After calculating the histograms for each channel, the channel histograms are stitched together and merged. The merging calculation formula is as follows: f color =[h H ,h S ,h V ]; After the splicing and fusion are completed, the manual feature vector is calculated using the following formula. In the formula: It represents a 380-dimensional real space.
7. The method for comparing contact lens patterns according to claim 1, characterized in that, The process of extracting feature images from a depth image set is as follows: The pre-trained VGG16 model is pruned by removing fully connected layers and retaining convolutional layers. The formula for calculating the convolutional layers is as follows: Model=VGG16(pretrained=True).features[:30]; In the formula: pretrained=true indicates that the VGG16 model weights pre-trained on the ImageNet dataset are loaded; frames[:30] represents all convolutional layers of VGG16 and the first 30 sub-modules are truncated; After completing the convolutional layer calculation, feature depth is extracted from the images in the image set. The calculation formula is as follows: In the formula: I norm Represents an augmented graph; It represents a 25088-dimensional real space.
8. The method for comparing contact lens patterns according to claim 7, characterized in that, During depth extraction, the extracted features are reduced in dimension and compressed using the PCA projection matrix. The dimension reduction calculation formula is as follows: In the formula: T represents the transpose of the matrix; f deep Represents a depth feature image.
9. The method for comparing contact lens patterns according to claim 1, characterized in that, The feature image and depth feature image are acquired, concatenated, and then normalized. The normalization calculation formula is as follows: In the formula: f handcrafted f represents the handcrafted feature vector. deep Represents a depth feature image; Represents N-dimensional real space; ||·|| represents Euclidean distance; The similarity between a feature image and a depth feature image is calculated using cosine similarity, which measures the feature matching degree. The formula is as follows: In the formula: f1 represents the feature vector of the feature image; f2 represents the feature vector of the depth feature image; The similarity between the feature image and the depth feature image is calculated using the above formula. The output range is [-1, 1]. The closer the output value is to 1, the higher the similarity between the feature image and the depth feature image. The judgment threshold is as follows: When the score is greater than or equal to 0.9, it is determined to be the same pattern; When 0.7 ≤ Score < 0.9, manual review is triggered; When the score is less than 0.7, it is determined to be a different pattern.
10. The method for comparing contact lens patterns according to claim 9, characterized in that, The matching criteria for blurred images are adjusted by dynamically adjusting the threshold based on image sharpness. The dynamic adjustment calculation formula is as follows: t adaptive =t base -a·(1-sharpness) In the formula: α represents the adjustment coefficient; sharpness represents the image sharpness score; τ base This indicates the threshold for judgment.