Water ripple detection method and device, terminal equipment and program product

By automating the acquisition and analysis of multi-dimensional evaluation metrics for water ripple detection images, the problem of low efficiency in manual detection in existing technologies has been solved, achieving efficient and accurate water ripple detection.

CN121147104APending Publication Date: 2025-12-16SHENZHEN SUNNYPOL OPTOELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511138193.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing water ripple detection methods rely on manual visual inspection, resulting in high labor costs and low detection efficiency.

Method used

By acquiring a magnified image of the sample to be tested, identifying the blurred areas, and calculating multi-dimensional evaluation indicators based on the pixel information of the blurred areas and the overall image, water ripples can be detected automatically.

Benefits of technology

Water ripple detection can be achieved without human intervention, reducing labor costs, improving detection efficiency, and enhancing detection accuracy through multi-dimensional evaluation indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147104A_ABST
    Figure CN121147104A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computers, and provides a water ripple detection method and device, terminal equipment and a program product, and the method comprises the steps: obtaining a target amplified imaging image of a to-be-detected sample; determining a fuzzy region in the target amplified imaging image; based on the first pixel information of the fuzzy region and the second pixel information of the target amplified imaging image, calculating to obtain evaluation indexes of the target amplified imaging image in multiple dimensions; and determining a water ripple detection result of the to-be-detected sample based on the evaluation indexes of the multiple dimensions. According to the invention, the water ripple detection of the product can be realized without manual intervention, so that the situation that the water ripple detection result of the product can be obtained by carefully observing manually for a long time is avoided, the labor cost is reduced, and the detection efficiency is also improved. Meanwhile, a multi-dimensional evaluation index is constructed based on the pixel information of the fuzzy region and the whole image, the limitation of a traditional single index is broken through, and the detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and in particular relates to a method, apparatus, terminal equipment and program product for detecting water ripples. Background Technology

[0002] In practical applications, the stretch marks on the membrane material itself, as well as the stretch marks and creep marks of the adhesive layer after multilayer membrane materials are laminated, are also known as water ripples. These refer to irregular undulations or wrinkles resembling water ripples on the surface of thin film materials (such as optical films, plastic films, metal foils, etc.). Membranes with water ripples or multilayer membrane materials often cause image distortion.

[0003] However, existing methods for detecting water ripples typically involve projecting light through the membrane material or multilayer membrane laminates to create a magnified virtual image. This magnifies the stretching lines of the membrane material or the creeping lines of the adhesive layer on the laminate, which are then carefully inspected by the naked eye. Therefore, existing technologies suffer from high labor costs and low inspection efficiency. Summary of the Invention

[0004] This application provides a water ripple detection method, apparatus, terminal equipment, and program product to solve the problems of high labor costs and low detection efficiency in the prior art.

[0005] In a first aspect, embodiments of this application provide a method for detecting water ripples, including:

[0006] Acquire a magnified image of the sample to be tested;

[0007] Identify the blurred areas in the magnified image of the target;

[0008] Based on the first pixel information of the blurred region and the second pixel information of the magnified image of the target, the evaluation index of the magnified image of the target in multiple dimensions is calculated.

[0009] Based on the evaluation indicators of the multiple dimensions, the water ripple detection results of the sample to be tested are determined.

[0010] Optionally, acquiring a magnified image of the sample to be tested includes:

[0011] Acquire an initial magnified imaging image of the sample to be tested;

[0012] The initial magnified imaging image is cropped to obtain a cropped image; the cropped image contains only the sample to be tested;

[0013] The cropped image is subjected to contrast enhancement processing to obtain the magnified image of the target.

[0014] Optionally, determining the blurred region in the magnified image of the target includes:

[0015] The magnified image of the target is processed to obtain a grayscale image;

[0016] The blurred region is obtained based on the grayscale value of each pixel in the grayscale image.

[0017] Optionally, the first pixel information includes the number of first pixels within the blurred region, and the second pixel information includes the number of second pixels within the magnified target image and the grayscale value of each pixel in the magnified target image. The evaluation metrics include the blurred area and the modulation transfer function value. Based on the first pixel information of the blurred region and the second pixel information of the magnified target image, the evaluation metrics of the magnified target image in multiple dimensions are calculated, including:

[0018] The blurred area is calculated based on the first number of pixels and the second number of pixels;

