Methods, apparatus, equipment and storage media for high-precision defect detection of complex metal surfaces
By using automated inspection methods to process images and identify abnormal colors on complex metal surfaces, the problems of high false detection rate and long time consumption in manual inspection are solved, and high-precision defect detection is achieved.
Patent Information
- Application Number
- CN202211509090.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Current methods for detecting defects on complex metal surfaces rely on manual inspection, which suffers from high false positive and false negative rates and is time-consuming.
An automated method is used to acquire images of complex surfaces of the target metal, delineate the inspection area, select an inspection template for position correction, identify abnormal colors and receive user parameters, perform inspection using a preset detection program, and mark abnormal colors when they do not meet the conditions.
It improves the accuracy of defect detection on complex metal surfaces, reduces false positives and false negatives, and shortens the detection time.
Smart Images

Figure CN115731208B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of physical analysis technology, and in particular to a method, apparatus, equipment and storage medium for high-precision defect detection of complex metal surfaces. Background Technology
[0002] Metal sheets are now widely integrated into various devices, so defects in these sheets can often lead to equipment malfunctions. Therefore, when a device malfunctions, the metal sheets it contains should be inspected first. Since these metal sheets typically rely on their complex metallic surfaces to transmit signals, the complex metallic surfaces are usually inspected when checking for defects.
[0003] Existing defect detection methods for complex metal surfaces are usually based on manual inspection. However, the accuracy of manual inspection is easily affected by the experience and condition of the inspectors. It is not only time-consuming but also has a high rate of missed detection and false detection. Therefore, there is an urgent need for an automated method for detecting complex metal surfaces.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a high-precision defect detection method, apparatus, device, and storage medium for complex metal surfaces, aiming to solve the technical problems of high error rate and long time consumption in existing manual inspection of complex metal surfaces. To achieve the above objective, this invention provides a high-precision defect detection method for complex metal surfaces, the method comprising:
[0006] Acquire an image of the complex surface of the target metal, and delineate an inspection area in the image of the complex surface of the target metal;
[0007] Select the inspection template corresponding to the complex surface image of the target metal, and correct the position of the inspection area based on the inspection template to obtain the target detection area;
[0008] Identify abnormal colors in the target detection area, place the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user;
[0009] Based on the inspection parameters, the abnormal color placed in the inspection channel is detected by a preset detection program;
[0010] When the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, the abnormal color region is marked.
[0011] Optionally, the step of acquiring an image of the complex surface of the target metal and delineating an inspection area in the image of the complex surface of the target metal includes:
[0012] Select an image input source, and acquire an image of the target metal complex surface based on the image input source;
[0013] Select the creation method for the inspection area, and when the creation method is selected as drawing, select the creation shape for the inspection area;
[0014] Select the drawing reference point, and delineate the inspection area in the target metal complex surface image based on the selected created shape.
[0015] Optionally, the step of selecting an inspection template corresponding to the image of the complex surface of the target metal, and correcting the position of the inspection area based on the inspection template to obtain the target detection area includes:
[0016] Select the inspection template corresponding to the target metal complex surface image, and perform shape matching on the target metal complex surface image based on the inspection template;
[0017] Feature parameters are obtained from the inspection template, and a reference coordinate system is established based on the feature parameters;
[0018] Based on the reference coordinate system, the position of the target metal complex surface image after shape matching is corrected to obtain the target detection area.
[0019] Optionally, the step of identifying abnormal colors in the target detection area and placing the identified abnormal colors into the inspection channel includes:
[0020] Configure the color space of the target detection area and set the corresponding recognition area for abnormal colors;
[0021] The abnormal color is obtained from the identification area and then placed into the inspection channel.
[0022] Optionally, after detecting the abnormal color placed in the inspection channel based on the inspection parameters and a preset detection program, the method further includes:
[0023] When the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, an alarm is displayed on the abnormal node corresponding to the abnormal color based on the preset process template.
[0024] Optionally, after selecting the inspection template corresponding to the image of the complex surface of the target metal and correcting the position of the inspection area based on the inspection template to obtain the target detection area, the method further includes:
[0025] Based on a preset detection procedure, the presence of preset defects in the target detection area is detected. The preset defects include: preset scratches, preset foreign objects, and preset dirt.
[0026] When the preset defect is detected in the target detection area, an alarm is displayed for the detection node corresponding to the preset defect based on the preset process template.
[0027] Optionally, before acquiring the image of the complex surface of the target metal, the method further includes:
[0028] Detect whether an image acquisition signal is received from the PLC module;
[0029] When the image acquisition signal is detected, an image of the complex surface of the target metal is acquired.
[0030] Furthermore, to achieve the above objectives, the present invention also proposes a high-precision defect detection device for complex metal surfaces, the high-precision defect detection device for complex metal surfaces comprising:
[0031] The region delineation module is used to acquire an image of the complex surface of the target metal and delineate an inspection region in the image of the complex surface of the target metal;
[0032] The position correction module is used to select the inspection template corresponding to the complex surface image of the target metal, and to correct the position of the inspection area based on the inspection template to obtain the target detection area;
[0033] The color recognition module is used to identify abnormal colors in the target detection area, put the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user.
[0034] An anomaly detection module is used to detect the abnormal color placed in the inspection channel based on the inspection parameters and through a preset detection program;
[0035] An anomaly marking module is used to mark the abnormal color region when the grayscale value of the detected abnormal color and the area of the abnormal color region do not meet preset conditions.
[0036] Optionally, the high-precision defect detection module for complex metal surfaces is also used for high-precision defect detection of complex metal surfaces;
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a high-precision defect detection device for complex metal surfaces. The device includes: a memory, a processor, and a high-precision defect detection program for complex metal surfaces stored in the memory and executable on the processor. The high-precision defect detection program for complex metal surfaces is configured to implement the steps of the high-precision defect detection method for complex metal surfaces as described above.
[0038] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a high-precision defect detection program for complex metal surfaces, wherein the high-precision defect detection program for complex metal surfaces, when executed by a processor, implements the steps of the high-precision defect detection method for complex metal surfaces as described above.
[0039] This invention discloses a high-precision defect detection method, apparatus, device, and storage medium for complex metal surfaces. The method includes: acquiring an image of a target complex metal surface and delineating an inspection area within the image; selecting an inspection template corresponding to the target complex metal surface image and correcting the position of the inspection area based on the template to obtain a target detection area; identifying abnormal colors within the target detection area, placing the identified abnormal colors into inspection channels, and receiving inspection parameters input by the user; detecting the abnormal colors placed into the inspection channels based on the inspection parameters using a preset detection program; and marking the abnormal color area when the detected abnormal color's grayscale value and the area of the abnormal color region do not meet preset conditions. Unlike existing manual inspection methods with high error rates and long processing times, this embodiment can automatically perform real-time anomaly detection on the acquired complex metal surface image, reducing false positives and false negatives caused by manual inspection and improving the speed of anomaly detection. Therefore, this embodiment improves the accuracy of anomaly detection for complex metal surfaces and reduces the detection time. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of a high-precision defect detection device for complex metal surfaces in the hardware operating environment involved in the embodiments of the present invention;
[0041] Figure 2 This is a flowchart illustrating the first embodiment of the high-precision defect detection method for complex metal surfaces of the present invention.
[0042] Figure 3 This is a schematic diagram of the communication management module configured in the first embodiment of the high-precision defect detection method for complex metal surfaces of the present invention;
[0043] Figure 4 This is a schematic diagram of a normal complex metal surface in the first embodiment of the high-precision defect detection method for complex metal surfaces of the present invention;
[0044] Figure 5 This is a flowchart illustrating the second embodiment of the high-precision defect detection method for complex metal surfaces of the present invention.
[0045] Figure 6 This is a schematic diagram of image input and inspection area creation in the second embodiment of the high-precision defect detection method for complex metal surfaces of the present invention;
[0046] Figure 7This is a flowchart illustrating the third embodiment of the high-precision defect detection method for complex metal surfaces of the present invention.
[0047] Figure 8 This is a schematic diagram of a preset process template in the third embodiment of the high-precision defect detection method for complex metal surfaces of the present invention;
[0048] Figure 9 This is a structural block diagram of the first embodiment of the high-precision defect detection device for complex metal surfaces of the present invention.
[0049] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0050] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0051] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a high-precision defect detection device for complex metal surfaces in the hardware operating environment of the embodiment of the present invention.
[0052] like Figure 1 As shown, the high-precision defect detection device for complex metal surfaces may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the high-precision defect detection equipment for complex metal surfaces. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0054] like Figure 1As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a high-precision defect detection program for complex metal surfaces.
[0055] exist Figure 1 In the high-precision defect detection device for complex metal surfaces shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the high-precision defect detection device for complex metal surfaces of the present invention can be set in the high-precision defect detection device for complex metal surfaces. The high-precision defect detection device for complex metal surfaces calls the high-precision defect detection program for complex metal surfaces stored in the memory 1005 through the processor 1001 and executes the high-precision defect detection method for complex metal surfaces provided in the embodiment of the present invention.
[0056] This invention provides a high-precision defect detection method for complex metal surfaces, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the high-precision defect detection method for complex metal surfaces according to the present invention.
[0057] In this embodiment, the high-precision defect detection method for complex metal surfaces includes the following steps:
[0058] Step S10: Obtain an image of the complex surface of the target metal, and delineate the inspection area in the image of the complex surface of the target metal;
[0059] It should be noted that the executing entity of the method in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer or personal computer, or other electronic devices capable of performing the same or similar functions. Here, the high-precision defect detection method for complex metal surfaces provided in this embodiment and the following embodiments will be specifically described using the aforementioned high-precision defect detection device for complex metal surfaces (hereinafter referred to as the detection device).
[0060] Furthermore, the aforementioned target metal complex surface refers to the complex surface of the metal sheet or block or other metal device to be inspected. In practical applications, multiple workstations can be used, meaning multiple sets of image acquisition devices equipped with customized lenses and light sources can be used to perform anomaly detection on the target metal complex surface. The specific number of workstations is not limited in this embodiment. The aforementioned detection device can inspect the image acquired at any of the workstations. Since the orientation of the target metal complex surface acquired at each workstation is different, the parts that need to be inspected may also be different. Therefore, the detection device needs to delineate the inspection area corresponding to the workstation that acquired the image in the acquired target metal complex surface image.
[0061] Understandably, although this detection device can automatically detect anomalies on complex metal surfaces, it will not continuously perform detection to reduce energy consumption. In this embodiment, the detection device is connected to a PLC module, and only after receiving the image acquisition signal transmitted by the PLC module will the detection device acquire the image of the target complex metal surface from the peripheral device (i.e., the aforementioned image acquisition device).
[0062] In practical implementation, before acquiring the image of the complex surface of the target metal, it is necessary to configure the communication parameters in the communication management module of the detection system for serial or TCP (Transmission Control Protocol) communication between the software system in the detection device and the aforementioned peripheral devices. These communication parameters can be freely configured, such as... Figure 3 As shown, Figure 3 This is a schematic diagram of the communication management module configured in the first embodiment of the high-precision defect detection method for complex metal surfaces of the present invention. Specifically, the IP address (i.e., target IP), transmission port (i.e. target port), and data transmission direction (receiving data or sending data) of the detection device can be configured.
[0063] Step S20: Select the inspection template corresponding to the image of the complex surface of the target metal, and correct the position of the inspection area based on the inspection template to obtain the target detection area;
[0064] Understandably, although a rough inspection area has been delineated in the image of the complex surface of the target metal, the uncertainties in the placement of the complex surface and the image acquisition equipment necessitate positional correction of the acquired inspection area to obtain a more precise detection range, i.e., the target detection area. Furthermore, since the images acquired at each workstation have different orientations, the faults requiring inspection may also differ. Therefore, before performing area localization again, a corresponding inspection template must be selected to correct the position of the aforementioned inspection area; this inspection template serves as the positioning template for obtaining the target detection area.
[0065] Step S30: Identify abnormal colors in the target detection area, put the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user;
[0066] It should be noted that, with Figure 4 Let's take an example to illustrate this. Figure 4 This is a schematic diagram of a normal complex metal surface in the first embodiment of the high-precision defect detection method for complex metal surfaces of the present invention, as shown below. Figure 4As shown, a normal image of a complex metal surface is typically gray. The abnormal colors mentioned above are the colors other than gray in the acquired image of the target complex metal surface. Each abnormal color usually corresponds to a specific fault; for example, blue corresponds to oil stains, and yellow corresponds to damage or copper leakage on the complex metal surface. If an abnormality is detected, it will be... Figure 4 The detected anomalies are displayed using corresponding colors. The aforementioned inspection channel can be an algorithm channel used for anomaly detection. The aforementioned inspection parameters are the parameters for anomaly detection and the corresponding anomaly (or normal) thresholds for each parameter. These inspection parameters are input by the user or relevant personnel through the software system of the detection equipment.
[0067] Step S40: Based on the inspection parameters, the abnormal color placed in the inspection channel is detected by a preset detection program;
[0068] It should be noted that after configuring the above inspection channels and inspection parameters, the testing equipment can start the preset inspection program. In the actual inspection process, the preset inspection program can detect whether there is an abnormal color in the target inspection area that is placed in the inspection channel, as well as the gray value of the abnormal color and the area of the color region.
[0069] Step S50: When the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, the abnormal color region is marked.
[0070] It should be noted that the process of detecting whether an abnormal color in the target detection area meets the preset conditions can be as follows: First, determine whether the grayscale value of an abnormal color is higher or lower than a preset grayscale value threshold for that abnormal color, or whether it is within the preset grayscale value threshold range. After determining that the abnormal color does not meet the preset conditions for grayscale values, then determine whether the area of the abnormal color region is greater than a preset area threshold. When both the grayscale value and the area of the detected abnormal color are not within the preset threshold range (i.e., the preset grayscale value threshold and the preset area threshold), it is determined that the abnormal color does not meet the preset conditions, and the detection device will mark the abnormal color region in the acquired image of the complex surface of the target metal. The specific size of the preset grayscale value threshold (or the size of the preset grayscale value range) and the size of the preset area threshold for the color region are not limited in this embodiment. In addition, this embodiment can use Blob analysis to determine the grayscale value and area of abnormal colors, because Blob analysis can extract and mark connected components in the binary image after image processing. In practical applications, after acquiring an image of a complex surface of a target metal, the image is segmented to obtain an image of the target detection region. Then, the image of the target detection region is processed to obtain a binary image of the target detection region. Finally, based on Blob analysis, the grayscale range and area of a certain abnormal color are selected in the binary image of the target detection region to determine whether the abnormal color meets the preset conditions.
[0071] In addition, the method of marking abnormal colors can be to mark the abnormal color area in red or to mark the abnormal color area with a shadow. This embodiment does not limit the specific marking method.
[0072] In its implementation, the inspection equipment first configures the communication parameters for serial or TCP communication between the software system and peripheral devices (i.e., the aforementioned image acquisition devices) in the communication management module. Then, it checks whether it receives the image acquisition signal from the PLC module. Upon receiving the signal, it acquires the image of the target metal complex surface from the peripheral device. After acquiring the image, the inspection area is roughly delineated. Then, an inspection template corresponding to the station where the image was acquired is selected, and the inspection area is precisely located based on this template to obtain the target inspection area. Next, abnormal colors within the target inspection area are identified, and each abnormal color is placed into an inspection channel, while user-input inspection parameters are received. Finally, a preset inspection program detects the abnormal colors placed in the inspection channels. Based on Blob analysis, if the grayscale value and area of an abnormal color do not meet preset conditions, the abnormal color area is marked.
[0073] This embodiment acquires an image of a complex metal surface and delineates an inspection area within it. It selects an inspection template corresponding to the target complex metal surface image and corrects the position of the inspection area based on the template to obtain the target detection area. Abnormal colors within the target detection area are identified and placed into inspection channels, while user-input inspection parameters are received. Based on these parameters, a preset detection program is used to detect the abnormal colors placed in the inspection channels. When the grayscale value of an abnormal color and the area of the abnormal color region do not meet preset conditions, the abnormal color region is marked. Unlike existing manual inspection methods with high error rates and long processing times, this embodiment automatically performs real-time anomaly detection on the acquired complex metal surface image based on a preset detection program. This not only reduces false positives and false negatives caused by manual inspection but also improves the speed of anomaly detection for complex metal surfaces. Therefore, this embodiment improves the accuracy of anomaly detection for complex metal surfaces and reduces the detection time.
[0074] Reference Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the high-precision defect detection method for complex metal surfaces of the present invention, based on the above. Figure 2 The illustrated embodiment presents a second embodiment of the high-precision defect detection method for complex metal surfaces according to the present invention.
[0075] In this embodiment, step S10 includes:
[0076] Step S101: Select an image input source and acquire an image of the target metal complex surface based on the image input source;
[0077] It should be noted that the above-mentioned image input sources can be the image acquisition devices corresponding to each workstation. Each image acquisition device has a corresponding input source number. For ease of understanding, they are referred to as... Figure 6 Let's take an example to illustrate this. Figure 6 This is a schematic diagram of image input and inspection area creation in the second embodiment of the high-precision defect detection method for complex metal surfaces of the present invention. Figure 6 The displayed interface allows users to select an image input source by entering the source number. After receiving the image acquisition signal from the PLC module, the system acquires the image of the target metal complex surface from the image acquisition device at the workstation corresponding to the selected image input source.
[0078] Step S102: Select the creation method for the inspection area, and when the creation method is selected as drawing, select the creation shape for the inspection area;
[0079] Step S103: Select the drawing reference point, and delineate the inspection area in the target metal complex surface image based on the selected created shape.
[0080] It should be noted that, Figure 6 In the displayed interface, the ROI area is the aforementioned inspection area, which is... Figure 6 As can be seen, there are two ways to create the inspection area: drawing and inheritance. If inheritance is selected, the inspection area will be created in the same way as the previous inspection. If drawing is selected, one of the three shapes can be selected first, and then a point can be selected in the complex surface image of the target metal as the drawing reference point. The selected shape can then be drawn based on the reference point to create the inspection area.
[0081] Understandably, the above steps only provide a rough location of the inspection area, and a more precise location is required. Therefore, as an implementation method, step S20 further includes:
[0082] Step S201: Select the inspection template corresponding to the target metal complex surface image, and perform shape matching on the target metal complex surface image based on the inspection template;
[0083] It should be noted that since the type or area of the fault to be detected on the complex metal surface may be different, the corresponding inspection template may also be different. Therefore, the inspection equipment first needs to select a template corresponding to the type or area of the fault to be detected. Understandably, the size of the acquired image of the target complex metal surface may be different from that of the selected template. Therefore, the image of the target complex metal surface can be scaled based on the selected inspection template to achieve shape matching between the inspection template and the image of the target complex metal surface, thereby improving the detection accuracy.
[0084] Step S202: Obtain feature parameters from the inspection template and establish a reference coordinate system based on the feature parameters;
[0085] Step S203: Based on the reference coordinate system, perform position correction on the target metal complex surface image after shape matching to obtain the target detection area.
[0086] It should be noted that the aforementioned feature parameters can be position correction parameters input by the inspection personnel. These feature parameters include the position correction selection method, origin, and angle. The position correction selection method includes: point-based (performing position correction) and coordinate-based (performing position correction). Regardless of whether point-based or coordinate-based selection is chosen, the feature parameters serve as the selected reference point to locate the point to be inspected. In practical applications, the inspection equipment establishes a reference coordinate system based on the feature parameters. Then, based on the relative positions of the feature points (or feature coordinates) in the reference coordinate system and the inspection template with the point to be inspected (or the coordinates to be inspected), position correction is performed to locate the point to be inspected (or the coordinates to be inspected), thereby obtaining the target inspection area.
[0087] In addition, before performing abnormal color recognition, the color space of the target detection area can be set first, that is, the color model, hue, saturation and brightness parameters for color inspection can be set. The color model can be the HSV color model. Then, the corresponding recognition area for each abnormal color can be set, each abnormal color can be obtained from the recognition area, and each obtained abnormal color can be put into the inspection channel.
[0088] This embodiment selects an image input source and acquires an image of the target metal complex surface based on the image input source; selects the creation method of the inspection area, and when the creation method is selected as drawing, selects the creation shape of the inspection area; selects a drawing reference point, and delineates the inspection area in the target metal complex surface image based on the selected creation shape; selects an inspection template corresponding to the target metal complex surface image, and performs shape matching on the target metal complex surface image based on the inspection template; obtains feature parameters from the inspection template, and establishes a reference coordinate system based on the feature parameters; and performs position correction on the target metal complex surface image after shape matching based on the reference coordinate system to obtain the target detection area. This embodiment not only selects an inspection template corresponding to the target metal complex surface image acquired at each workstation for fault inspection, but also achieves precise positioning of the detection area by performing shape matching and position correction between the inspection template and the target metal complex surface image, further improving the accuracy of anomaly detection.
[0089] Reference Figure 7 , Figure 7 This is a flowchart illustrating the third embodiment of the high-precision defect detection method for complex metal surfaces of the present invention, based on the above. Figure 2 Alternatively, as shown in embodiment 5, a third embodiment of the high-precision defect detection method for complex metal surfaces of the present invention is proposed. Figure 7 Based on Figure 1 The embodiments shown are examples of the proposed embodiments.
[0090] In this embodiment, after step S40, the method further includes:
[0091] Step S51: When the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, an alarm is displayed for the abnormal node corresponding to the abnormal color based on the preset process template.
[0092] It should be noted that there are two alarm programs in the display interface of the detection equipment. The detection equipment can not only mark abnormal color areas in the acquired complex surface image of the target metal to issue alarms, but also display alarms for abnormal nodes corresponding to each abnormal color through a preset process template. This preset process template will be displayed in the software system of the detection equipment.
[0093] Furthermore, it is understandable that the target metal complex surface may not only have anomalies that can be judged and detected by color, such as oil stains or copper leakage, but may also have defects that cannot be judged by color, such as dust, scratches, indentations, and foreign objects. These defects are not much different from the original color (i.e., gray) of the metal complex surface and are difficult to detect by color recognition.
[0094] Therefore, further, this embodiment also includes the following after step S20:
[0095] Step S311: Based on a preset detection program, detect whether there are preset defects in the target detection area. The preset defects include: preset scratches, preset foreign objects, and preset dirt.
[0096] Step S312: When the preset defect is detected in the target detection area, an alarm is displayed for the detection node corresponding to the preset defect based on the preset process template.
[0097] It should be noted that the aforementioned preset defects include: surface indentations, scratches, and edge collapses on complex metal surfaces; preset foreign objects include: foreign objects inside grooves and holes on complex metal surfaces. The detection of preset defects is based on deep learning for image segmentation using a pre-trained model file. After detecting preset defects, foreign objects, and dirt in the aforementioned target detection areas, the size and width of the preset defects are further filtered using Blob analysis to determine the area of the detected preset defects. If the area of a detected preset defect is larger than the preset defect area, an alarm is displayed for the nodes corresponding to the preset defects such as preset defects, preset foreign objects, and preset dirt based on a preset process template. The display method can be by illuminating the corresponding node module.
[0098] For ease of understanding, Figure 8 Let's take an example to illustrate this. Figure 8 This is a schematic diagram of a preset process template in the third embodiment of the high-precision defect detection method for complex metal surfaces of the present invention, as shown below. Figure 8 As shown, this preset workflow template includes the execution flow for anomaly detection by the inspection equipment. This preset workflow template may include nodes such as: image input source, region delineation, template configuration, position correction, image processing, preset scratch detection, preset foreign object detection, preset dirt detection, and color-shifting (blue, oil stains) and (yellow, copper leakage). During anomaly detection by the inspection equipment... Figure 8 Each branch will proceed, and the running indicator light for the executed node in each branch will illuminate. Therefore, if the running indicator light for the final node of a branch illuminates, it means that an exception corresponding to that branch has been detected. Figure 8 As shown, Figure 8When the indicator lights for the preset scratch detection and the blue (oil stain) indicator are illuminated, it means that the target metal complex surface being detected has preset scratches and oil stains. It is understood that in practical applications, preset scratch detection nodes may include: pressure scratch detection nodes, scratch detection nodes, and edge collapse detection nodes; preset foreign object detection nodes may include: foreign object detection nodes in grooves and foreign object detection nodes in holes.
[0099] In practical implementation, if the preset detection program detects that the grayscale value of a certain abnormal color and the area of the abnormal color region do not meet the preset conditions, then in such a case... Figure 8 In the area where the preset process template shown is located, the final node corresponding to the abnormal color is illuminated; when a preset defect is detected in the target detection area, in the following... Figure 8 The area where the preset process template is located will be illuminated to show the final node corresponding to the detected preset defect.
[0100] This embodiment provides an alarm display for the abnormal node corresponding to the abnormal color in a preset process template area when the grayscale value and area of the abnormal color detected do not meet preset conditions. Furthermore, based on a preset detection program, this embodiment detects whether preset defects exist in the target detection area. These preset defects include preset scratches, preset foreign objects, and preset dirt. When a preset defect is detected in the target detection area, an alarm display is provided for the detection node corresponding to the preset defect based on the preset process template. Therefore, this embodiment not only provides another alarm method for detecting abnormal colors in the image of a target complex metal surface based on a preset process template, and this alarm method can directly display the abnormality type, making it easier to inspect complex metal surfaces, but also uses a preset process template to display whether other preset defects exist in the target complex metal surface, further reducing the false detection rate and the missed detection rate. Therefore, this embodiment improves the accuracy of anomaly detection for complex metal surfaces.
[0101] Furthermore, this embodiment of the invention also proposes a storage medium storing a high-precision defect detection program for complex metal surfaces. When the high-precision defect detection program for complex metal surfaces is executed by a processor, it implements the steps of the high-precision defect detection method for complex metal surfaces as described above.
[0102] refer to Figure 9 , Figure 9 This is a structural block diagram of the first embodiment of the high-precision defect detection device for complex metal surfaces of the present invention.
[0103] like Figure 9 As shown, the high-precision defect detection device for complex metal surfaces proposed in this embodiment of the invention includes:
[0104] The region delineation module 901 is used to acquire an image of a complex surface of a target metal and delineate an inspection region in the image of the complex surface of the target metal.
[0105] The position correction module 902 is used to select the inspection template corresponding to the image of the complex surface of the target metal, and to correct the position of the inspection area based on the inspection template to obtain the target detection area;
[0106] The color recognition module 903 is used to identify abnormal colors in the target detection area, put the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user.
[0107] Anomaly detection module 904 is used to detect the abnormal color placed in the inspection channel based on the inspection parameters and through a preset detection program;
[0108] The anomaly marking module 905 is used to mark the abnormal color region when the grayscale value of the detected abnormal color and the area of the abnormal color region do not meet the preset conditions.
[0109] This embodiment acquires an image of a complex metal surface and delineates an inspection area within it. It selects an inspection template corresponding to the target complex metal surface image and corrects the position of the inspection area based on the template to obtain the target detection area. Abnormal colors within the target detection area are identified and placed into inspection channels, while user-input inspection parameters are received. Based on these parameters, a preset detection program is used to detect the abnormal colors placed in the inspection channels. When the grayscale value of an abnormal color and the area of the abnormal color region do not meet preset conditions, the abnormal color region is marked. Unlike existing manual inspection methods with high error rates and long processing times, this embodiment automatically performs real-time anomaly detection on the acquired complex metal surface image based on a preset detection program. This not only reduces false positives and false negatives caused by manual inspection but also improves the speed of anomaly detection for complex metal surfaces. Therefore, this embodiment improves the accuracy of anomaly detection for complex metal surfaces and reduces the detection time.
[0110] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0111] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0113] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A high-precision defect detection method for complex metal surfaces, characterized in that, The method includes: Acquire an image of the complex surface of the target metal, and delineate an inspection area in the image of the complex surface of the target metal; Select the inspection template corresponding to the complex surface image of the target metal, and correct the position of the inspection area based on the inspection template to obtain the target detection area; Identify abnormal colors in the target detection area, place the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user; Based on the inspection parameters, the abnormal color placed in the inspection channel is detected by a preset detection program; Using Blob technology, when the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, the abnormal color region is marked. The step of acquiring an image of the complex surface of the target metal and delineating an inspection area in the image of the complex surface of the target metal includes: Select an image input source, and acquire an image of the target metal complex surface based on the image input source; Select the creation method for the inspection area, and when the creation method is selected as drawing, select the creation shape for the inspection area; Select the drawing reference point, and delineate the inspection area in the target metal complex surface image based on the selected created shape; The step of selecting the inspection template corresponding to the image of the complex surface of the target metal, and correcting the position of the inspection area based on the inspection template to obtain the target detection area includes: Select the inspection template corresponding to the target metal complex surface image, and perform shape matching on the target metal complex surface image based on the inspection template; Feature parameters are obtained from the inspection template, and a reference coordinate system is established based on the feature parameters; Based on the reference coordinate system, the position of the target metal complex surface image after shape matching is corrected to obtain the target detection area; After selecting the inspection template corresponding to the image of the complex surface of the target metal, and correcting the position of the inspection area based on the inspection template to obtain the target detection area, the method further includes: Based on a preset detection procedure, the presence of preset defects in the target detection area is detected. The preset defects include: preset scratches, preset foreign objects, and preset dirt. When the preset defect is detected in the target detection area, an alarm is displayed for the detection node corresponding to the preset defect based on the preset process template.
2. The high-precision defect detection method for complex metal surfaces as described in claim 1, characterized in that, The step of identifying abnormal colors in the target detection area and placing the identified abnormal colors into the inspection channel includes: Configure the color space of the target detection area and set the corresponding recognition area for abnormal colors; The abnormal color is obtained from the identification area and then placed into the inspection channel.
3. The high-precision defect detection method for complex metal surfaces as described in claim 1, characterized in that, After detecting the abnormal color placed in the inspection channel based on the inspection parameters and a preset detection program, the method further includes: When the grayscale value of the abnormal color and the area of the abnormal color region do not meet the preset conditions, an alarm is displayed on the abnormal node corresponding to the abnormal color based on the preset process template.
4. The high-precision defect detection method for complex metal surfaces as described in claim 1, characterized in that, Before acquiring the image of the complex surface of the target metal, the process also includes: Detect whether an image acquisition signal is received from the PLC module; When the image acquisition signal is detected, an image of the complex surface of the target metal is acquired.
5. A high-precision defect detection device for complex metal surfaces, characterized in that, The high-precision defect detection device for complex metal surfaces includes: The region delineation module is used to acquire an image of the complex surface of the target metal and delineate an inspection region in the image of the complex surface of the target metal; The position correction module is used to select the inspection template corresponding to the complex surface image of the target metal, and to correct the position of the inspection area based on the inspection template to obtain the target detection area; The color recognition module is used to identify abnormal colors in the target detection area, put the identified abnormal colors into the inspection channel respectively, and receive the inspection parameters input by the user. An anomaly detection module is used to detect the abnormal color placed in the inspection channel based on the inspection parameters and through a preset detection program; An anomaly marking module is used to mark the abnormal color region when the grayscale value of the detected abnormal color and the area of the abnormal color region do not meet preset conditions using Blob technology. The region delineation module is also used to select an image input source, acquire a target metal complex surface image based on the image input source; select the creation method of the inspection region, and when the creation method is selected as drawing, select the creation shape of the inspection region; select a drawing reference point, and delineate the inspection region in the target metal complex surface image based on the selected creation shape; The position correction module is further configured to select an inspection template corresponding to the target metal complex surface image, and perform shape matching on the target metal complex surface image based on the inspection template; obtain feature parameters from the inspection template, and establish a reference coordinate system based on the feature parameters; and perform position correction on the target metal complex surface image after shape matching based on the reference coordinate system to obtain the target detection area. The anomaly detection module is also used to detect whether there are preset defects in the target detection area based on a preset detection program. The preset defects include: preset scratches, preset foreign objects, and preset dirt. When the preset defects are detected in the target detection area, an alarm is displayed for the detection node corresponding to the preset defects based on a preset process template.
6. A high-precision defect detection device for complex metal surfaces, characterized in that, The device includes: a memory, a processor, and a high-precision defect detection program for complex metal surfaces stored in the memory and executable on the processor, the high-precision defect detection program for complex metal surfaces being configured to implement the steps of the high-precision defect detection method for complex metal surfaces as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a high-precision defect detection program for complex metal surfaces, which, when executed by a processor, implements the steps of the high-precision defect detection method for complex metal surfaces as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Microdefect detection method, device and equipment for CF substrate
CN107402218A