Irregular hole detection method and device, electronic equipment and storage medium
By segmenting and extracting features from the light transmission pattern of the circuit board, and using the prior information of standard holes to detect irregular holes, the problem of false detection by standard hole inspection machines is solved, and accurate identification and quality control of irregular holes are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU INTELLIFUSION TECH CO LTD
- Filing Date
- 2022-12-31
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the use of standard hole inspection machines to inspect irregular holes can easily lead to false detections, making it impossible to accurately distinguish between irregular holes and defective holes.
By segmenting the light transmittance image of the plate to be tested, the standard hole area and the area to be confirmed are obtained. The prior information of the standard hole is used to perform image detection on the area to be confirmed to determine whether it is an irregular hole area or a defect area.
It improves the accuracy of irregular hole detection, effectively distinguishes irregular holes from defective holes, and ensures the reliability of circuit board quality inspection.
Smart Images

Figure CN116128830B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial image processing, and in particular to a method, apparatus, electronic device, and storage medium for detecting irregularly shaped holes. Background Technology
[0002] In current circuit board manufacturing processes, standardized production is generally used to ensure the quality of holes on the circuit board. However, this method is highly dependent on the precision of the drilling equipment. When the precision of the drilling equipment decreases, the yield rate of circuit boards printed through perforated plates will be low. Before printing, the perforated plates need to be inspected. A hole inspection machine can be used to check the number of standard holes, hole diameter, hole offset, etc. However, for some special circuit boards, there are often irregularly shaped holes. These irregularly shaped holes are not standard holes. Therefore, using a standard hole inspection machine to inspect irregularly shaped holes will lead to false detections. Summary of the Invention
[0003] This invention provides a method for detecting irregularly shaped holes, aiming to solve the problem of false detection caused by using a standard hole inspection machine to detect irregularly shaped holes in the prior art. By segmenting the transmittance image of the plate to be tested, a standard hole area and a region to be confirmed are obtained. Prior information on the standard hole processing of the standard hole area is extracted to perform image detection on the region to be confirmed. Since the prior information on standard hole processing contains corresponding processing information generated during standard hole processing, this processing information can be used to assist in the detection of the region to be confirmed, thereby determining whether the region to be confirmed is an irregularly shaped hole area or a defect area.
[0004] In a first aspect, embodiments of the present invention provide a method for detecting irregularly shaped holes, the method comprising:
[0005] Obtain the transmittance pattern of the plate under test;
[0006] The light transmittance image is segmented to obtain the standard aperture region and the region to be confirmed;
[0007] Based on the prior information of standard hole processing, the processing of standard holes is extracted, and image detection is performed on the area to be confirmed according to the prior information of standard hole processing to determine whether the area to be confirmed is an irregular hole area or a defect area.
[0008] Optionally, the step of performing image segmentation on the transmittance image to obtain the standard aperture region and the region to be confirmed includes:
[0009] The light-transmitting region in the light-transmitting image is segmented using a preset image segmentation algorithm to obtain the light-transmitting region.
[0010] The light-transmitting areas are classified to obtain standard aperture areas and areas to be confirmed.
[0011] Optionally, the step of extracting prior information for standard hole machining based on the standard hole region includes:
[0012] Feature extraction is performed on the standard holes in each of the standard hole regions to obtain the first processing feature corresponding to each standard hole;
[0013] Based on the first machining features of each of the standard holes, the prior information for machining the standard holes corresponding to each of the standard holes is determined.
[0014] Optionally, the step of performing image detection on the area to be confirmed based on the prior information of the standard hole processing to determine whether the area to be confirmed is an irregular hole area or a defect area includes:
[0015] Feature extraction is performed on each hole in the area to be confirmed to obtain the second processing feature corresponding to each hole.
[0016] Based on the prior information of the standard hole processing and the second processing features corresponding to each of the holes to be confirmed, each of the holes to be confirmed is determined to be an irregular hole or a defective hole.
[0017] Based on whether each of the holes to be confirmed is an irregular hole or a defective hole, the area to be confirmed is determined to be an irregular hole area or a defective area.
[0018] Optionally, determining whether each of the holes to be confirmed is an irregular hole or a defective hole based on the prior information of the standard hole machining and the second machining features corresponding to each of the holes to be confirmed includes:
[0019] The prior information of the standard hole machining is fused with the second machining feature corresponding to each of the holes to be confirmed to obtain the fused feature corresponding to each of the holes to be confirmed.
[0020] A linear transformation is performed on the fusion features corresponding to each of the holes to be confirmed to obtain the target features corresponding to each of the holes to be confirmed.
[0021] The target features corresponding to each of the holes to be confirmed are classified to obtain the classification results for each of the holes to be confirmed.
[0022] Based on the classification results corresponding to each of the holes to be confirmed, each of the holes to be confirmed is determined to be an irregular hole or a defective hole.
[0023] Optionally, fusing the prior information of the standard hole machining with the machining features corresponding to each of the holes to be confirmed to obtain the fused features corresponding to each of the holes to be confirmed includes:
[0024] The prior information of the standard hole machining is spliced with the machining features corresponding to each of the holes to be confirmed at the channel level to obtain the spliced features corresponding to each of the holes to be confirmed.
[0025] By using a preset fusion factor, the splicing features corresponding to each of the holes to be confirmed are fused to obtain the fused features corresponding to each of the holes to be confirmed.
[0026] Optionally, determining the region to be confirmed as an irregularly shaped hole region or a defective hole region based on whether each of the holes to be confirmed is an irregularly shaped hole or a defective hole includes:
[0027] If a defective hole exists in the area to be confirmed, then the area to be confirmed is determined to be a defective area;
[0028] If only irregularly shaped holes exist in the area to be confirmed, then the area to be confirmed is determined to be an area with irregularly shaped holes.
[0029] Secondly, embodiments of the present invention provide an irregular hole detection device, the device comprising:
[0030] The acquisition module is used to acquire the transmittance pattern of the orifice plate under test;
[0031] The segmentation module is used to segment the light transmission image to obtain the standard hole region and the region to be confirmed.
[0032] The determination module is used to extract prior information on standard hole processing based on the standard hole region, and to perform image detection on the region to be confirmed based on the prior information on standard hole processing to determine whether the region to be confirmed is an irregular hole region or a defect region.
[0033] Thirdly, embodiments of the present invention provide an electronic 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 steps in the irregular hole detection method provided in embodiments of the present invention.
[0034] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the irregular hole detection method provided in the embodiments of the invention.
[0035] In this embodiment of the invention, a transmittance image of the test plate is obtained; the transmittance image is segmented to obtain a standard hole region and a region to be confirmed; prior information on the standard hole processing is extracted based on the standard hole region, and image detection is performed on the region to be confirmed based on the prior information on the standard hole processing to determine whether the region to be confirmed is an irregular hole region or a defect region. By segmenting the transmittance image of the test plate to obtain a standard hole region and a region to be confirmed, and extracting the prior information on the standard hole processing of the standard hole region to perform image detection on the region to be confirmed, since the prior information on the standard hole processing contains the corresponding processing information generated during the standard hole processing, this processing information can be used to assist in the detection of the region to be confirmed, thereby determining whether the region to be confirmed is an irregular hole region or a defect region. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart of an irregular hole detection method provided in an embodiment of the present invention;
[0038] Figure 2 This is a schematic diagram of the structure of an irregular hole detection device provided in an embodiment of the present invention;
[0039] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Please see Figure 1 , Figure 1 This is a flowchart of an irregular hole detection method provided by an embodiment of the present invention, such as... Figure 1 As shown, the method for detecting irregularly shaped holes includes the following steps:
[0042] 101. Obtain the transmittance pattern of the plate to be tested.
[0043] In this embodiment of the invention, the test plate is a perforated plate with irregularly shaped holes, and the perforated plate is used for printing on a circuit board.
[0044] The test plate is fixed at a preset photographing station. A backlight is set below the photographing station, and an image acquisition device is set above the photographing station. After the backlight is turned on, the image acquisition device takes a picture of the test plate at the photographing station to obtain the light transmission image of the test plate.
[0045] The aforementioned image acquisition device can be an industrial camera or other types of camera.
[0046] 102. Perform image segmentation on the light transmission image to obtain the standard hole area and the area to be confirmed.
[0047] In this embodiment of the invention, a preset image segmentation algorithm can be used to segment the light transmission image into a background region, a standard hole region, and a region to be confirmed. The standard hole region refers to the area where standard holes are located, and the region to be confirmed refers to the area where non-standard holes are located. The region to be confirmed can be understood as the area where it needs to be confirmed whether it is an irregularly shaped hole or a defective hole. The image segmentation algorithm can be a region growing algorithm, a mean-based iterative segmentation algorithm, or a maximum inter-class variance segmentation algorithm, etc.
[0048] 103. Extract prior information on standard hole processing based on the standard hole region, and perform image detection on the area to be confirmed based on the prior information on standard hole processing to determine whether the area to be confirmed is an irregular hole region or a defect region.
[0049] In this embodiment of the invention, the prior information for standard hole machining can be understood as guiding information generated by the standard machining process of a standard hole. For example, performing standard machining on two standard holes of different sizes, although the machining dimensions of the two standard holes are different, other machining parameters are the same. Therefore, the two machined standard holes will have some common features, which constitute the prior information for standard hole machining. For irregularly shaped holes, the difference from standard holes during machining lies in their size and shape, while other machining parameters remain the same. For defective holes, they are caused by errors in the machining process, and all machining parameters change when an error occurs. Therefore, the prior information for standard hole machining can be used to assist in image detection of the area to be confirmed, and the area to be confirmed can be more accurately determined as an irregularly shaped hole area or a defective area.
[0050] The prior information for machining the aforementioned standard holes may be at least one of the following: the circumferential smoothness of the standard hole, the unit light flux of the standard hole, and the flatness of the circumferential wall of the standard hole.
[0051] In this embodiment of the invention, a transmittance image of the test plate is obtained; the transmittance image is segmented to obtain a standard hole region and a region to be confirmed; prior information on the standard hole processing is extracted based on the standard hole region, and image detection is performed on the region to be confirmed based on the prior information on the standard hole processing to determine whether the region to be confirmed is an irregular hole region or a defect region. By segmenting the transmittance image of the test plate to obtain a standard hole region and a region to be confirmed, and extracting the prior information on the standard hole processing of the standard hole region to perform image detection on the region to be confirmed, since the prior information on the standard hole processing contains the corresponding processing information generated during the standard hole processing, this processing information can be used to assist in the detection of the region to be confirmed, thereby determining whether the region to be confirmed is an irregular hole region or a defect region.
[0052] Optionally, in the step of image segmentation of the light transmission image to obtain the standard aperture region and the region to be confirmed, a preset image segmentation algorithm can be used to segment the light transmission region in the light transmission image to obtain the light transmission region; the light transmission region can be classified to obtain the standard aperture region and the region to be confirmed.
[0053] In this embodiment of the invention, the geometric center point of the light-transmitting hole in the plate to be tested can be determined, and the geometric center point can be used as a seed point for region growth. The seed point is used as the growth starting point, and then the pixels in the surrounding area of the seed point are grown and merged according to the growth rules that the pixel value error is within a preset range until there are no pixels that can meet the growth point, thus obtaining the light-transmitting hole area.
[0054] In one possible embodiment, the light transmittance image is converted to grayscale to obtain a grayscale image of the light transmittance image. A grayscale threshold is calculated by mean iterative segmentation. The light transmittance image is then divided into a light-transmitting aperture region and a background region by using an accuracy threshold.
[0055] After obtaining the light-transmitting aperture region, a trained classification model is used to classify the region, resulting in either standard aperture regions or non-standard aperture regions. Specifically, after obtaining the light-transmitting aperture region, it is input into the trained classification model, which identifies the region as either a standard or non-standard aperture region. Non-standard aperture regions are designated as areas to be investigated.
[0056] Specifically, the classification model mentioned above can be a classification model based on deep convolutional neural networks, such as classification models based on YOLO series, ResNet series, VggNet series, MobileNet series, etc.
[0057] Furthermore, a first dataset and a classification model to be trained can be obtained. The first dataset includes standard hole sample images and classification labels corresponding to the standard hole sample images. The classification model to be trained is then trained in a supervised manner using the first dataset to obtain a trained classification model.
[0058] In this embodiment of the invention, the standard well sample images are various existing types of standard well transmittance images. These standard well sample images can be manually labeled to obtain corresponding classification labels, with each standard well sample image corresponding to one classification label. The classification model to be trained can be constructed based on networks such as the YOLO series, ResNet series, VggNet series, and MobileNet series.
[0059] During training, standard well sample images are input into the classification model to be trained. The model outputs the sample classification results and calculates the error loss between the sample classification results and the corresponding classification labels. The optimization objective is to minimize the error loss between the sample classification results and the corresponding classification labels. Backpropagation is used to adjust the parameters of the classification model to be trained. The above parameter adjustment process is iterated until the number of iterations reaches the preset number or the classification model to be trained converges at the minimum error loss. Training is then stopped, and a trained classification model is obtained.
[0060] Optionally, in the step of extracting prior information for standard hole processing based on the standard hole region, feature extraction can be performed on the standard holes in each standard hole region to obtain the first processing feature corresponding to each standard hole; based on the first processing feature of each standard hole, the prior information for standard hole processing corresponding to each standard hole can be determined.
[0061] In this embodiment of the invention, each standard hole region corresponds to a standard hole. The aforementioned first processing feature may be a feature corresponding to at least one of the following: the circumferential smoothness of the standard hole, the unit luminous flux of the standard hole, and the flatness of the circumferential wall of the standard hole. By identifying the first processing feature, prior information for the processing of the standard hole is obtained. This prior information may be at least one of the following: the circumferential smoothness of the standard hole, the unit luminous flux of the standard hole, and the flatness of the circumferential wall of the standard hole.
[0062] Specifically, the feature extraction engine extracts features from the standard holes in each standard hole region to obtain the first processing features corresponding to each standard hole. The feature recognition engine then identifies the first processing features to obtain the prior information for the processing of the standard holes corresponding to each standard hole.
[0063] The aforementioned feature extraction engine and feature recognition engine can be constructed based on deep convolutional neural networks.
[0064] Optionally, in the step of performing image detection on the area to be confirmed based on the prior information of standard hole processing to determine whether the area to be confirmed is an irregular hole area or a defect area, features can be extracted from the holes to be confirmed in each area to obtain the second processing features corresponding to each hole to be confirmed; based on the prior information of standard hole processing and the second processing features corresponding to each hole to be confirmed, each hole to be confirmed is determined to be an irregular hole or a defective hole; based on whether each hole to be confirmed is an irregular hole or a defective hole, the area to be confirmed is determined to be an irregular hole area or a defective area.
[0065] In this embodiment of the invention, each area to be confirmed corresponds to a hole to be confirmed. The second processing feature can be a feature corresponding to at least one of the following: the circumferential smoothness of the hole to be confirmed, the unit light flux of the standard hole, and the flatness of the circumferential wall of the standard hole. Specifically, the second processing feature is a feature of the same category as the first processing feature.
[0066] Specifically, the feature extraction engine extracts features from the holes to be confirmed in each area to be confirmed, obtaining the second processing features corresponding to each hole to be confirmed. The feature recognition engine then identifies the first processing features to obtain the prior information for the processing of each standard hole.
[0067] The second processing feature can be identified using a feature recognition engine to obtain the processing information of the hole to be confirmed. This information is then compared with the prior information of standard hole processing. Based on the comparison result, it can be determined whether the hole to be confirmed is an irregular hole or a defective hole. If the comparison result between the processing information of the hole to be confirmed and the prior information of standard hole processing is similar, it indicates that the hole to be confirmed is an irregular hole, and the area to be confirmed can be identified as an irregular hole area. If the comparison result between the processing information of the hole to be confirmed and the prior information of standard hole processing is dissimilar, it indicates that the hole to be confirmed is a defective hole, and the area to be confirmed can be identified as a defective area.
[0068] Optionally, in the step of determining whether each hole to be confirmed is an irregular hole or a defective hole based on the prior information of standard hole machining and the machining features corresponding to each hole to be confirmed, the prior information of standard hole machining can be fused with the second machining features corresponding to each hole to be confirmed to obtain the fused features corresponding to each hole to be confirmed; the fused features corresponding to each hole to be confirmed can be linearly transformed to obtain the target features corresponding to each hole to be confirmed; the target features corresponding to each hole to be confirmed can be classified to obtain the classification results corresponding to each hole to be confirmed; and based on the classification results corresponding to each hole to be confirmed, each hole to be confirmed can be determined to be an irregular hole or a defective hole.
[0069] In this embodiment of the invention, after obtaining the prior information for standard hole processing, the first processing feature corresponding to the prior information for standard hole processing can be fused with the second processing feature corresponding to each hole to be confirmed. Because the prior information for standard holes is fused with the second processing feature corresponding to each hole to be confirmed, the fused feature corresponding to the hole to be confirmed possesses the prior information for each standard hole. The dimension of the fused feature can be transformed to a preset dimension through linear transformation to obtain the target feature. For example, the dimension of the fused feature can be transformed to a 1*1*2*n dimension, where 1*1 represents one column multiplied by one row, 2 represents the number of output categories, and n represents the number of holes to be confirmed.
[0070] After obtaining the target features, the target features can be classified using a classifier, such as a support vector machine. The support vector machine is used to classify the target features of the hole to be identified, and the classification result is divided into two categories: irregular hole or defective hole.
[0071] Optionally, in the step of fusing the prior information of standard hole machining with the machining features corresponding to each hole to be confirmed to obtain the fused features corresponding to each hole to be confirmed, the prior information of standard hole machining and the second machining features corresponding to each hole to be confirmed can be spliced at the channel level to obtain the spliced features corresponding to each hole to be confirmed; and the spliced features corresponding to each hole to be confirmed can be fused by a preset fusion factor to obtain the fused features corresponding to each hole to be confirmed.
[0072] In this embodiment of the invention, after obtaining the prior information for standard hole processing, the first processing feature corresponding to the prior information for standard hole processing and the second processing feature corresponding to each hole to be confirmed can be concatenated at the channel level to obtain the concatenated feature corresponding to each hole to be confirmed. The above-mentioned fusion factor can be a 1*1 convolution kernel. Through the 1*1 convolution kernel, the channels of the concatenated features can be fused to obtain a single-channel fused feature.
[0073] Optionally, in the step of determining whether the area to be confirmed is an irregular hole area or a defective area based on whether each hole to be confirmed is an irregular hole or a defective hole, if there is a defective hole in the area to be confirmed, then the area to be confirmed can be determined as a defective area; if there is only an irregular hole in the area to be confirmed, then the area to be confirmed can be determined as an irregular hole area.
[0074] In this embodiment of the invention, the aforementioned defective hole indicates an error during the manufacturing process that causes the hole to be neither a standard hole nor an irregularly shaped hole, thus indicating that the quality of the test plate is unqualified. The aforementioned irregularly shaped hole is caused by design flaws, and there are no errors in the manufacturing process. Since the detection of irregularly shaped holes is aided by prior information about standard holes, the detection of irregularly shaped holes also indicates that the quality of the test plate is acceptable.
[0075] It should be noted that the irregular hole detection method provided in this embodiment of the invention can be applied to devices such as smart cameras, smartphones, computers, and servers that are capable of performing irregular hole detection.
[0076] Optional, please see Figure 2 , Figure 2 This is a schematic diagram of the structure of an irregular hole detection device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the device includes:
[0077] The acquisition module 201 is used to acquire the transmittance pattern of the plate under test;
[0078] The segmentation module 202 is used to segment the light transmission image to obtain a standard hole region and a region to be confirmed.
[0079] The determination module 203 is used to extract prior information on standard hole processing based on the standard hole region, and to perform image detection on the region to be confirmed based on the prior information on standard hole processing, to determine whether the region to be confirmed is an irregular hole region or a defect region.
[0080] Optionally, the segmentation module 202 includes:
[0081] The segmentation submodule is used to segment the light-transmitting region in the light-transmitting image using a preset image segmentation algorithm to obtain the light-transmitting region;
[0082] The classification submodule is used to classify the light-transmitting areas to obtain standard aperture areas and areas to be confirmed.
[0083] Optionally, the determining module 203 includes:
[0084] The first extraction submodule is used to extract features from the standard holes in each of the standard hole regions to obtain the first processing features corresponding to each of the standard holes;
[0085] The first determining submodule is used to determine the prior information of standard hole processing corresponding to each standard hole based on the first processing features of each standard hole.
[0086] Optionally, the determining module 203 includes:
[0087] The second extraction submodule is used to extract features from each hole to be confirmed in the area to be confirmed, and to obtain the second processing features corresponding to each hole to be confirmed.
[0088] The second determining submodule is used to determine whether each of the holes to be confirmed is an irregular hole or a defective hole based on the prior information of the standard hole processing and the second processing features corresponding to each of the holes to be confirmed.
[0089] The third determining submodule is used to determine whether the area to be confirmed is an irregular hole area or a defective area based on whether each of the holes to be confirmed is an irregular hole or a defective hole.
[0090] Optionally, the second determining submodule includes:
[0091] The fusion unit is used to fuse the prior information of the standard hole processing with the second processing feature corresponding to each of the holes to be confirmed, so as to obtain the fused feature corresponding to each of the holes to be confirmed.
[0092] The transformation unit is used to perform a linear transformation on the fusion features corresponding to each of the holes to be confirmed, so as to obtain the target features corresponding to each of the holes to be confirmed.
[0093] A classification unit is used to classify the target features corresponding to each of the holes to be confirmed, and to obtain the classification results corresponding to each of the holes to be confirmed.
[0094] The first determining unit is used to determine whether each of the holes to be confirmed is an irregular hole or a defective hole based on the classification result corresponding to each hole to be confirmed.
[0095] Optionally, the fusion unit includes:
[0096] The splicing subunit is used to splice the prior information of the standard hole processing with the processing features corresponding to each of the holes to be confirmed at the channel level to obtain the splicing features corresponding to each of the holes to be confirmed.
[0097] The fusion subunit is used to fuse the splicing features corresponding to each of the holes to be confirmed by a preset fusion factor to obtain the fused features corresponding to each of the holes to be confirmed.
[0098] Optionally, the third determining submodule includes:
[0099] The second determining unit is used to determine the area to be confirmed as a defective area if there is a defective hole in the area to be confirmed.
[0100] The third determining unit is used to determine the area to be confirmed as an area with irregular holes if only irregular holes exist in the area to be confirmed.
[0101] It should be noted that the irregular hole detection device provided in this embodiment of the invention can be applied to devices such as smart cameras, smartphones, computers, and servers that can perform irregular hole detection methods.
[0102] The irregular hole detection device provided in this embodiment of the invention can realize all the processes implemented by the irregular hole detection method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0103] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program for detecting irregular holes stored in the memory 302 and executable on the processor 301, wherein:
[0104] The processor 301 is used to call the computer program stored in the memory 302 and perform the following steps:
[0105] Obtain the transmittance pattern of the plate under test;
[0106] The light transmittance image is segmented to obtain the standard aperture region and the region to be confirmed;
[0107] Based on the prior information of standard hole processing, the processing of standard holes is extracted, and image detection is performed on the area to be confirmed according to the prior information of standard hole processing to determine whether the area to be confirmed is an irregular hole area or a defect area.
[0108] Optionally, the image segmentation of the transmittance image performed by processor 301 to obtain a standard aperture region and a region to be confirmed includes:
[0109] The light-transmitting region in the light-transmitting image is segmented using a preset image segmentation algorithm to obtain the light-transmitting region.
[0110] The light-transmitting areas are classified to obtain standard aperture areas and areas to be confirmed.
[0111] Optionally, the prior information for extracting standard hole machining based on the standard hole region, executed by processor 301, includes:
[0112] Feature extraction is performed on the standard holes in each of the standard hole regions to obtain the first processing feature corresponding to each standard hole;
[0113] Based on the first machining features of each of the standard holes, the prior information for machining the standard holes corresponding to each of the standard holes is determined.
[0114] Optionally, the processor 301 performs image detection on the area to be confirmed based on the prior information of the standard hole machining to determine whether the area to be confirmed is an irregular hole area or a defect area, including:
[0115] Feature extraction is performed on each hole in the area to be confirmed to obtain the second processing feature corresponding to each hole.
[0116] Based on the prior information of the standard hole processing and the second processing features corresponding to each of the holes to be confirmed, each of the holes to be confirmed is determined to be an irregular hole or a defective hole.
[0117] Based on whether each of the holes to be confirmed is an irregular hole or a defective hole, the area to be confirmed is determined to be an irregular hole area or a defective area.
[0118] Optionally, the processor 301 executes the prior information based on the standard hole machining and the second machining features corresponding to each of the holes to be confirmed, and determines each of the holes to be confirmed as an irregular hole or a defective hole, including:
[0119] The prior information of the standard hole machining is fused with the second machining feature corresponding to each of the holes to be confirmed to obtain the fused feature corresponding to each of the holes to be confirmed.
[0120] A linear transformation is performed on the fusion features corresponding to each of the holes to be confirmed to obtain the target features corresponding to each of the holes to be confirmed.
[0121] The target features corresponding to each of the holes to be confirmed are classified to obtain the classification results for each of the holes to be confirmed.
[0122] Based on the classification results corresponding to each of the holes to be confirmed, each of the holes to be confirmed is determined to be an irregular hole or a defective hole.
[0123] Optionally, the process executed by processor 301 to fuse the prior information of the standard hole machining with the machining features corresponding to each of the holes to be confirmed to obtain the fused features corresponding to each of the holes to be confirmed includes:
[0124] The prior information of the standard hole machining is spliced with the machining features corresponding to each of the holes to be confirmed at the channel level to obtain the spliced features corresponding to each of the holes to be confirmed.
[0125] By using a preset fusion factor, the splicing features corresponding to each of the holes to be confirmed are fused to obtain the fused features corresponding to each of the holes to be confirmed.
[0126] Optionally, the step of determining the region to be confirmed as an irregularly shaped hole region or a defective hole region based on whether each of the holes to be confirmed is an irregularly shaped hole or a defective hole, executed by the processor 301, includes:
[0127] If a defective hole exists in the area to be confirmed, then the area to be confirmed is determined to be a defective area;
[0128] If only irregularly shaped holes exist in the area to be confirmed, then the area to be confirmed is determined to be an area with irregularly shaped holes.
[0129] The electronic device provided in this embodiment of the invention can implement all the processes of the irregular hole detection method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0130] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the irregular hole detection method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0131] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (RON), or random access memory (RAN), etc.
[0132] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for detecting irregularly shaped holes, characterized in that, Includes the following steps: Obtain the transmittance pattern of the plate under test; The light transmittance image is segmented to obtain the standard aperture region and the region to be confirmed; Based on the standard hole region, prior information on standard hole processing is extracted, and image detection is performed on the region to be confirmed according to the prior information on standard hole processing to determine whether the region to be confirmed is an irregular hole region or a defect region. Specifically, features are extracted for each hole to be confirmed in the region to be confirmed to obtain a second processing feature corresponding to each hole to be confirmed; the prior information on standard hole processing is fused with the second processing feature corresponding to each hole to be confirmed to obtain a fused feature corresponding to each hole to be confirmed; a linear transformation is performed on the fused feature corresponding to each hole to be confirmed to obtain a target feature corresponding to each hole to be confirmed; the target feature corresponding to each hole to be confirmed is classified to obtain a classification result corresponding to each hole to be confirmed; according to the classification result corresponding to each hole to be confirmed, each hole to be confirmed is determined to be an irregular hole or a defective hole; according to whether each hole to be confirmed is an irregular hole or a defective hole, the region to be confirmed is determined to be an irregular hole region or a defective region.
2. The method for detecting irregularly shaped holes as described in claim 1, characterized in that, The step of segmenting the light transmittance image to obtain the standard aperture region and the region to be confirmed includes: The light-transmitting region in the light-transmitting image is segmented using a preset image segmentation algorithm to obtain the light-transmitting region. The light-transmitting areas are classified to obtain standard aperture areas and areas to be confirmed.
3. The method for detecting irregularly shaped holes as described in claim 2, characterized in that, The extraction of prior information for standard hole machining based on the standard hole region includes: Feature extraction is performed on the standard holes in each of the standard hole regions to obtain the first processing feature corresponding to each standard hole; Based on the first machining features of each of the standard holes, the prior information for machining the standard holes corresponding to each of the standard holes is determined.
4. The method for detecting irregularly shaped holes as described in claim 1, characterized in that, The step of fusing the prior information of the standard hole machining with the machining features corresponding to each of the holes to be confirmed to obtain the fused features corresponding to each of the holes to be confirmed includes: The prior information of the standard hole machining is spliced with the machining features corresponding to each of the holes to be confirmed at the channel level to obtain the spliced features corresponding to each of the holes to be confirmed. By using a preset fusion factor, the splicing features corresponding to each of the holes to be confirmed are fused to obtain the fused features corresponding to each of the holes to be confirmed.
5. The method for detecting irregularly shaped holes as described in claim 4, characterized in that, The step of determining the region to be confirmed as an irregularly shaped hole region or a defective hole region based on whether each of the holes to be confirmed is an irregularly shaped hole or a defective hole includes: If a defective hole exists in the area to be confirmed, then the area to be confirmed is determined to be a defective area; If only irregularly shaped holes exist in the area to be confirmed, then the area to be confirmed is determined to be an area with irregularly shaped holes.
6. A device for detecting irregularly shaped holes, characterized in that, The device includes: The acquisition module is used to acquire the transmittance pattern of the orifice plate under test; The segmentation module is used to segment the light transmission image to obtain the standard hole region and the region to be confirmed. The determination module is used to extract prior information on standard hole processing based on the standard hole region, and to perform image detection on the region to be confirmed based on the prior information on standard hole processing to determine whether the region to be confirmed is an irregular hole region or a defect region. Specifically, features are extracted from each hole to be confirmed in the region to be confirmed to obtain a second processing feature corresponding to each hole to be confirmed; the prior information on standard hole processing is fused with the second processing feature corresponding to each hole to be confirmed to obtain a fused feature corresponding to each hole to be confirmed; a linear transformation is performed on the fused feature corresponding to each hole to be confirmed to obtain a target feature corresponding to each hole to be confirmed; the target feature corresponding to each hole to be confirmed is classified to obtain a classification result corresponding to each hole to be confirmed; based on the classification result corresponding to each hole to be confirmed, each hole to be confirmed is determined to be an irregular hole or a defective hole; based on whether each hole to be confirmed is an irregular hole or a defective hole, the region to be confirmed is determined to be an irregular hole region or a defective region.
7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the irregular hole detection method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the irregular hole detection method as described in any one of claims 1 to 5.