[0019] The grayscale values ​​of each pixel in the magnified image of the target are numerically converted based on the numerical conversion function to obtain a numerical matrix;

[0020] The modulation transfer function value is calculated based on the numerical matrix.

[0021] Optionally, the step of performing numerical transformation on the grayscale values ​​of each pixel in the magnified image of the target based on a numerical transformation function to obtain a numerical matrix includes:

[0022] The gray values ​​of each pixel in the magnified image of the target are converted based on the numerical conversion function to obtain the numerical values ​​corresponding to the gray values ​​of each pixel.

[0023] The values ​​are sorted in ascending order, and then the sorted values ​​are transformed to obtain the numerical matrix.

[0024] Optionally, the evaluation metrics include fuzzy area and modulation transfer function value; determining the water ripple detection result of the sample under test based on the multiple dimensions of evaluation metrics includes:

[0025] If the blurred area is less than the first threshold and the modulation transfer function value is less than the second threshold, then the water ripple detection result is determined to be qualified.

[0026] If the blurred area is greater than or equal to the first threshold, and / or the modulation transfer function value is greater than or equal to the second threshold, then the water ripple detection result is determined to be unqualified.

[0027] Optionally, the first threshold and the second threshold are determined in the following manner:

[0028] Obtain the attribute information of the sample to be tested;

[0029] Based on the attribute information, the first threshold and the second threshold are determined.

[0030] Secondly, embodiments of this application provide a water ripple detection device, comprising:

[0031] The first acquisition unit is used to acquire a magnified imaging image of the sample to be tested.

[0032] The first determining unit is used to determine the blurred region in the magnified imaging image of the target;

[0033] The first calculation unit is used to calculate the evaluation index of the magnified target image in multiple dimensions based on the first pixel information of the blurred region and the second pixel information of the magnified target image.

[0034] The second determining unit is used to determine the water ripple detection result of the sample to be tested based on the evaluation indicators of the multiple dimensions.

[0035] Thirdly, embodiments of this application provide a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the water ripple detection method as described in any one of the first aspects above.

[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the water ripple detection method as described in any one of the first aspects above.

[0037] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, enables the terminal device to execute the water ripple detection method described in any one of the first aspects.

[0038] The beneficial effects of the embodiments in this application compared with the prior art are:

[0039] This application provides a water ripple detection method that involves acquiring a magnified image of the sample to be tested; identifying blurred regions within the magnified image; calculating multi-dimensional evaluation metrics of the magnified image based on first pixel information of the blurred regions and second pixel information of the magnified image; and determining the water ripple detection result of the sample based on these multi-dimensional evaluation metrics. This application enables water ripple detection of products without manual intervention, thus avoiding the need for lengthy manual observation to obtain the detection results, reducing labor costs and improving detection efficiency. Furthermore, the construction of multi-dimensional evaluation metrics based on pixel information of the blurred regions and the overall image overcomes the limitations of traditional single-metric methods, improving detection accuracy. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram of the structure of a water ripple detection system provided in an embodiment of this application;

[0042] Figure 2 This is a schematic diagram of a scene corresponding to the water ripple detection method provided in one embodiment of this application;

[0043] Figure 3 This is a flowchart illustrating the implementation of a water ripple detection method according to an embodiment of this application;

[0044] Figure 4 This is a flowchart illustrating the implementation of a water ripple detection method according to another embodiment of this application;

[0045] Figure 5 This is a schematic diagram of the structure of a water ripple detection device provided in an embodiment of this application;

[0046] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0047] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0048] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0049] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0050] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0051] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0052] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] In practical applications, the stretch marks on the membrane material itself, as well as the stretch marks and creep marks of the adhesive layer after multilayer membrane materials are laminated, are also known as water ripples. These refer to irregular undulations or wrinkles resembling water ripples on the surface of thin film materials (such as optical films, plastic films, metal foils, etc.). Membranes with water ripples or multilayer membrane materials often cause image distortion.

[0054] However, existing methods for detecting water ripples typically involve projecting light through the membrane material or multilayer membrane laminates to create a magnified virtual image. This magnifies the stretching lines of the membrane material or the creeping lines of the adhesive layer on the laminate, which are then carefully inspected by the naked eye. Therefore, existing technologies suffer from high labor costs and low inspection efficiency.

