Method, device and storage medium for coarse positioning of screen printing area of ​​filter

By performing differential processing on the filter image and extracting the mirror area, combined with differential processing, the diversity problem of filter screen printing area positioning is solved, and efficient screen printing area positioning and detection are achieved.

CN112164058BActive Publication Date: 2024-09-17DONGGUAN AUSPICIOUS IMAGE INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011091887.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-13
Publication Date
2024-09-17
Estimated Expiration
2040-10-13

AI Technical Summary

Technical Problem

The existing technology cannot effectively solve the positioning problem of the filter screen printing area, especially the positioning challenges caused by the wide variety of filters, different screen printing inks and processes, resulting in poor detection efficiency and effect.

Method used

By collecting the filter image, performing differential processing, extracting the mirror area, performing differential processing to obtain the screen printing candidate area, and filtering out the screen printing target area according to the preset parameters to achieve rough positioning of the screen printing area.

Benefits of technology

This method improves the recognition and positioning accuracy of the screen printing area, is compatible with different types of screen printing areas, meets diverse positioning requirements, and improves detection efficiency and effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112164058B
    Figure CN112164058B
Patent Text Reader

Abstract

The present invention discloses a method for coarsely locating a silk-screen area of ​​a filter, which comprises the following steps: acquiring an image of a filter to be tested to obtain an image to be tested; performing differential processing on the image to be tested to obtain a differential image; extracting a mirror area of ​​the differential image; performing differential processing on the image to be tested and the mirror area to obtain a silk-screen candidate area; screening and obtaining a silk-screen target area from the silk-screen candidate area; the present invention is compatible with locating different types of silk-screen areas and effectively meets different positioning requirements; the present invention also discloses a method for coarsely locating a silk-screen area of ​​a filter and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of automatic optical detection, and in particular to a method, a device and a storage medium for coarse positioning of a silk-screen area of ​​a filter. Background Art

[0002] The filter is an optical device located inside the mobile phone camera, between the lens and the sensor. It has many types, such as IR cut-off filter, narrow-band filter, etc. Among them, the IR cut-off filter is the most widely used one. It is used to prevent external IR light from entering the sensor. At the same time, the IR cut-off filter is also coated with an anti-reflection film, which can increase the amount of visible light entering the sensor. It is an indispensable key accessory in the current mobile phone camera module.

[0003] With the improvement of smartphone photography capabilities and the increase in the number of cameras on a single phone, the filter market is facing new challenges in terms of production capacity and quality. The current manual microscope inspection method cannot meet existing requirements in terms of inspection efficiency and results. Therefore, filter inspection equipment based on machine vision has emerged.

[0004] The filter includes a silk-screen area and a mirror area. There are various problems in the existing technology for the detection of filters. One of the primary problems is the positioning of the silk-screen part of the filter. Only after the silk-screen part of the filter is accurately positioned, can the subsequent silk-screen part defect detection be carried out. Due to the wide variety of filters, and the different inks, processes, shapes, etc. used in silk-screen printing, silk-screen positioning poses a great challenge.

[0005] Therefore, there is an urgent need for a method, device and storage medium for coarse positioning of the silk-screen area of ​​a filter to solve the above problems. Summary of the invention

[0006] The object of the present invention is to provide a method for coarsely positioning a silk-screen area of ​​a filter, which is compatible with positioning different types of silk-screen areas and effectively meets different positioning requirements.

[0007] Another object of the present invention is to provide a coarse positioning device for a silk-screen area of ​​a filter, which is compatible with positioning different types of silk-screen areas and effectively meets different positioning requirements.

[0008] The object of the present invention is to provide a storage medium that is compatible with positioning different types of silk-screen printing areas and effectively meets different positioning requirements.

[0009] In order to achieve the above purpose, the present invention discloses a method for coarse positioning of a screen printing area of ​​a filter, which comprises the following steps:

[0010] S1, collecting an image of the filter to be tested to obtain an image to be tested;

[0011] S2, performing differential processing on the image to be tested to obtain a differential image;

[0012] S3, extracting the mirror area of ​​the differential image;

[0013] S4, performing difference processing on the image to be tested and the mirror area to obtain a screen printing candidate area;

[0014] S5. Screening and obtaining a screen printing target area from the screen printing candidate areas.

