Defect detection method and defect detection device for silk-screen product
By generating a variety of silk screen templates under different acquisition conditions, forming a template library, and matching the products to be tested, the problems of poor inspection compatibility and low accuracy of silk screen printing products in the prior art are solved, and higher detection accuracy and compatibility are achieved.
Patent Information
- Application Number
- CN202411818865.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
AI Technical Summary
The existing optical screen printing defect detection methods have too high requirements for product consistency, resulting in normal screen printing products being misjudged as defective, poor compatibility and low accuracy due to ink usage in actual production.
By collecting images from standard silk screen products under different acquisition conditions, a variety of silk screen templates are generated to form a rich silk screen template library. Use these template libraries to match the silk screen printing products under test to improve the compatibility of defect detection, avoid misjudgment, and improve detection accuracy.
It improves the compatibility and accuracy of defect detection of silk screen printing products, reduces misjudgment, and ensures the reliability of the test results.
Smart Images

Figure CN119688730A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a defect detection method and a defect detection device for a silk-screen product. Background Art
[0002] Optical screen printing defect detection is suitable for the detection of poor appearance (such as incompleteness, missing printing, over-printing, reverse printing, etc.) of screen-printed products with strict requirements on product appearance, such as the defect detection of screen printing on warning lights and indicator lights on automobile dashboards.
[0003] Existing detection methods have very high requirements for the consistency of the optical screen printing of products. However, due to the differences in molds, the amount of screen printing ink used, the usage time and maintenance efforts of consumables such as molds in actual production, the natural differences in these materials make it easy for normal screen-printed products to be misjudged as defective, resulting in poor compatibility and accuracy of existing detection methods for screen-printed products. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a defect detection method and a defect detection device for silk screen products. By collecting standard product images of standard silk screen products under multiple acquisition conditions, multiple silk screen templates can be generated to form a rich silk screen template library; in this way, when using the silk screen template library to match the silk screen products under test, the compatibility of defect detection can be improved, misjudgment can be avoided, and the detection accuracy can be improved.
[0005] The present application provides a method for detecting defects in a screen-printed product, the method comprising:
[0006] Control the camera to collect the product image of the screen-printed product under test;
[0007] Use multiple silk-screen templates in a pre-built silk-screen template library to match the product images one by one; wherein the multiple silk-screen templates are generated from multiple standard product images; the multiple standard product images are images of standard silk-screen products captured by controlling the camera under different acquisition conditions;
[0008] Determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image.
[0009] Furthermore, the acquisition condition includes at least one acquisition parameter; the acquisition parameter includes: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
[0010] Furthermore, the defect detection method further comprises constructing the silk screen template library in the following manner:
[0011] Controlling the camera to acquire a first standard product image of a standard silk-screen product under a first acquisition condition;
[0012] Adjust the first acquisition parameter under the first acquisition condition to obtain a plurality of second acquisition parameters and form a plurality of second acquisition conditions;
[0013] Controlling the camera to collect the second standard product image of the standard silk-screen product under each second collection condition respectively;
[0014] Corresponding silk-screen printing templates are generated according to the first standard product image and each second standard product image.
[0015] Furthermore, the silk screen template corresponding to each standard product image includes a positioning silk screen template and a mask silk screen template; using multiple silk screen templates in a pre-built silk screen template library to match the product images one by one, including:
[0016] For each standard product image, use the positioning silk screen template corresponding to the standard product image to search and locate the product image to obtain a first image;
[0017] Binarize the first image using the mask screen printing template corresponding to the standard product image to obtain a second image;
[0018] The mask screen printing template corresponding to the standard product image is used to perform pixel-by-pixel XOR operation on the second image to obtain the target pixel number matched by the screen printing template corresponding to the standard product image.
[0019] Further, according to the matching result between the silk-screen template and the product image, the defect detection result of the tested silk-screen product is determined, including:
[0020] Based on the matching result between the silk-screen template corresponding to each standard product image and the product image, determining whether the product image has defects;
[0021] If there is a defect, determining whether the silk screen template in the silk screen template library has been matched;
[0022] If the match is not completed, the silk screen template corresponding to the next standard product image is used to match the product image, and whether the product image has defects is determined based on the matching result;
[0023] If the matching is completed, the defect detection result of the screen-printed product under test is determined to be defective;
[0024] If no defect exists, it is determined that the defect detection result of the tested silk-screen product is that no defect exists.
[0025] Further, the matching result between each silk-screen template and the product image is the target pixel number; and the defect detection result of the tested silk-screen product is determined according to the matching result between the silk-screen template and the product image, including:
[0026] Filtering the minimum number of target pixels from the matching results between each silk-screen template and the product image;
[0027] determining whether the minimum number of target pixels is less than a preset threshold;
[0028] If it is less than, it is determined that the defect detection result of the screen-printed product under test is that there is no defect;
[0029] If it is greater than or equal to, it is determined that the defect detection result of the screen-printed product under test is defective.
[0030] The present application also provides a defect detection device for a silk-screen product, the defect detection device comprising:
[0031] An acquisition module is used to control the camera to acquire product images of the screen-printed product under test;
[0032] A matching module, used to use a plurality of silk-screen templates in a pre-built silk-screen template library to match the product images one by one; wherein the plurality of silk-screen templates are generated from a plurality of standard product images; the plurality of standard product images are images acquired by controlling the camera to acquire standard silk-screen products under different acquisition conditions;
[0033] The determination module is used to determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image.
[0034] Furthermore, the acquisition condition includes at least one acquisition parameter; the acquisition parameter includes: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
[0035] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the defect detection method for silk-screen products as described above are performed.
[0036] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned method for detecting defects in silk-screen products are executed.
[0037] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of a silk-screen product provided by an embodiment of the present application is shown;
[0040] Figure 2 A flow chart showing a method for detecting defects in a silk-screen product provided in an embodiment of the present application is shown;
[0041] Figure 3 A schematic structural diagram of a defect detection device for a silk-screen product provided in an embodiment of the present application is shown;
[0042] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0044] Research has found that optical silk screen defect detection is suitable for the detection of poor appearance (such as incompleteness, missing printing, over-printing, reverse, etc.) of silk screen printed products with strict requirements on product appearance, such as defect detection of silk screen display of warning lights and indicator lights on automobile dashboards.
[0045] The existing detection methods have very high requirements for the consistency of the optical screen printing of products. However, due to the differences in molds, the amount of screen printing ink used, the use time of molds and other consumables, and the maintenance intensity in actual production, there are also certain differences in the screen printing products produced. For example, please refer to Figure 1 , Figure 1 This is a schematic diagram of a silk-screen product provided in an embodiment of the present application. Figure 1 As shown in , there are slight size inconsistencies and thickness differences in silk-screen products. However, the existing detection methods have poor compatibility and are prone to misjudging normal silk-screen products as defects, resulting in poor detection accuracy.
[0046] Based on this, an embodiment of the present application provides a defect detection method for silk-screen products to improve the compatibility of defect detection, avoid misjudgment, and improve detection accuracy.
[0047] See also Figure 2 , Figure 2 This is a flow chart of a method for detecting defects in a screen-printed product provided in an embodiment of the present application. Figure 2 As shown in, the defect detection method comprises:
[0048] S201, controlling a camera to collect a product image of a screen-printed product under test.
[0049] In this step, the camera is controlled to shoot the screen-printed product to obtain a product image, which includes the screen print to be detected and the background area in the screen-printed product.
[0050] S202: Use multiple silk-screen templates in a pre-built silk-screen template library to match the product images one by one.
[0051] The plurality of screen printing templates are generated from a plurality of standard product images; the plurality of standard product images are images of standard screen printing products acquired by controlling the camera under different acquisition conditions. The acquisition conditions, standard product images and screen printing templates are corresponding.
[0052] Here, the acquisition condition includes at least one acquisition parameter; the acquisition parameters include: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
[0053] In one example, the silk screen template library can be constructed in the following manner:
[0054] Control the camera to collect a first standard product image of a standard silk-screen product under a first collection condition; adjust the first collection parameter under the first collection condition to obtain a plurality of second collection parameters and form a plurality of second collection conditions; respectively control the camera to collect a second standard product image of the standard silk-screen product under each second collection condition; and respectively generate corresponding silk-screen templates according to the first standard product image and each second standard product image.
[0055] In specific implementation, the position of the optical camera and the position of the standard silk-screen product are fixed to ensure that neither of them is offset, and the image of the standard silk-screen product is captured to obtain a first standard product image, and a silk-screen template A is generated accordingly.
[0056] In order to accommodate the size offset problem, the optical camera position is moved upward by a certain distance, that is, the relative distance is increased to meet the reduction of the collected standard product image (the specific moving distance, that is, the reduction ratio, can be set according to actual needs), and the second standard product image is obtained by collecting the image of the standard silk-screen product, and the silk-screen template B is generated accordingly. The optical camera position is moved downward by a certain distance, that is, the relative distance is increased to meet the enlargement of the collected standard product image (the specific moving distance, that is, the enlargement ratio, can be set according to actual needs), and the second standard product image is obtained by collecting the image of the standard silk-screen product, and the silk-screen template C is generated accordingly.
[0057] In order to accommodate the problem of angle deviation, the fixture that fixes the standard screen printing product can be rotated by a certain angle, that is, the relative angle between the camera and the standard screen printing product can be adjusted. By collecting the image of the standard screen printing product, the second standard product image can be obtained, and the screen printing templates D, E, F, etc. can be generated accordingly. Here, it should be noted that the rotation angle needs to be based on actual needs, and the quality risk problem also needs to be considered. If the image deviation angle is too large, it should be regarded as defective. If the angle adjustment is unreasonable in the early stage, such defective products will be outflowed.
[0058] In order to accommodate the problem of inconsistent image brightness, the exposure time of the camera can also be adjusted through the host computer. Increasing the exposure time can make the image brighter. By acquiring the image of the standard prototype, the second standard product image is obtained, and the corresponding silk-screen template G is generated; reducing the exposure time can make the image darker. By acquiring the image of the standard prototype, the second standard product image is obtained, and the corresponding silk-screen template H is generated.
[0059] The silk screen templates (A, B, C, D, E, F, etc.) collected above are stored to build a silk screen template library.
[0060] It is worth noting that some defect detection methods in the prior art are to adjust the screen-printed product to be tested, take multiple product images, and then match them. However, this method requires the cooperation of multiple motion axes, and the angle control requires high precision, and the overall structural design is complex. Alternatively, when defect detection is performed on the screen-printed product to be tested, image processing is performed on the single product image taken, such as rotation and scaling, and then matching is performed. However, this method cannot effectively solve the problem of products with differences in screen printing size, etc.; in addition, the image processing method is different from the actual product, resulting in low detection accuracy.
[0061] The above-mentioned method adopted by the embodiment of the present application can generate a variety of silk screen templates by collecting standard product images of standard silk screen products under various collection conditions, which can be compatible with the problem of silk screen size offset, angle offset and brightness inconsistency, so as to form a rich silk screen template library. In this way, when the silk screen template library is used to match the silk screen products under test in the future, the compatibility of defect detection can be improved, misjudgment can be avoided, and the detection accuracy can be improved.
[0062] Furthermore, the silk screen template corresponding to each standard product image includes a positioning silk screen template and a mask silk screen template. That is, a standard product image obtained by collecting a standard silk screen product under the acquisition conditions can generate a positioning silk screen template and a mask silk screen template, which are used together as the silk screen templates corresponding to the standard product image. For each standard product image, the region of interest can be extracted by an image segmentation algorithm to generate a positioning silk screen template and a mask silk screen template corresponding to the standard product image.
[0063] Among them, the positioning silk screen template (Template) is a color image, mainly composed of RGB primary colors. Its main function is to locate the area to be tested during the actual test process. Due to the camera's field of view, the entire image taken is relatively large. For example, the image size taken is 4096x3072 pixels, and the actual single template image that needs to be compared is only 100x50 pixels. In order to accurately find the area, the positioning silk screen template (Template) is needed to search and locate the entire image; the mask silk screen template (Mask) is usually a binary or Boolean image of the same size as the original image, in which the selected area The area to be processed is marked as 1 (or True), and the rest of the area is marked as 0 (or False). Its functions are mainly as follows: ① Extract the region of interest (ROI area), multiply the pre-made region of interest mask with the image to be processed (equivalent to AND operation) to obtain the region of interest image. The image value in the region of interest remains unchanged, while the image value outside the region is 0; ② Shielding effect, use the mask to shield certain areas on the image so that it does not participate in the processing or the calculation of the processing parameters, or only the shielded area is processed or counted; ③ Structural feature extraction, use similarity variables or image matching methods to detect and extract structural features in the image that are similar to the mask; ④ Production of special shape images.
[0064] In a possible implementation, step S202 may include:
[0065] For each standard product image, the positioning silk screen template corresponding to the standard image is used to search and locate the product image to obtain a first image; the mask silk screen template corresponding to the standard product image is used to binarize the first image to obtain a second image; the mask silk screen template corresponding to the standard product image is used to perform a pixel-by-pixel XOR operation on the second image to obtain the target number of pixels matched by the silk screen template corresponding to the standard product image.
[0066] Furthermore, before searching and locating, the acquired product image can be pre-processed by the test system such as image positioning, image extraction, image segmentation, image noise processing, image threshold processing, etc. to obtain the silk screen to be detected, so as to improve the accuracy of defect detection.
[0067] S203: Determine a defect detection result of the tested silk-screen product according to a matching result between the silk-screen template and the product image.
[0068] The matching result between each screen printing template and the product image is the target pixel number. When the target pixel number is less than the preset threshold, it means that the product image meets the requirements, otherwise it is judged as a defective product. The preset threshold can be set according to the detection requirements, such as 5 pixels.
[0069] In a possible implementation, step S203 may include:
[0070] Based on the matching results of the silk-screen template corresponding to each standard product image and the product image, determine whether the product image has defects; if there are defects, determine whether the silk-screen templates in the silk-screen template library have been matched; if not, use the silk-screen template corresponding to the next standard product image to match the product image, and determine whether the product image has defects based on the matching results; if the match is completed, determine that the defect detection result of the tested silk-screen product is that there are defects; if there are no defects, determine that the defect detection result of the tested silk-screen product is that there are no defects.
[0071] In this method, a silk screen template corresponding to any standard product image is taken out from the silk screen template library, and matched with the product image to obtain the target number of pixels; then it is determined whether the target number of pixels is less than a preset threshold; if it is less than, it is determined that the product image does not have defects, and then the defect detection result of the tested silk screen product is determined to be no defects, and the detection can be ended; if it is not less than, it is determined that the product image has defects under the silk screen template, and then it is determined whether the silk screen templates in the silk screen template library have been matched; if the match is not completed, the silk screen template corresponding to the next standard product image in the silk screen template library is used to match the product image, and it is determined whether the product image has defects based on the matching results, until it is determined that the product image does not have defects or the silk screen template has been matched. If it has been matched, it is determined that the defect detection result of the tested silk screen product is defective.
[0072] In another possible implementation, step S203 may include:
[0073] From the matching results of each silk-screen template and the product image, screen out the minimum number of target pixels; determine whether the minimum number of target pixels is less than a preset threshold; if less than, determine that the defect detection result of the tested silk-screen product is that there is no defect; if greater than or equal to, determine that the defect detection result of the tested silk-screen product is that there is a defect.
[0074] In this way, multiple silk screen templates in the silk screen template library can be taken out in sequence, such as: (R) A_Pattern_Mask.png, (R) A_Pattern_Template.png, (R) A_Pattern_Mask(1).pn g, ..., (R) Alternator_Pattern_Template(2).png. The taken silk screen templates are matched with the silk screen to be tested in sequence. Through silk screen template matching, a matching result set {Result1, Result2, ..., Result_n} of each silk screen template and the target silk screen A can be obtained. Data judgment is performed on each Result in the matching result set, and the optimal value, that is, the minimum number of target pixels, is taken. For example, if the value of Result1 is 10, the value of Result2 is 7, and the value of Result3 is 2, the optimal value 2 will be output in the end. If the minimum number of target pixels is less than the preset threshold, it is determined that the defect detection result of the silk screen product under test is that there is no defect; if it is greater than or equal to the preset threshold, it is determined that the defect detection result of the silk screen product under test is that there is a defect.
[0075] An embodiment of the present application provides a defect detection method for silk-screen products, which controls a camera to collect product images of the silk-screen products to be tested; uses multiple silk-screen templates in a pre-built silk-screen template library to match the product images one by one; wherein the multiple silk-screen templates are generated by multiple standard product images; the multiple standard product images are images of standard silk-screen products collected by controlling the camera under different collection conditions; and determines the defect detection result of the silk-screen product to be tested based on the matching result between the silk-screen template and the product image.
[0076] By collecting standard product images of standard silk-screen products under various acquisition conditions, various silk-screen templates can be generated to form a rich silk-screen template library; in this way, when the silk-screen template library is used to match the silk-screen products under test, the compatibility of defect detection can be improved, misjudgment can be avoided, and detection accuracy can be improved.
[0077] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a defect detection device for a silk-screen product provided in an embodiment of the present application. Figure 3 As shown in , the defect detection device 300 includes:
[0078] The acquisition module 310 is used to control the camera to acquire the product image of the screen-printed product under test;
[0079] A matching module 320 is used to match the product images one by one using a plurality of silk-screen templates in a pre-built silk-screen template library; wherein the plurality of silk-screen templates are generated from a plurality of standard product images; the plurality of standard product images are images acquired by controlling the camera to acquire standard silk-screen products under different acquisition conditions;
[0080] The determination module 330 is used to determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image.
[0081] Furthermore, the acquisition condition includes at least one acquisition parameter; the acquisition parameter includes: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
[0082] Furthermore, the defect detection device 300 further includes: a construction module; the construction module is used to construct the screen printing template library in the following manner:
[0083] Controlling the camera to acquire a first standard product image of a standard silk-screen product under a first acquisition condition;
[0084] Adjust the first acquisition parameter under the first acquisition condition to obtain a plurality of second acquisition parameters and form a plurality of second acquisition conditions;
[0085] Controlling the camera to collect the second standard product image of the standard silk-screen product under each second collection condition respectively;
[0086] Corresponding silk-screen printing templates are generated according to the first standard product image and each second standard product image.
[0087] Furthermore, the silk screen template corresponding to each standard product image includes a positioning silk screen template and a mask silk screen template; when the matching module is used to use multiple silk screen templates in a pre-built silk screen template library to match the product images one by one, the matching module is used to:
[0088] For each standard product image, use the positioning silk screen template corresponding to the standard product image to search and locate the product image to obtain a first image;
[0089] Binarize the first image using the mask screen printing template corresponding to the standard product image to obtain a second image;
[0090] The mask screen printing template corresponding to the standard product image is used to perform pixel-by-pixel XOR operation on the second image to obtain the target pixel number matched by the screen printing template corresponding to the standard product image.
[0091] Further, when the determination module is used to determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image, the determination module is used to:
[0092] Based on the matching result between the silk-screen template corresponding to each standard product image and the product image, determining whether the product image has defects;
[0093] If there is a defect, determining whether the silk screen template in the silk screen template library has been matched;
[0094] If the match is not completed, the silk screen template corresponding to the next standard product image is used to match the product image, and whether the product image has defects is determined based on the matching result;
[0095] If the matching is completed, the defect detection result of the screen-printed product under test is determined to be defective;
[0096] If no defect exists, it is determined that the defect detection result of the tested silk-screen product is that no defect exists.
[0097] Further, the matching result between each silk-screen template and the product image is the target pixel number; when the determination module is used to determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image, the determination module is used to:
[0098] Filtering the minimum number of target pixels from the matching results between each silk-screen template and the product image;
[0099] determining whether the minimum number of target pixels is less than a preset threshold;
[0100] If it is less than, it is determined that the defect detection result of the screen-printed product under test is that there is no defect;
[0101] If it is greater than or equal to, it is determined that the defect detection result of the screen-printed product under test is defective.
[0102] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0103] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 2The steps of the method for detecting defects in silk-screen products in the method embodiment shown in the figure, and the specific implementation methods can be found in the method embodiment, which will not be described in detail here.
[0104] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 2 The steps of the method for detecting defects in silk-screen products in the method embodiment shown in the figure, and the specific implementation methods can be found in the method embodiment, which will not be described in detail here.
[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0106] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0110] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for detecting defects in screen-printed products, characterized in that: The defect detection method comprises: Control the camera to collect the product image of the screen-printed product under test; Use multiple silk-screen templates in a pre-built silk-screen template library to match the product images one by one; wherein the multiple silk-screen templates are generated from multiple standard product images; the multiple standard product images are images of standard silk-screen products captured by controlling the camera under different acquisition conditions; Determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image.
2. The defect detection method according to claim 1, characterized in that: The acquisition condition includes at least one acquisition parameter; the acquisition parameter includes: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
3. The defect detection method according to claim 2, characterized in that: The defect detection method further comprises constructing the silk screen template library in the following manner: Controlling the camera to acquire a first standard product image of a standard silk-screen product under a first acquisition condition; Adjust the first acquisition parameter under the first acquisition condition to obtain a plurality of second acquisition parameters and form a plurality of second acquisition conditions; Controlling the camera to collect the second standard product image of the standard silk-screen product under each second collection condition respectively; Corresponding silk-screen printing templates are generated according to the first standard product image and each second standard product image.
4. The defect detection method according to claim 1, characterized in that: The silk screen printing templates corresponding to each standard product image include a positioning silk screen printing template and a mask silk screen printing template; Match the product image one by one using multiple silkscreen templates from a pre-built silkscreen template library, including: For each standard product image, use the positioning silk screen template corresponding to the standard product image to search and locate the product image to obtain a first image; Binarize the first image using the mask screen printing template corresponding to the standard product image to obtain a second image; The mask screen printing template corresponding to the standard product image is used to perform pixel-by-pixel XOR operation on the second image to obtain the target pixel number matched by the screen printing template corresponding to the standard product image.
5. The defect detection method according to claim 1, characterized in that: Determining defect detection results of the tested silk-screen product according to the matching result between the silk-screen template and the product image, including: Based on the matching result between the silk-screen template corresponding to each standard product image and the product image, determining whether the product image has defects; If there is a defect, determining whether the silk screen template in the silk screen template library has been matched; If the match is not completed, the silk screen template corresponding to the next standard product image is used to match the product image, and whether the product image has defects is determined based on the matching result; If the matching is completed, the defect detection result of the screen-printed product under test is determined to be defective; If no defect exists, it is determined that the defect detection result of the tested silk-screen product is that no defect exists.
6. The defect detection method according to claim 4, characterized in that: The matching result of each screen printing template and the product image is the target pixel number; Determining defect detection results of the tested silk-screen product according to the matching result between the silk-screen template and the product image, including: Filtering the minimum number of target pixels from the matching results between each silk-screen template and the product image; determining whether the minimum number of target pixels is less than a preset threshold; If it is less than, it is determined that the defect detection result of the screen-printed product under test is that there is no defect; If it is greater than or equal to, it is determined that the defect detection result of the screen-printed product under test is defective.
7. A defect detection device for screen printing products, characterized in that: The defect detection device comprises: An acquisition module is used to control the camera to acquire product images of the screen-printed product under test; A matching module, used to use a plurality of silk-screen templates in a pre-built silk-screen template library to match the product images one by one; wherein the plurality of silk-screen templates are generated from a plurality of standard product images; the plurality of standard product images are images acquired by controlling the camera to acquire standard silk-screen products under different acquisition conditions; The determination module is used to determine the defect detection result of the tested silk-screen product according to the matching result between the silk-screen template and the product image.
8. The defect detection device according to claim 7, characterized in that: The acquisition condition includes at least one acquisition parameter; the acquisition parameter includes: the relative distance between the camera and the standard silk-screen product, the relative angle between the camera and the standard silk-screen product, and the exposure time of the camera.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the defect detection method for silk-screen products as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the defect detection method for silk-screen products according to any one of claims 1 to 6 are executed.
Citation Information
Cited By
Capacitor screen printing method and system
CN120726025A
A capacitor screen printing method and system
CN120726025B