[0055] Therefore, this application provides a water ripple detection method that can detect water ripples on products without manual intervention. This avoids the need for lengthy manual observation to obtain water ripple detection results, reducing labor costs and improving detection efficiency. Furthermore, by constructing multi-dimensional evaluation indicators based on pixel information from blurred areas and the overall image, it overcomes the limitations of traditional single-indicator methods and improves detection accuracy.

[0056] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a water ripple detection system provided in one embodiment of this application. Figure 1 As shown, the water ripple detection system includes: a terminal device 10, a camera device 20, an imaging screen 30, a light source 40, a sample holder 50, an optical platform 60, and a sample to be tested 70. The terminal device 10 is communicatively connected to the camera device 20. This communication connection includes, but is not limited to, wired and wireless communication connections.

[0057] It should be noted that the camera device 20, the light source 40, the sample fixture 50, and the imaging screen 30 are all placed on the optical platform 60.

[0058] The sample holder 50 is used to hold the sample 70 to be tested. The sample 70 to be tested includes, but is not limited to, membrane materials and multilayer membrane laminates.

[0059] In this embodiment, the camera device 20 is placed on the optical platform 60 via a camera bracket, and the position of the camera device 20 is higher than the position of the sample 70 to be tested.

[0060] It should be noted that the camera device 20 is used to take pictures of the imaging screen 30 from a top-down perspective.

[0061] In some possible embodiments, in order to capture a clear magnified image of the sample 70 under test, the focal length of the camera device 20 can be 49.5mm ± 5%, the total optical length can be 76mm ± 0.2mm, the flange distance can be 17.526 ± 0.2mm, and the aperture can be F2.4-F1.6.

[0062] The imaging screen 30 is suspended on the optical platform 60.

[0063] It should be noted that the imaging screen 30 is within the shooting range of the camera device 20.

[0064] The light source 40 is located between the imaging screen 30 and the camera device 20, and the position of the light source 40 is lower than the position of the sample 70 under test. The overall optical path of the light source 40 is from bottom to top to achieve magnified imaging of the sample 70 under test, which facilitates imaging and shooting by the camera device 20.

[0065] It should be noted that the brightness of the light source 40 projected onto the sample 70 is sufficient to produce a transmission effect on the sample. For example, the brightness of the light source 40 can be 3000 lumens (lm).

[0066] The sample holder 50 is located between the light source 40 and the imaging screen 30, so that the magnified image formed by the sample 70 to be tested placed on the sample holder 50 under the projection of the light source 40 can be displayed on the imaging screen 30, so that the camera device 20 can perform imaging and shooting.

[0067] In this embodiment, after capturing a magnified image of the sample 70 to be tested, the camera device 20 can send the magnified image to the terminal device 10. Then, the terminal device 10 can perform water ripple detection on the sample based on the magnified image.

[0068] Please refer to the following: Figure 2 , Figure 2 This is a schematic diagram of a scenario corresponding to the water ripple detection method provided in one embodiment of this application.

[0069] It should be noted that the specific implementation process of the above-mentioned terminal device for detecting water ripples on the sample under test based on magnified imaging images can be found in the following reference: Figures 3-4 The water ripple detection method described above will not be elaborated upon here.

[0070] Please see Figure 3 , Figure 3 This is a flowchart illustrating the implementation of a water ripple detection method according to an embodiment of this application. In this embodiment, the execution subject of the water ripple detection method is a terminal device. The terminal device includes, but is not limited to, laptops, desktop computers, and computers.

[0071] like Figure 3As shown, a water ripple detection method provided in one embodiment of this application may include steps S101 to S104, which are detailed below:

[0072] In S101, a magnified image of the target sample is acquired.

[0073] In this embodiment of the application, the terminal device can acquire a magnified image of the sample to be tested in real time through a camera device that is connected to it in communication.

[0074] In one embodiment of this application, to avoid useless information in the image interfering with subsequent water ripple detection, the terminal device can obtain a magnified target image through the following steps, detailed below:

[0075] Acquire an initial magnified imaging image of the sample to be tested;

[0076] The initial magnified imaging image is cropped to obtain a cropped image; the cropped image contains only the sample to be tested;

[0077] The cropped image is subjected to contrast enhancement processing to obtain the magnified image of the target.

[0078] In this embodiment, the terminal device can acquire the initial magnified imaging image of the sample to be tested in real time through a camera device that is connected to it in communication.