[0015] Compared with the prior art, the present invention performs differential processing on the image to be tested to obtain a differential image, then performs an extraction operation on the differential image to obtain a mirror area, and then performs differential processing on the image to be tested and the mirror area to obtain a screen printing candidate area. On the one hand, the screen printing candidate area obtained after the above processing can have a higher recognition on the image to be tested, so as to quickly locate the screen printing target area in the image to be tested; on the other hand, the present invention does not detect the size and material of the filter to be tested, and therefore can be compatible with the positioning of different types of screen printing areas, effectively meeting different positioning requirements.

[0016] Preferably, the step (2) specifically comprises the following steps:

[0017] S21, performing large mask mean filtering on the image to be tested to obtain a first processed image;

[0018] S22: performing subtraction processing on the image to be tested and the first processed image to obtain the difference image.

[0019] Preferably, the step (3) specifically comprises the following steps:

[0020] S31, performing threshold segmentation processing on the difference image to obtain a second processed image;

[0021] S32, performing morphological transformation processing on the second processed image to obtain a third processed image;

[0022] S33. Extracting the mirror area of ​​the differential image from the third processed image according to a preset mirror area size parameter.

[0023] Specifically, the morphological transformation includes an opening operation transformation and a closing operation transformation.

[0024] Preferably, the step (4) specifically comprises the following steps:

[0025] S41, performing difference processing on the image to be tested and the mirror area to obtain a first screen printing candidate area;

[0026] S42, filling the first silk-screen printing candidate area to obtain a second silk-screen printing candidate area;

[0027] S43, performing an opening operation on the second silk-screen printing candidate area to remove edge interference of the second silk-screen printing candidate area to obtain a third silk-screen printing candidate area;

[0028] S44 , extracting the screen printing candidate area from the third screen printing candidate area according to a preset screen printing area size parameter.

[0029] Preferably, the step (5) specifically comprises the following steps:

[0030] S51, analyzing the intersection of the screen printing candidate area and the mirror area, and the relative position of the screen printing candidate area and the mirror area to obtain a preliminary screen printing target area;

[0031] S52 , sequentially determining the distance between each of the preliminary screen-printing target areas and the boundary of the image to be tested, and obtaining the screen-printing target areas by screening according to the determination results.

[0032] Specifically, the step (52) comprises the following steps:

[0033] S521, if the distance between the current screen printing candidate area and the boundary of the image to be tested is greater than a preset threshold, the current screen printing candidate area is recorded as the screen printing target area;

[0034] S522: If the distance between the current screen printing candidate area and the boundary of the image to be tested is less than or equal to a preset threshold, the current screen printing candidate area is discarded as a non-screen printing target area.

[0035] Correspondingly, the present invention also discloses a coarse positioning device for a screen printing area of ​​a filter, comprising:

[0036] An acquisition module is used to collect the image of the filter to be tested and obtain the image to be tested;

[0037] A first processing module, used for performing differential processing on the image to be tested to obtain a differential image;

[0038] A second processing module, used for extracting the mirror area of ​​the differential image;

[0039] A third processing module performs a difference process on the image to be tested and the mirror area to obtain a screen printing candidate area;

[0040] The fourth processing module is to select and obtain a screen printing target area from the screen printing candidate areas.

[0041] Correspondingly, the present invention also discloses a storage medium for storing a computer program, wherein when the program is executed by a processor, the method for coarsely positioning the silk-screen area of ​​a filter as described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is an execution flow chart of the method for coarse positioning of the silk-screen area of ​​the filter of the present invention.

[0043] Figure 2 It is a connection block diagram of the screen printing area coarse positioning device for the filter of the present invention. DETAILED DESCRIPTION

[0044] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0045] See also Figure 1 As shown, the method for coarsely positioning the screen printing area of ​​the filter in this embodiment includes the following steps:

[0046] S1. Capture an image of the filter to be tested to obtain the image to be tested. In this embodiment, the image of the filter to be tested is captured by a camera. Since the existing filter has a silk-screen area and a mirror area, the image to be tested captured by the camera also has a silk-screen area and a mirror area. The image to be tested may have one or more silk-screen areas and mirror areas. The goal of this embodiment is to locate the silk-screen area.

[0047] S2. Perform differential processing on the image to be tested to obtain a differential image.

[0048] S3. Extracting the mirror area of ​​the differential image.

[0049] S4, performing difference processing on the image to be tested and the mirror area to obtain a screen printing candidate area.

[0050] S5. Screening and obtaining a screen printing target area from the screen printing candidate areas.

[0051] Preferably, the step (2) specifically comprises the following steps:

[0052] S21, performing large mask mean filtering on the image to be tested to obtain a first processed image. The purpose of this step is to reduce noise interference in the image to be tested and avoid affecting the detection accuracy due to excessive noise interference in the image to be tested.