[0079] Afterwards, the terminal device can crop the initial magnified imaging image to obtain a cropped image containing only the sample to be tested.

[0080] In some possible embodiments, the terminal device can determine the region of the sample under test in the initial magnified imaging image through edge detection. The edge detection method can be an existing edge detection algorithm, which will not be elaborated upon here. Exemplary edge detection methods include, but are not limited to, the Canny operator and the Sobel operator.

[0081] After determining the area of ​​the sample to be tested in the initial magnified imaging image, the terminal device can crop the initial magnified imaging image based on the area to obtain the cropped image.

[0082] In this embodiment, after obtaining the cropped image, in order to enhance the image details of the cropped image and make the pixel contrast in the cropped image more obvious, the terminal device can perform contrast stretching processing on the cropped image to obtain the final magnified target imaging image.

[0083] In practical applications, contrast enhancement is an image processing technique used to improve the visual effect of an image. By adjusting the brightness and contrast of the image, it can make the details of the image stand out more.

[0084] It should be noted that contrast enhancement methods include, but are not limited to, contrast stretching and histogram equalization.

[0085] Contrast stretching enhances an image's contrast by mapping its brightness values ​​to a new range, thus stretching the image's contrast range. Contrast stretching can be achieved through linear or non-linear transformations.

[0086] Histogram equalization improves contrast by transforming the histogram of an image to make the pixel values ​​more evenly distributed.

[0087] In the above embodiments, the terminal device can remove background noise from the initial magnified imaging image through cropping, thereby reducing background interference and allowing subsequent blurry region detection to focus on the sample itself. Furthermore, the smaller size of the cropped image reduces subsequent computation and improves detection efficiency. Simultaneously, the terminal device enhances the image details of the cropped image through contrast enhancement processing, making pixel contrast more pronounced and thus improving the accuracy of subsequent blurry region identification.

[0088] In S102, the blurred areas in the magnified image of the target are determined.

[0089] Since water ripples essentially cause periodic height fluctuations on the surface of the sample (such as micrometer-level undulations), and these height fluctuations lead to blurring of the corresponding areas, in this embodiment, after obtaining a magnified image of the target, the terminal device can input this magnified image into a blurry region detection model for processing to determine the blurry regions in the magnified image. The blurry region detection model is obtained by training a network model such as U-Net or YOLO based on a preset sample set. Each sample data in the preset sample set includes a historical magnified image and its corresponding blurry region.

[0090] In practical applications, the relationship between grayscale values ​​and blur essentially reflects the correlation between pixel brightness distribution and image sharpness. Blur causes the spatial variation of pixel grayscale values ​​in an image to tend to be smoother, and the statistical characteristics and gradient distribution of grayscale values ​​can be directly used to quantify and analyze the degree of blur. For example, the edges of a blurred image are smoothed, and its grayscale value transition is smooth, that is, the pixel grayscale values ​​tend to be uniform. Therefore, in one embodiment of this application, the terminal device can also determine the blurred region in the magnified image of the target according to the following steps:

[0091] The magnified image of the target is processed to obtain a grayscale image;

[0092] The blurred region is obtained based on the grayscale value of each pixel in the grayscale image.

[0093] In this embodiment, the terminal device can perform grayscale processing on the magnified image of the target to obtain a grayscale image corresponding to the magnified image of the target.

[0094] Because blurring causes the spatial variation of pixel grayscale values ​​in an image to tend to be gradual—that is, the grayscale value change is gradual in the blurred part, and its grayscale value is neither too high nor too low—in this embodiment, the terminal device can sort the grayscale values ​​of each pixel in the grayscale image in ascending order, and determine the position of the pixel corresponding to the grayscale value within a set range as the blurred region. The set range is used to characterize the range within the set number of pixels, excluding the first and last set number. Both the first and last set number can be determined according to actual needs and are not limited here. For example, the first set number can be the first 30% of the pixels in the sequence, and the last set number can be the last 30%.

[0095] In S103, based on the first pixel information of the blurred region and the second pixel information of the magnified image of the target, the evaluation index of the magnified image of the target in multiple dimensions is calculated.

[0096] It should be noted that the first pixel information includes, but is not limited to, the number of first pixels within the blurred area. The second pixel information includes, but is not limited to, the number of second pixels within the magnified image of the target and the grayscale value of each pixel in the magnified image of the target.

[0097] Evaluation metrics across multiple dimensions include, but are not limited to, blur area and modulation transfer function value.

[0098] In practical applications, the modulation transfer function (MTF) is an important indicator in optical and imaging systems (such as cameras, microscopes, and lenses) for quantifying the system's ability to transmit details at different spatial frequencies. Essentially, it describes the system's ability to transfer the brightness and contrast (modulation) of an object into an image, reflecting the system's ability to resolve details and its imaging quality.

[0099] In some possible embodiments, when the target magnified imaging image is a color image, in order to obtain accurate grayscale values ​​for the target magnified imaging image and the blurred area respectively, the terminal device can perform grayscale processing on the target magnified imaging image and the blurred area respectively to obtain the grayscale value of each pixel in the blurred area and the grayscale value of each pixel in the target magnified imaging image.

[0100] In one embodiment of this application, the terminal device can specifically be configured as follows: Figure 4 Steps S201 to S203 implement step S103, as detailed below:

[0101] In S201, the blurred area is calculated based on the first number of pixels and the second number of pixels.

[0102] In this embodiment, the terminal device can calculate the ratio between the number of first pixels and the number of second pixels, and determine the ratio as the blur area.

[0103] In S202, the grayscale values ​​of each pixel in the magnified image of the target are numerically converted based on the numerical conversion function to obtain a numerical matrix.

[0104] In this embodiment, the terminal device can sequentially map the grayscale values ​​of each pixel in the magnified image of the target to a specified numerical region using a linear function, thereby realizing the numerical conversion of the grayscale values ​​of each pixel and obtaining the numerical value corresponding to the grayscale value of each pixel. The specified numerical region can be determined according to actual needs and is not limited here. For example, the specified numerical region can be (0, 1).

[0105] In some possible embodiments, the terminal device may specifically perform numerical conversion on each grayscale value according to the following linear function:

[0106]

[0107] Where N(i,j) represents the gray value of the (i,j)th pixel in the magnified image of the target, and G(i,j) represents the gray value of the (i,j)th pixel in the magnified image of the target. max G represents the maximum grayscale value in the magnified image of the target. min This represents the minimum grayscale value in the magnified image of the target.

[0108] Then, the terminal device can arrange the values ​​obtained after the above conversion according to the position of each pixel in the magnified image of the target, thereby obtaining a two-dimensional numerical matrix N∈R. M×N , where M×N is the image size of the magnified image of the target.

[0109] In some possible embodiments, the terminal device may also sort the values ​​in ascending order and transform the sorted matrix values ​​to obtain a numerical matrix.

[0110] In S203, the modulation transfer function value is calculated based on the numerical matrix.

[0111] In this embodiment, after obtaining the numerical matrix, the terminal device can calculate the modulation transfer function value of the magnified target image based on the existing MTF calculation method.

[0112] Specifically, the terminal device can calculate the line spread function based on the numerical matrix, then calculate the edge spread function using the line spread function, and finally differentiate the edge spread function and perform a Fourier transform on the result to obtain the final modulation transfer function value.

[0113] In practical applications, the line spread function (LSF) is used to describe the response of an optical or imaging system to an ideal line, reflecting the blurring effect of the optical system on linear targets.

[0114] The edge spread function (ESF) is used to describe the response of an optical system to an ideal edge, reflecting the blurring effect of the optical system at the edge and embodying the resolution characteristics of the system.

[0115] In S104, the water ripple detection result of the sample to be tested is determined based on the evaluation indicators of the multiple dimensions.

[0116] It should be noted that the water ripple detection results include, but are not limited to, pass and fail. Pass can mean that the water ripples in the sample do not affect the quality of the sample, i.e., they do not cause image distortion; or, pass can also mean that the sample does not have water ripples. Fail can mean that the water ripples in the sample affect the quality of the sample, i.e., they will cause image distortion; or, fail can also mean that the sample has water ripples.

[0117] In this embodiment, after obtaining the evaluation indicators of the magnified target image in multiple dimensions, the terminal device can obtain the initial quality score corresponding to each evaluation indicator based on each evaluation indicator and its corresponding evaluation threshold. Each evaluation threshold can be determined according to actual needs and is not limited here.

[0118] The terminal device can then perform a weighted summation of the initial quality scores and compare the sum with a preset score. This preset score can be determined based on actual needs and is not restricted here.