[0053] S22, performing subtraction processing on the image to be tested and the first processed image to obtain the differential image. The purpose of this step is to make the silk-screen area in the first processed image have a higher resolution through differential processing, so as to facilitate subsequent detection and positioning.

[0054] Preferably, the step (3) specifically comprises the following steps:

[0055] S31, performing threshold segmentation processing on the differential image to obtain a second processed image.

[0056] S32, performing morphological transformation on the second processed image to obtain a third processed image. The morphological transformation in this step includes an opening operation transformation and a closing operation transformation. By performing the opening operation transformation and the closing operation transformation on the third processed image, the mirror area in the second processed image can be corrected to facilitate subsequent better detection.

[0057] S33, extracting the mirror area of ​​the differential image from the third processed image according to the preset mirror area size parameter. Since the sizes of different types of filters are different, the sizes of the corresponding mirror areas are also different. Therefore, different mirror area parameters are preset for different types of filters to better extract different types of mirror areas, so as to be compatible with different types of filters.

[0058] Preferably, the step (4) specifically comprises the following steps:

[0059] S41, performing a difference process on the image to be tested and the mirror area to obtain a first silk-screen candidate area. The first silk-screen candidate area obtained in this step can distinguish the approximate position of the silk-screen area.

[0060] S42, filling the first silk-screen candidate area to obtain a second silk-screen candidate area. The filling method here can be color filling or graphic filling, so that the second silk-screen candidate area can be better distinguished and identified.

[0061] S43, performing an opening operation on the second silk-screen printing candidate region to remove edge interference of the second silk-screen printing candidate region to obtain a third silk-screen printing candidate region.

[0062] S44, extracting the screen printing candidate area from the third pan-screen printing candidate area according to the preset screen printing area size parameter. Since the sizes of different types of filters are different, the sizes of the corresponding screen printing areas are also different. Therefore, different screen printing area parameters are preset for different types of filters to better extract different types of screen printing areas, so as to be compatible with different types of filters.

[0063] Preferably, the step (5) specifically comprises the following steps:

[0064] S51, analyzing the intersection of the screen printing candidate area and the mirror area, and the relative position of the screen printing candidate area and the mirror area, to obtain a preliminary screen printing target area. The relative position of the screen printing candidate area and the mirror area specifically refers to whether the screen printing area is inside or outside the mirror area.

[0065] S52 , sequentially determining the distance between each of the preliminary screen-printing target areas and the boundary of the image to be tested, and obtaining the screen-printing target areas by screening according to the determination results.

[0066] Specifically, the step (52) comprises the following steps:

[0067] S521, if the distance between the current screen printing candidate area and the boundary of the image to be tested is greater than a preset threshold, the current screen printing candidate area is recorded as the screen printing target area. The purpose of this step is to avoid misjudgment due to the short distance between the current screen printing candidate area and the boundary of the image to be tested. Since the screen printing area of ​​a general filter is not set at the edge position, the above judgment can effectively reduce the misjudgment rate.

[0068] S522: If the distance between the current screen printing candidate area and the boundary of the image to be tested is less than or equal to a preset threshold, the current screen printing candidate area is discarded as a non-screen printing target area.

[0069] See also Figure 2 As shown, accordingly, the present invention also discloses a screen printing area coarse positioning device 100 for a filter, which comprises:

[0070] An acquisition module 10 is used to collect an image of the filter to be tested and obtain an image to be tested;

[0071] The first processing module 20 is used to perform differential processing on the image to be tested to obtain a differential image;

[0072] A second processing module 30, configured to extract a mirror area of ​​the differential image;

[0073] The third processing module 40 performs a difference process on the image to be tested and the mirror area to obtain a screen printing candidate area;

[0074] The fourth processing module 50 is to select and obtain a screen printing target area from the screen printing candidate areas.

[0075] Correspondingly, the present invention also discloses a storage medium for storing a computer program, wherein when the program is executed by a processor, the method for coarsely positioning the silk-screen area of ​​a filter as described above is implemented.

[0076] Combination Figure 1 and Figure 2The present invention performs differential processing on the image to be tested to obtain a differential image, then performs an extraction operation on the differential image to obtain a mirror area, and then performs differential processing on the image to be tested and the mirror area to obtain a screen printing candidate area. On the one hand, the screen printing candidate area obtained by the above processing can have a higher recognition on the image to be tested, so as to quickly locate the screen printing target area in the image to be tested; on the other hand, the present invention does not detect the size and material of the filter to be tested, and therefore can be compatible with the positioning of different types of screen printing areas, effectively meeting different positioning requirements.