[0119] In this embodiment of the application, when the terminal device detects that the above sum is greater than or equal to the set value, it indicates that the magnified image of the target has not been distorted. In other words, the water ripples in the sample to be tested will not affect the quality of the sample to be tested, that is, they will not cause distortion to the image; or, the sample to be tested does not have water ripples. Therefore, the terminal device can determine that the water ripple detection result of the sample to be tested is qualified.

[0120] When the terminal device detects that the above sum is less than the set value, it indicates that the magnified image of the target is distorted. In other words, the water ripples in the sample will affect the quality of the sample and cause distortion in the image; or, the sample has water ripples. Therefore, the terminal device can determine that the water ripple detection result of the sample is unqualified.

[0121] In one embodiment of this application, when the evaluation metrics include fuzzy area and modulation transfer function value, the terminal device can determine the water ripple detection result according to the following steps, detailed below:

[0122] If the blurred area is less than the first threshold and the modulation transfer function value is less than the second threshold, then the water ripple detection result is determined to be qualified.

[0123] If the blurred area is greater than or equal to the first threshold, and / or the modulation transfer function value is greater than or equal to the second threshold, then the water ripple detection result is determined to be unqualified.

[0124] In this embodiment, after obtaining the fuzzy area and the modulation transfer function value, the terminal device can compare the fuzzy area with a first threshold and the modulation transfer function value with a second threshold. Both the first and second thresholds can be determined according to actual needs and are not limited here.

[0125] It should be noted that the above modulation transfer function value can be the MTF value at a specified spatial frequency (e.g., MTF50 corresponds to the 50% cutoff frequency).

[0126] In some possible embodiments, since different products have different sensitivities to water ripples, the terminal device can specifically obtain the first threshold and the second threshold according to the following steps, detailed below:

[0127] Obtain the attribute information of the sample to be tested;

[0128] Based on the attribute information, the first threshold and the second threshold are determined.

[0129] In this embodiment, the attribute information of the sample to be tested includes, but is not limited to, physical attributes, optical attributes, and application attributes. Physical attributes include, but are not limited to, sample thickness, surface roughness, and sample material. Optical attributes include, but are not limited to, light transmittance and refractive index. Application attributes include, but are not limited to, application scenarios and manufacturing process parameters.

[0130] The terminal device can then input the aforementioned attribute information into the threshold determination model for processing to obtain a first threshold and a second threshold. The threshold determination model is trained from a pre-built neural network model.

[0131] It should be noted that the threshold determination model can be obtained by training a pre-built neural network model based on a preset sample set. Each sample data point in the preset sample set includes sample attribute information and a corresponding sample threshold (including a first threshold and a second threshold). When training the pre-built neural network model, the sample attribute information from each sample data point is used as the input to the neural network model, and the corresponding sample threshold is used as the output. Through training, the neural network model can learn the correspondence between all possible sample attribute information and sample thresholds. The trained neural network model then serves as the threshold determination model.

[0132] Through the above implementation methods, the terminal device can dynamically adjust its corresponding threshold according to the properties of the sample to be tested, so that the determined threshold is more compatible with the sample to be tested and fits the characteristics of the sample to be tested, avoiding misjudgment caused by a fixed threshold and improving the detection accuracy.

[0133] In this embodiment, when the terminal device detects that the blurred area is less than the first threshold and the modulation transfer function value is less than the second threshold, it indicates that the magnified image of the target has not been distorted. In other words, the water ripples in the sample to be tested will not affect the quality of the sample to be tested, i.e., they will not cause distortion to the image; or, the sample to be tested does not have water ripples. Therefore, the terminal device can determine that the water ripple detection result of the sample to be tested is qualified.

[0134] When the terminal device detects that the blurred area is greater than or equal to the first threshold and / or the modulation transfer function value is greater than or equal to the second threshold, it indicates that the magnified image of the target has been distorted. In other words, the water ripples in the sample under test will affect the quality of the sample under test, that is, they will cause distortion in the image; or, the sample under test has water ripples. Therefore, the terminal device can determine that the water ripple detection result of the sample under test is unqualified.