[0077] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.

Claims

1. A method for coarsely positioning a screen printing area of ​​a filter, characterized in that: The steps include: Collecting an image of the filter to be tested to obtain an image to be tested; Performing differential processing on the image to be tested to obtain a differential image; extracting a mirror area of ​​the differential image; Performing a difference process on the image to be tested and the mirror area to obtain a screen printing candidate area; Screening and obtaining a screen printing target area from the screen printing candidate areas; The step of performing differential processing on the image to be tested to obtain a differential image specifically comprises the following steps: Performing large mask mean filtering on the image to be tested to obtain a first processed image; Performing subtraction processing on the image to be tested and the first processed image to obtain the difference image; The step of performing difference processing on the image to be tested and the mirror area to obtain the screen printing candidate area specifically includes the following steps: Performing a difference process on the image to be tested and the mirror area to obtain a first screen printing candidate area; Filling the first silk-screen printing candidate area to obtain a second silk-screen printing candidate area; Performing an opening operation on the second silk-screen printing candidate area to remove edge interference of the second silk-screen printing candidate area to obtain a third silk-screen printing candidate area; The screen printing candidate area is extracted from the third silk screen printing candidate area according to a preset silk screen printing area size parameter.

2. The method for coarsely positioning the screen printing area of ​​a filter according to claim 1, characterized in that: The step of extracting the mirror area of ​​the differential image specifically comprises the following steps: Performing threshold segmentation processing on the difference image to obtain a second processed image; Performing morphological transformation processing on the second processed image to obtain a third processed image; The mirror area of ​​the differential image is extracted from the third processed image according to a preset mirror area size parameter.

3. The method for coarsely positioning the screen printing area of ​​a filter according to claim 2, characterized in that: The morphological transformation includes an opening operation transformation and a closing operation transformation.

4. The method for coarsely positioning the screen printing area of ​​a filter according to claim 1, characterized in that: The step of selecting and obtaining the screen printing target area from the screen printing candidate area specifically comprises the following steps: Analyze the intersection of the screen printing candidate area and the mirror area, and the relative position of the screen printing candidate area and the mirror area to obtain a preliminary screen printing target area; The distance between each of the preliminary screen printing target areas and the boundary of the image to be tested is determined in turn, and the screen printing target area is obtained by screening according to the determination result.

5. The method for coarsely positioning the screen printing area of ​​a filter according to claim 4, characterized in that: The step of sequentially determining the distance between each of the screen printing candidate areas and the boundary of the image to be tested, and obtaining the screen printing target area based on the determination result, specifically includes the following steps: If the distance between the current screen printing candidate area and the boundary of the image to be tested is greater than a preset threshold, the current screen printing candidate area is recorded as the screen printing target area; If the distance between the current screen printing candidate area and the boundary of the image to be tested is less than or equal to a preset threshold, the current screen printing candidate area is discarded as a non-screen printing target area.

6. A coarse positioning device for a screen printing area of ​​a filter, characterized in that: include: An acquisition module is used to collect the image of the filter to be tested and obtain the image to be tested; A first processing module, used for performing differential processing on the image to be tested to obtain a differential image; A second processing module, used for extracting the mirror area of ​​the differential image; A third processing module performs a difference process on the image to be tested and the mirror area to obtain a screen printing candidate area; A fourth processing module, screening and obtaining a screen printing target area from the screen printing candidate areas; The step of performing differential processing on the image to be tested to obtain a differential image specifically comprises the following steps: Performing large mask mean filtering on the image to be tested to obtain a first processed image; Performing subtraction processing on the image to be tested and the first processed image to obtain the difference image; The step of performing difference processing on the image to be tested and the mirror area to obtain the screen printing candidate area specifically includes the following steps: Performing a difference process on the image to be tested and the mirror area to obtain a first screen printing candidate area; Filling the first silk-screen printing candidate area to obtain a second silk-screen printing candidate area; Performing an opening operation on the second silk-screen printing candidate area to remove edge interference of the second silk-screen printing candidate area to obtain a third silk-screen printing candidate area; The screen printing candidate area is extracted from the third silk screen printing candidate area according to a preset silk screen printing area size parameter.

7. A storage medium for storing a computer program, characterized in that: When the program is executed by a processor, the method for coarse positioning of a silk-screen area for an optical filter according to any one of claims 1 to 5 is implemented.