[0135] As can be seen from the above, the water ripple detection method provided in this application involves acquiring a magnified image of the sample to be tested; determining the blurred regions in the magnified image; calculating evaluation indicators of the magnified image in multiple dimensions based on the first pixel information of the blurred regions and the second pixel information of the magnified image; and determining the water ripple detection result of the sample based on the multi-dimensional evaluation indicators. This application can detect water ripples on products without manual intervention, thus avoiding the need for lengthy manual observation to obtain the water ripple detection results, reducing labor costs and improving detection efficiency. Furthermore, constructing multi-dimensional evaluation indicators based on the pixel information of the blurred regions and the overall image overcomes the limitations of traditional single indicators, improving detection accuracy.

[0136] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0137] Corresponding to the water ripple detection method described in the above embodiments, Figure 5 A schematic diagram of a water ripple detection device according to an embodiment of this application is shown. For ease of explanation, only the parts relevant to the embodiment of this application are shown. (Refer to...) Figure 5 The water ripple detection device 500 includes: a first acquisition unit 51, a first determination unit 52, a first calculation unit 53, and a second determination unit 54. Wherein:

[0138] The first acquisition unit 51 is used to acquire a magnified imaging image of the sample to be tested.

[0139] The first determining unit 52 is used to determine the blurred areas in the magnified imaging image of the target.

[0140] The first calculation unit 53 is used to calculate the evaluation index of the magnified target image in multiple dimensions based on the first pixel information of the blurred region and the second pixel information of the magnified target image.

[0141] The second determining unit 54 is used to determine the water ripple detection result of the sample to be tested based on the evaluation indicators of the multiple dimensions.

[0142] In one embodiment of this application, the first acquisition unit 51 specifically includes: a second acquisition unit, a cropping unit, and a first processing unit. Wherein:

[0143] The second acquisition unit is used to acquire the initial magnified imaging image of the sample to be tested.

[0144] The cropping unit is used to crop the initial magnified imaging image to obtain a cropped image; the cropped image contains only the sample to be tested.

[0145] The first processing unit is used to perform contrast enhancement processing on the cropped image to obtain the magnified image of the target.

[0146] In one embodiment of this application, the first determining unit 52 specifically includes: a second processing unit and a third determining unit. Wherein:

[0147] The second processing unit is used to perform grayscale processing on the magnified image of the target to obtain a grayscale image.

[0148] The third determining unit is used to obtain the blurred region based on the grayscale value of each pixel in the grayscale image.

[0149] In one embodiment of this application, the first pixel information includes the number of first pixels within the blurred region, the second pixel information includes the number of second pixels within the magnified target image and the grayscale value of each pixel in the magnified target image, and the evaluation index includes the blurred area and the modulation transfer function value; the first calculation unit 53 specifically includes: a second calculation unit, a first conversion unit, and a third calculation unit. Wherein:

[0150] The second calculation unit is used to calculate the blurred area based on the first number of pixels and the second number of pixels.

[0151] The first conversion unit is used to perform numerical conversion on the grayscale values ​​of each pixel in the magnified image of the target based on a numerical conversion function, so as to obtain a numerical matrix.

[0152] The third calculation unit is used to calculate the modulation transfer function value based on the numerical matrix.

[0153] In one embodiment of this application, the first conversion unit specifically includes: a second conversion unit and a third conversion unit. Wherein:

[0154] The second conversion unit is used to perform numerical conversion on the grayscale value of each pixel in the magnified image of the target based on the numerical conversion function, so as to obtain the numerical value corresponding to the grayscale value of each pixel.

[0155] The third conversion unit is used to sort the values ​​in ascending order and convert the sorted values ​​to obtain the numerical matrix.

[0156] In one embodiment of this application, the evaluation metrics include ambiguity area and modulation transfer function value; the second determining unit 54 specifically includes a fourth determining unit and a fifth determining unit. Wherein:

[0157] The fourth determining unit is used to determine that the water ripple detection result is qualified if the blurred area is less than the first threshold and the modulation transfer function value is less than the second threshold.

[0158] The fifth determining unit is used to determine that the water ripple detection result is unqualified if the blurred area is greater than or equal to the first threshold and / or the modulation transfer function value is greater than or equal to the second threshold.

[0159] In one embodiment of this application, the water ripple detection device 500 further includes: a third acquisition unit and a sixth determination unit. Wherein:

[0160] The third acquisition unit is used to acquire the attribute information of the sample to be tested.

[0161] The sixth determining unit is used to determine the first threshold and the second threshold based on the attribute information.

[0162] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0164] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 6 As shown, the terminal device 6 in this embodiment includes: at least one processor 60 ( Figure 6 (Only one is shown) a processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, wherein the processor 60 executes the computer program 62 to implement the steps in any of the above embodiments of the water ripple detection method.

[0165] The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of terminal device 6 and does not constitute a limitation on terminal device 6. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0166] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0167] In some embodiments, the memory 61 may be an internal storage unit of the terminal device 6, such as the RAM of the terminal device 6. In other embodiments, the memory 61 may be an external storage device of the terminal device 6, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD) card, flash card, etc., equipped on the terminal device 6. Furthermore, the memory 61 may include both internal and external storage units of the terminal device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0168] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0169] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0170] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0171] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0172] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for detecting water ripples, characterized in that, include: Acquire a magnified image of the sample to be tested; Identify the blurred areas in the magnified image of the target; Based on the first pixel information of the blurred region and the second pixel information of the magnified image of the target, the evaluation index of the magnified image of the target in multiple dimensions is calculated. Based on the evaluation indicators of the multiple dimensions, the water ripple detection results of the sample to be tested are determined.

2. The water ripple detection method as described in claim 1, characterized in that, The acquisition of the magnified imaging image of the sample to be tested includes: Acquire an initial magnified imaging image of the sample to be tested; The initial magnified imaging image is cropped to obtain a cropped image; the cropped image contains only the sample to be tested; The cropped image is subjected to contrast enhancement processing to obtain the magnified image of the target.

3. The water ripple detection method as described in claim 1, characterized in that, Determining the blurred region in the magnified image of the target includes: The magnified image of the target is processed to obtain a grayscale image; The blurred region is obtained based on the grayscale value of each pixel in the grayscale image.

4. The water ripple detection method as described in claim 1, characterized in that, The first pixel information includes the number of first pixels within the blurred area; the second pixel information includes the number of second pixels within the magnified image of the target and the grayscale value of each pixel in the magnified image of the target; and the evaluation index includes the blurred area and the modulation transfer function value. Based on the first pixel information of the blurred region and the second pixel information of the magnified image of the target, the evaluation indicators of the magnified image of the target in multiple dimensions are calculated, including: The blurred area is calculated based on the first number of pixels and the second number of pixels; The grayscale values ​​of each pixel in the magnified image of the target are numerically converted based on the numerical conversion function to obtain a numerical matrix; The modulation transfer function value is calculated based on the numerical matrix.

5. The water ripple detection method as described in claim 4, characterized in that, The step of performing numerical transformation on the grayscale values ​​of each pixel in the magnified image of the target using a numerical transformation function to obtain a numerical matrix includes: The gray values ​​of each pixel in the magnified image of the target are converted based on the numerical conversion function to obtain the numerical values ​​corresponding to the gray values ​​of each pixel. The values ​​are sorted in ascending order, and then the sorted values ​​are transformed to obtain the numerical matrix.

6. The water ripple detection method according to any one of claims 1-5, characterized in that, The evaluation metrics include ambiguity area and modulation transfer function value; The determination of the water ripple detection result of the sample to be tested based on the evaluation indicators of the multiple dimensions includes: If the blurred area is less than the first threshold and the modulation transfer function value is less than the second threshold, then the water ripple detection result is determined to be qualified. If the blurred area is greater than or equal to the first threshold, and / or the modulation transfer function value is greater than or equal to the second threshold, then the water ripple detection result is determined to be unqualified.

7. The water ripple detection method as described in claim 6, characterized in that, The first threshold and the second threshold are determined in the following manner: Obtain the attribute information of the sample to be tested; Based on the attribute information, the first threshold and the second threshold are determined.

8. A water ripple detection device, characterized in that, include: The first acquisition unit is used to acquire a magnified imaging image of the sample to be tested. The first determining unit is used to determine the blurred region in the magnified imaging image of the target; The first calculation unit is used to calculate the evaluation index of the magnified target image in multiple dimensions based on the first pixel information of the blurred region and the second pixel information of the magnified target image. The second determining unit is used to determine the water ripple detection result of the sample to be tested based on the evaluation indicators of the multiple dimensions.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the water ripple detection method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, It includes a computer program that, when run, implements the water ripple detection method as described in any one of claims 1 to 7.