A composite defect detection background noise filtering method, device, equipment and medium
By employing full-scale feature extraction operators and difference matrix processing, combined with image fusion and MASK template technology, the problem of background noise filtering in composite material plates was solved, thereby improving the accuracy of defect detection.
Patent Information
- Application Number
- CN202211009247.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-08-22
AI Technical Summary
Existing technologies are not conducive to filtering out background noise from composite material panels, which affects the detection of defects in composite material panels.
Full-scale feature extraction operators are used to extract features from the target board image. Difference matrix is used to remove burrs. Image fusion is performed using a fusion formula. Red, green and blue channels are extracted based on gradient values and MASK templates. Finally, noise is filtered out.
It effectively filters out background noise from composite material plates, improving the accuracy of defect detection.
Smart Images

Figure CN115439352B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of composite material noise filtering, in particular to a composite material defect detection background noise filtering method, device, equipment and medium. BACKGROUND
[0002] The aviation composite material plate is combined and cured by a plurality of substances with different physical and chemical properties, and the composite material can be divided into resin-based carbon fiber composite material, glass fiber composite material, boron fiber composite material and the like according to the difference of the material. Among them, the carbon fiber composite material is widely used in the fields of aviation, aerospace, electronics and the like due to its high strength, high temperature resistance and the like. The use amount of the composite material on the unmanned aerial vehicle is as high as more than 90%, and the use of the composite material greatly reduces the weight of the fighter, increases the cruising range and the bomb load at the same time, and effectively improves the comprehensive performance of the fighter. However, the composite material, especially the plate made of the composite material, has certain defects in the production process, in order to better detect these defects, especially the surface defects, it is necessary to filter out the background noise of the composite material plate.
[0003] However, the prior art is not convenient for filtering out the background noise of the composite material plate, thereby affecting the defect detection of the composite material plate. SUMMARY
[0004] The main purpose of the present application is to provide a composite material defect detection background noise filtering method, device, equipment and medium, which aims to solve the technical problem that the prior art is not convenient for filtering out the background noise of the composite material plate, thereby affecting the defect detection of the composite material plate.
[0005] To achieve the above purpose, the first aspect of the present application provides a composite material defect detection background noise filtering method, which comprises:
[0006] Based on a full-scale feature extraction operator, the features of the target plate image are extracted to obtain a first image; wherein the full-scale feature extraction operator includes a structure factor of 0°-360°;
[0007] Based on a difference matrix, burrs in the first image are removed to obtain a second image; wherein the second image includes a plurality of region images;
[0008] Based on a fusion sub, the plurality of region images are fused to obtain a third image;
[0009] Based on the gradient value of the third image, a first MASK template is obtained;
[0010] Based on the first MASK template and a rectangular region, a second MASK template is obtained; wherein the rectangular region is obtained by projection of the third image on a coordinate system;
[0011] extracting each channel of the third image based on the second mask template to obtain a red channel image, a green channel image and a blue channel image;
[0012] fusing the red channel image, the green channel image and the blue channel image to obtain a fourth image; wherein the fourth image is a noise filtered image.
[0013] Optionally, before the step of extracting features of the target plate image based on the full-scale feature extraction algorithm to obtain a first image, further comprising:
[0014] based on a single-channel image, performing one-dimensional reduction processing on the target plate image;
[0015] based on the maximum inter-class variance of image gray scale distribution data, performing two-dimensional reduction processing on the target plate image after one-dimensional reduction processing;
[0016] the step of extracting features of the target plate image based on the full-scale feature extraction algorithm to obtain a first image, comprising:
[0017] extracting features of the target plate image after two-dimensional reduction based on the full-scale feature extraction algorithm to obtain a first image.
[0018] Optionally, before the step of extracting features of the target plate image based on the full-scale feature extraction algorithm to obtain a first image, further comprising:
[0019] extracting odd column gray scale values and even row gray scale values of the target plate image after two-dimensional reduction to obtain a one-dimensional down-sampling image;
[0020] extracting odd column gray scale values and even row gray scale values of the one-dimensional down-sampling image to obtain a two-dimensional down-sampling image;
[0021] the step of extracting features of the target plate image after two-dimensional reduction based on the full-scale feature extraction algorithm to obtain a first image, comprising:
[0022] extracting features of the two-dimensional down-sampling image based on the full-scale feature extraction algorithm to obtain a first image.
[0023] Optionally, the step of removing burrs in the first image based on a difference matrix to obtain a second image; wherein the second image includes a plurality of region images, comprising:
[0024] Based on the first difference matrix, the second difference matrix and the third difference matrix, burrs in the first image are removed to obtain a second image; wherein the size of the first difference matrix is 3x 3, the size of the second difference matrix is 5x 5, and the size of the third difference matrix is 7x 7; the second image includes 3x 3 rectangular region images, 5x 5 rectangular region images and 7x 7 rectangular region images;
[0025] The fusion sub, based on the plurality of region images, fuses to obtain a third image, including:
[0026] The fusion sub, based on the plurality of region images, fuses to obtain a third image, including:
[0027] Optionally, the second image is obtained by removing the burrs in the first image based on the first difference matrix, the second difference matrix and the third difference matrix, including:
[0028] The anchor point of the 3x 3 rectangular region image is transformed through the following relationship:
[0029]
[0030] The anchor point of the 3x 3 rectangular region image is transformed through the following relationship:
[0031]
[0032] The anchor point of the 5x 5 rectangular region image is transformed through the following relationship:
[0033]
[0034] The anchor point of the 5x 5 rectangular region image is transformed through the following relationship:
[0035]
[0036] The anchor point of the 7x 7 rectangular region image is transformed through the following relationship:
[0037]
[0038] The anchor point of the 7x 7 rectangular region image is transformed through the following relationship:
[0039]
[0040] Wherein, flag represents a counting flag; h(i,j) represents the gray value of the (i,j) point in the image; pointanchor represents a center anchor point; x represents an x-axis coordinate corresponding to the center anchor point when a rectangular region image scans an image; and y represents a y-axis coordinate corresponding to the center anchor point when the rectangular region image scans the image.
[0041] Optionally, the fusing the 3x3 rectangular region image, the 5x5 rectangular region image and the 7x7 rectangular region image to obtain a third image comprises:
[0042] The 3x3 rectangular region image, the 5x5 rectangular region image and the 7x7 rectangular region image are fused through a relationship as follows:
[0043]
[0044] wherein h img3 (i, j) represents a pixel value corresponding to a point (i, j) in the 3x3 rectangular region image, h img4 (i, j) represents a pixel value corresponding to a point (i, j) in the 5x5 rectangular region image, h img5 (i, j) represents a pixel value corresponding to a point (i, j) in the 7x7 rectangular region image, h img6 (i, j) represents a pixel value corresponding to a point (i, j) in the third image, and cols and rows represent pixel point positions.
[0045] Optionally, the first MASK template is obtained based on gradient values of the third image, and the obtaining the first MASK template comprises:
[0046] Gradient values of the third image in X-axis and Y-axis directions are respectively calculated to obtain a fusion gradient value of each pixel point in the third image, wherein the fusion gradient value is an arithmetic square root of a square sum of the gradient values in the X-axis and Y-axis directions;
[0047] A fusion gradient threshold is set to remove pixel points in the third image that are less than the fusion gradient threshold;
[0048] The third image from which the pixel points less than the fusion gradient threshold are removed is subjected to an inversion operation to obtain the first MASK template.
[0049] Optionally, the gradient values of the third image in the X-axis and Y-axis directions are respectively calculated to obtain the fusion gradient value of each pixel point in the third image, and the calculating the gradient values of the third image in the X-axis and Y-axis directions comprises:
[0050] The third image is mapped into a projection coordinate system;
[0051] The third image mapped into the projection coordinate system is subjected to a scale restoration transformation.
[0052] parallelly projecting the pixel point region with a gray value of 0 in the third image to the X-axis and Y-axis directions respectively to obtain an X-axis region length and a Y-axis region length;
[0053] obtaining a maximum value and a minimum value of the X-axis region length and the Y-axis region length respectively;
[0054] positioning the third image based on the minimum projection area, wherein the minimum projection area is a region in which the minimum value of the X-axis region length and the minimum value of the Y-axis region length overlap;
[0055] performing a gray-scale processing on the positioned third image;
[0056] performing an expansion processing on the gray region of the third image after the gray-scale processing;
[0057] performing a scaling processing on the gray region of the third image after the gray region expansion processing;
[0058] calculating gradient values of the third image in the X-axis and Y-axis directions after the scaling processing respectively to obtain a fusion gradient value of each pixel point in the third image.
[0059] Optionally, the extracting each channel of the third image based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image comprises:
[0060] connecting the pixel points of the third image greater than or equal to the fusion gradient threshold value in a head-to-tail manner to obtain a plurality of global contour lines of the third image;
[0061] sorting the plurality of global contour lines of the third image from large to small to obtain an outer contour region of the third image;
[0062] obtaining an outer contour region centroid based on the outer contour region of the third image, wherein an x-axis coordinate of the outer contour region centroid is an average value of x-axes of all pixel points surrounded by the global contour lines, and a y-axis coordinate of the outer contour region centroid is an average value of x-axes of all pixel points surrounded by the global contour lines;
[0063] performing a gray reassignment on the outer contour region of the third image;
[0064] extracting each channel of the third image after the gray reassignment based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image.
[0065] Optionally, the obtaining the second MASK template based on the first MASK template and the rectangular region comprises:
[0066] obtaining a rectangular region based on maximum and minimum values of an X-axis region length projected on the X-axis and a Y-axis region length projected on the Y-axis of the third image;
[0067] attaching the MASK template in the rectangular region to obtain a second MASK template.
[0068] In a second aspect, a composite defect detection background noise filtering device is provided, and the device comprises:
[0069] A first extraction module is configured to extract features of a target plate image based on a full-scale feature extraction operator to obtain a first image, wherein the full-scale feature extraction operator comprises a structure factor of 0°-360°.
[0070] A removal module is configured to remove burrs in the first image based on a difference matrix to obtain a second image, wherein the second image comprises a plurality of region images.
[0071] A first fusion module is configured to fuse the plurality of region images based on a fusion sub-module to obtain a third image.
[0072] A first obtaining module is configured to obtain a first MASK template based on gradient values of the third image.
[0073] A second obtaining module is configured to obtain a second MASK template based on the first MASK template and a rectangular region, wherein the rectangular region is obtained by projection of the third image on a coordinate system.
[0074] A second extraction module is configured to extract each channel of the third image based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image.
[0075] A second fusion module is configured to fuse the red channel image, the green channel image and the blue channel image to obtain a fourth image, wherein the fourth image is a noise filtering processed image.
[0076] In a third aspect, a computer device is provided, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method in the embodiments.
[0077] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and a processor executes the computer program to implement the method in the embodiments.
[0078] By the technical solution, the application has at least the following beneficial effects:
[0079] The composite defect detection background noise filtering method, device, equipment and medium provided by the embodiment of the application filter out the noise of the target plate image through the full-scale feature extraction operator to extract the features of the target plate image to obtain a first image, wherein the full-scale feature extraction operator includes a 0°-360° structure factor; then remove burrs in the first image based on a difference matrix to obtain a second image, wherein the second image includes a plurality of region images; then fuse the plurality of region images based on a fusion sub to obtain a third image; then obtain a first MASK template based on the gradient value of the third image; then obtain a second MASK template based on the first MASK template and a rectangular region, wherein the rectangular region is obtained by projecting the third image on a coordinate system; then extract each channel of the third image based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image; and finally fuse the red channel image, the green channel image and the blue channel image to obtain a fourth image, wherein the fourth image is the image after noise filtering. That is, the technical solution of the application can comprehensively filter out the noise of the target plate image by extracting the target plate image through the full-scale feature extraction operator, and the full-scale feature extraction operator includes a 0°-360° structure factor. At the same time, the target plate image is sequentially deburred and fused, and then each channel of the target plate image is extracted based on the obtained second MASK template and fused, and finally the target plate image after noise filtering is obtained. Thus, the method is more adaptable to the noise pattern characteristics and gray characteristics of the target plate image, and can achieve better noise removal effect, so as to more conveniently filter out the background noise of the composite plate, and further more conveniently detect the defects of the composite plate. Since the effect of filtering out the background noise of the composite plate is better, the accuracy of detecting the defects of the composite plate is higher. BRIEF DESCRIPTION OF DRAWINGS
[0080] Figure 1 The computer device structure schematic diagram of the hardware running environment related to the embodiment of the application;
[0081] Figure 2 The flowchart of the composite defect detection background noise filtering method of the embodiment of the application;
[0082] Figure 3 The schematic diagram of the target plate image without filtering out noise in the embodiment of the application;
[0083] Figure 4 The schematic diagram of the 3x 3 rectangular region anchor point transformation processing in the embodiment of the application;
[0084] Figure 5 This is a schematic diagram of the anchor point transformation process for a 5x5 rectangular region in an embodiment of this application.
[0085] Figure 6 This is a schematic diagram of the 7x7 rectangular region anchor point transformation process in an embodiment of this application;
[0086] Figure 7 This is a schematic diagram of the third image obtained after fusion in an embodiment of this application;
[0087] Figure 8 This is a flowchart illustrating a specific execution method of step S13 in an embodiment of this application.
[0088] Figure 9 This is a flowchart illustrating a specific execution method of step S131 in an embodiment of this application.
[0089] Figure 10 This is a schematic diagram showing the third image mapped onto the projected coordinate system in an embodiment of this application;
[0090] Figure 11 This is a schematic diagram of the third image after parallel projection in an embodiment of this application;
[0091] Figure 12 This is a schematic diagram showing the positioning of the third image in an embodiment of this application;
[0092] Figure 13 This is a flowchart illustrating a specific execution method of step S15 in an embodiment of this application.
[0093] Figure 14 This is a schematic diagram of obtaining the global contour line of the third image in an embodiment of this application;
[0094] Figure 15 This is a schematic diagram showing the grayscale reassignment of the outer contour region of the third image in an embodiment of this application.
[0095] Figure 16 This is a schematic diagram of the fourth image obtained after fusion in an embodiment of this application;
[0096] Figure 17 This is a schematic diagram of the target board image after dimensionality reduction in the embodiments of this application;
[0097] Figure 18 This is a schematic diagram illustrating the process of secondary sampling of the target board image in an embodiment of this application;
[0098] Figure 19 This is a schematic diagram of a background noise filtering device for detecting defects in composite materials according to an embodiment of this application.
[0099] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0100] It should be understood that the specific embodiments described herein are merely exemplary and are not intended to limit the present application.
[0101] The program of the present application can be based on Windows 7 system 64-bit, the processor is Intel(R) Xeon(R) W-2223 3.60Ghz, the running memory size is 32GB, the frequency is 3200Mhz, the hard disk capacity is 256GB, the resolution of the industrial camera is 1920*1080, the scanning mode is surface scanning, the gain, white balance and exposure parameters of the camera are adjusted based on the camera adaptation, and the corresponding light source is a ring-shaped white light source. The software development platform is based on Visual Studio 2019, the programming language is C++, the corresponding image processing library is OpenCV 4.5.2, and it is based on Release X64 platform.
[0102] The aviation composite material plate is formed by combining and curing a plurality of substances with different physical and chemical properties. The composite material can be divided into resin-based carbon fiber composite material, glass fiber composite material, boron fiber composite material, etc. according to the difference of the materials. Among them, the carbon fiber composite material is widely used in the fields of aviation, aerospace, electronics, etc. due to its high strength and high temperature resistance. The use amount of composite material on unmanned aerial vehicle is as high as more than 90%. The use of composite material greatly reduces the weight of fighter aircraft, increases the endurance mileage and the amount of ammunition, and effectively improves the comprehensive performance of the fighter. It can be said that composite material is an important part of the aviation and aerospace fields, but the composite material, especially the plate made of composite material, inevitably has certain defects in the production process. The detection of these defects, especially surface defects, is one of the important ways to ensure quality.
[0103] In order to realize the detection of surface defects of composite material plate, the common way is mainly artificial detection. The main shortcomings of artificial detection are low detection efficiency, strong subjectivity of detection evaluation, and poor consistency of evaluation results. However, with the increase of aircraft production, the existing artificial evaluation method has been difficult to meet the actual production needs, and it is urgent to adopt a new detection method with high detection efficiency and accuracy. The development of computer vision technology makes it possible to use visual image analysis technology to detect the surface defects of composite material plate.
[0104] In order to detect the surface defects of the composite material plate by the vision-based method, the surface image of the research object needs to be obtained first. However, in the actual working condition, the plate image obtained often contains a large amount of strong background noise due to high magnification, complex working condition and composite material chips. The background noise seriously interferes with the automatic positioning of the plate and the identification and detection of the defects, and directly affects the accuracy and precision of the defect identification and detection algorithm.
[0105] In order to better detect the defects, especially the surface defects, the background noise of the composite material plate needs to be filtered out. However, it is not convenient to filter out the background noise of the composite material plate at present, thereby affecting the defect detection of the composite material plate.
[0106] In order to solve the above technical problems, the application provides a composite defect detection background noise filtering method, device, equipment and medium. Before introducing the specific technical scheme of the application, the hardware running environment related to the embodiment scheme of the application is introduced.
[0107] Reference Figure 1 , Figure 1 The computer device structure diagram of the hardware running environment related to the embodiment scheme of the application is shown in the figure.
[0108] As Figure 1 shown, the computer device can 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 realize the connection and communication between the components. The user interface 1003 can include a display screen, an input unit such as a keyboard, and an optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 can be a high-speed random access memory (RAM) memory, and can also be a stable non-volatile memory (Non-Volatile Memory, NVM), such as a magnetic disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0109] Those skilled in the art can understand that Figure 1The structure shown in the figure does not constitute a limitation on the computer device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.
[0110] As shown in Figure 1 The memory 1005 as a storage medium can include an operating system, a data storage module, a network communication module, a user interface module, and an electronic program.
[0111] In the computer device shown in Figure 1 In the computer device shown in the figure, 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 the memory 1005 in the computer device of the application can be arranged in the computer device, and the computer device calls the composite material defect detection background noise filtering device stored in the memory 1005 through the processor 1001, and executes the composite material defect detection background noise filtering method provided by the application.
[0112] Referring to Figure 2 , based on the hardware environment of the foregoing embodiments, the embodiments of the application provide a composite material defect detection background noise filtering method, which comprises:
[0113] S10: Based on a full-scale feature extraction operator, the features of the target plate image are extracted to obtain a first image; wherein the full-scale feature extraction operator includes a 0°-360° structure factor.
[0114] In the specific implementation process, the target plate image refers to a color image of a composite material plate part that needs to filter out noise. The full scale, i.e., the designed structure factor, includes structure directions in the range of 0°-360°, with an angle interval of 10°, i.e., the full scale feature extraction operator includes 0° and 180° structure factor mathematical models, 10° and 190° structure factor mathematical models, 20° and 200° structure factor mathematical models, 30° and 210° structure factor mathematical models, 40° and 220° structure factor mathematical models, 50° and 230° structure factor mathematical models, 60° and 240° structure factor mathematical models, 70° and 250° structure factor mathematical models, 80° and 260° structure factor mathematical models, 90° and 270° structure factor mathematical models, 100° and 280° structure factor mathematical models, 110° and 290° structure factor mathematical models, 120° and 300° structure factor mathematical models, 130° and 310° structure factor mathematical models, 140° and 320° structure factor mathematical models, 150° and 330° structure factor mathematical models, 160° and 340° structure factor mathematical models, and 170° and 350° structure factor mathematical models. The full scale can improve the extraction effect of the composite material plate part (target plate image) containing the tilt angle condition image. The self-defined structure factor, i.e., the size of the structure factor, can be self-defined according to the size of the background noise to be filtered out, to adapt to the filtering needs of background noise in plate composite images with different resolutions, size differences, and background noise intensity differences. The full scale self-defined structure factor extraction feature is realized by designing a filter that has filtering capability for different forms of noise characteristics, based on the similarity between the noise pattern in the image and the structure factor to remove the noise characteristics and achieve the purpose of extracting the composite material feature area.
[0115] Specifically, as shown in Figure 3 , Figure 3 is a composite material plate image with complex background interference noise, i.e., a target plate image. A composite material plate color image (original image) with complex background interference noise with a resolution of 1920*1080 is obtained, and the camera parameter is set to an adaptive adjustment mode to obtain a research image with large contrast difference. The obtained image includes a foreground region and a background region. The foreground region is a closed region including the outermost contour of the composite material plate part to be positioned for defect detection, and the background region is other regions except the foreground region. There are a large amount of background noise in the background region of the image, which needs to be removed.
[0116] S11: removing burrs in the first image based on the difference matrix to obtain a second image; wherein the second image includes a plurality of region images.
[0117] In the implementation process, the difference matrix is a regular matrix, but a multi-scale difference matrix is used here. Specifically, based on the first difference matrix, the second difference matrix and the third difference matrix, burrs in the first image are removed to obtain a second image; wherein the size of the first difference matrix is 3x3, the size of the second difference matrix is 5x5, and the size of the third difference matrix is 7x7; the second image includes 3x3 rectangular region images, 5x5 rectangular region images and 7x7 rectangular region images.
[0118] More specifically, multi-scale difference matrix regions are designed to remove burrs contained in the first image. The designed scale difference matrix contains 3 types: 3x3, 5x5 and 7x7 sizes corresponding to scale 1, scale 2 and scale 3 matrices respectively. The obtained first image is respectively transformed by 3 scale rectangular regions, and the 3 rectangular region transformation modes are independent processing relationship. The anchor point transformation and transformation recovery of 3x3 rectangular region image, 5x5 rectangular region image and 7x7 rectangular region image are as follows:
[0119] 3x3 rectangular region anchor point transformation. The transformation includes scaling and recovery processing of the region. The scaling processing is to remove part of the burrs in the image, and the recovery processing is to keep the features of the non-burr region consistent before scaling, and to improve the noise removal effect.
[0120] including burr removal processing and recovery processing,
[0121] (1) The transformation formula corresponding to the burr removal step of 3x3 rectangular region anchor point transformation is:
[0122]
[0123] The transformation formula corresponding to the recovery processing step of 3x3 rectangular region anchor point transformation is:
[0124]
[0125] The 3x3 rectangular region anchor point transformation processing effect is as shown in Figure 4 .
[0126] (2) 5x5 rectangular region anchor point transformation, including burr removal processing and recovery processing.
[0127] The transformation formula corresponding to the burr removal step of 5x5 rectangular region anchor point transformation is:
[0128]
[0129] The transformation formula corresponding to the recovery processing step of 5x5 rectangular region anchor point transformation is:
[0130]
[0131] 5x 5 rectangular region anchor point transformation processing effect, as shown in Figure 5 .
[0132] (3) 7x 7 rectangular region anchor point transformation, including deburring processing and restoration processing.
[0133] 7x 7 rectangular region anchor point transformation deburring step corresponding transformation formula is:
[0134]
[0135] 7x 7 rectangular region anchor point transformation restoration processing step corresponding transformation formula is:
[0136]
[0137] 7x 7 rectangular region anchor point transformation processing effect, as shown in Figure 6 .
[0138] Wherein, flag represents the counting flag; h(i,j) represents the gray value of the image at (i,j) point; point anchor represents the center anchor point; x represents the x-axis coordinate corresponding to the center anchor point when the rectangular region image scans the image; y represents the y-axis coordinate corresponding to the center anchor point when the rectangular region image scans the image.
[0139] S12: fusing the plurality of region images based on the fusion formula to obtain a third image.
[0140] In the specific implementation process, the plurality of region images herein includes 3x 3 rectangular region image, 5x 5 rectangular region image and 7x 7 rectangular region image, that is, the 3x 3 rectangular region image, 5x 5 rectangular region image and 7x 7 rectangular region image in step S11 are transformed and restored, and then fused. Specifically, the fusion manner is that, after processing the three scale difference rectangular regions of 3x 3 rectangular region, 5x 5 rectangular region and 7x 7 rectangular region, when the gray values of the corresponding positions of the three images are all 0 in the same pixel point position of the result image of 480*270, the gray value of the corresponding position in the newly created single channel third image with the initial gray value of 255 is 0. More specifically, the multi-scale difference processing result fusion formula can be expressed as:
[0141]
[0142] Wherein, h img3(i, j) represents the pixel value corresponding to the position (i, j) in the 3x3 rectangular region image, h img4 (i, j) represents the pixel value corresponding to the position (i, j) in the 5x5 rectangular region image, h img5 (i, j) represents the pixel value corresponding to the position (i, j) in the 7x7 rectangular region image, h img6 (i, j) represents the pixel value corresponding to the position (i, j) in the third image, cols and rows represent the pixel position.
[0143] The third image obtained after fusion is shown in FIG. 3. Figure 7
[0144] S13: obtaining a first MASK template based on the gradient value of the third image.
[0145] In the specific implementation process, the MASK template is a mask, which is an indispensable component in the photolithography process. The mask carries a design pattern. Light passes through the mask to project the design pattern on the photoresist. The MASK template is a product. As shown in FIG. 4, S13 specifically includes the following steps: Figure 8
[0146] S131: calculating the gradient value of the third image in the X-axis and Y-axis directions respectively to obtain the fusion gradient value of each pixel point in the third image; wherein the fusion gradient value is the arithmetic square root of the sum of squares of the gradient values in the X-axis and Y-axis directions.
[0147] In the specific implementation process, as shown in FIG. 5, S131 includes the following steps: Figure 9
[0148] S1311: mapping the third image to a projection coordinate system.
[0149] In the specific implementation process, the coordinate system of the third image is used as the projection coordinate system. The origin O of the coordinate system is located at the top left corner. The horizontal left direction represents the X-axis direction, and the vertical downward direction represents the Y-axis direction. The established image projection coordinate system is shown in FIG. 6. The scale of the coordinate axis is represented by a unit pixel pixel. After fusion processing, the third image can be mapped to the projection coordinate system. The top left corner (0, 0) of the third image corresponds to the origin O of the coordinate system. The remaining pixel points correspond to the corresponding pixel positions in the coordinate system. Figure 10
[0150] S1312: performing a scale restoration transformation on the third image mapped to the projection coordinate system.
[0151] In the implementation process, the third image in the coordinate system is subjected to scale restoration transformation, and the scale is changed from 480*270 before mapping to 1920*1080. Since the calculation amount of the subsequent processing steps is relatively small and in order to form a corresponding mapping relationship between the extracted feature region of the original image and the original image, the scale restoration transformation processing is performed.
[0152] S1313: The pixel point region with a gray value of 0 in the third image is subjected to parallel projection in the X-axis and Y-axis directions, respectively, to obtain the X-axis region length and the Y-axis region length.
[0153] In the implementation process, the pixel point region with a gray value of 0 in the third image is subjected to parallel projection in the X-axis and Y-axis directions of the coordinate system, and the corresponding regions corresponding to the rows and columns on the X-axis and Y-axis are recorded after the projection. The length of the region on the X-axis is lx, and the length of the region on the Y-axis is ly. The projection mode of the image in the coordinate system and the corresponding region are shown as follows. Figure 11
[0154] S1314: The maximum and minimum values of the X-axis region length and the Y-axis region length are obtained, respectively.
[0155] In the implementation process, the minimum and maximum values of the columns and rows of the lx and ly regions on the X and Y axes of the coordinate system are obtained, and the corresponding values are represented by cols min , cols max , rows min , and rows max , respectively. The set of coordinate information data is recorded, and the obtained outline is used to make the foreground region extraction 0-1MASK provide coordinate region data information.
[0156] S1315: Positioning the third image based on the minimum projection area, wherein the minimum projection area is the region in which the minimum value of the X-axis region length and the minimum value of the Y-axis region length overlap.
[0157] In the implementation process, the composite material plate is positioned based on the minimum projection area measurement criterion. The region in which the minimum projection area, i.e., the overlap of ly and lx, is the region in which the composite material plate is located. The corresponding region extracted after positioning has the least number of background pixel fillings. The composite material plate image is positioned based on the minimum projection area measurement criterion, as shown in the following figure. Figure 12
[0158] S1316: The third image after positioning is subjected to gray scale processing.
[0159] In the specific implementation process, the minimum projection area image of the composite material plate is subjected to gray scale processing by the preferred gray scale reduction dimension method, and then a single-channel reduced dimension image is obtained by dimension reduction by the maximum interquartile range method of image gray scale distribution data.
[0160] S1317: performing expansion processing on the gray scale region of the third image subjected to the gray scale processing.
[0161] In the specific implementation process, the high gray scale region expansion processing is performed on the third image subjected to the gray scale processing using a 5*5 convolution kernel kernel, and the anchor point of the convolution kernel is the (3, 3) position point. The convolution kernel step length is gradually increased by 1 from the maximum direction of the X axis until the maximum, and then the Y axis is increased by 1 pixel unit. All pixel positions are processed in turn. The expansion method is as follows: if there is a pixel point with a gray scale value of 255 within the 5*5 convolution kernel range of the third image, the gray scale value of the anchor point pixel point is 255, and if the gray scale values of the 24 pixel points other than the anchor point pixel point are all 0, the gray scale value of the pixel point corresponding to the anchor point position remains unchanged.
[0162] S1318: performing scaling processing on the gray scale region of the third image subjected to the gray scale region expansion processing.
[0163] In the specific implementation process, the high gray scale region scaling processing is performed on the third image subjected to the gray scale region expansion processing using a 5*5 convolution kernel kernel, and the anchor point of the convolution kernel is the (3, 3) position point. The convolution kernel step length is gradually increased by 1 from the maximum direction of the X axis until the maximum, and then the Y axis is increased by 1 pixel unit. All pixel positions are processed in turn. The scaling method is as follows: if there is a pixel point with a gray scale value of 0 within the 5*5 convolution kernel range of the third image subjected to the gray scale region expansion processing, the gray scale value of the anchor point pixel point is 0, and if the gray scale values of the 24 pixel points other than the anchor point pixel point are all 255, the gray scale value of the pixel point corresponding to the anchor point position remains unchanged.
[0164] S1319: calculating the gradient values of the third image subjected to the scaling processing in the X axis and Y axis directions respectively to obtain the fusion gradient value of each pixel point in the third image.
[0165] In the specific implementation process, the gradient values of the third image subjected to the expansion processing and scaling processing are calculated in the X axis and Y axis directions respectively. The gradient value is calculated by the first-order difference method, and then the arithmetic square root of the sum of the squares of the two values is obtained to obtain the fusion gradient value C gra .
[0166] S132: setting a fusion gradient threshold to remove the pixel points in the third image that are less than the fusion gradient threshold.
[0167] In the specific implementation process, the fusion gradient value C for each pixel (x,y) is calculated. gra (x,y) is defined, and then a gradient filtering threshold threshold c is set. Points smaller than the gradient threshold are removed, while points greater than or equal to the threshold are retained.
[0168] S133: Invert the third image by removing pixels smaller than the fusion gradient threshold to obtain the first MASK template.
[0169] In the specific implementation process, the gray values in the third image are inverted. The inversion operation is to change the gray value of the pixel with a gray value of 255 in the third image to 0, and the gray value of the pixel with a gray value of 0 in the image to 255. Then, the gray value of the pixel with a gray value of 255 in the third image is reduced to 1, and the first MASK template is obtained.
[0170] S14: Based on the first MASK template and the rectangular region, obtain the second MASK template; wherein the rectangular region is obtained by the projection of the third image onto the coordinate system.
[0171] In the specific implementation process, a rectangular region is first obtained based on the maximum and minimum values of the length of the X-axis region projected onto the X-axis and the length of the Y-axis region projected onto the Y-axis of the third image; then the MASK template is attached to the rectangular region to obtain the second MASK template.
[0172] More specifically, the cols obtained from the previous steps min ,cols max , rows min , rows max Numerical values, combined with information from the original image, are used to determine the values in a single-channel image with a grayscale value of 0 at the same scale as the original image, based on cols. min ,cols max , rows min , rows max Numerical analysis found four coordinate points A(cols) min , rows min B (cols) min , rows max ), C (cols) max , rows max B (cols) max , rows min The first mask is attached to the rectangular area formed by the rectangular area to obtain the second mask.
[0173] S15: Extracting each channel of the third image based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image.
[0174] In the specific implementation process, as shown in Figure 13 , step S15 specifically includes the following steps:
[0175] S151: Connecting the pixel points of the third image greater than or equal to the fusion gradient threshold in a head-to-tail manner to obtain a plurality of global contour lines of the third image.
[0176] In the specific implementation process, all the pixel points after threshold processing are connected in a head-to-tail manner according to the nearest neighbor principle to obtain the global contour lines of the composite material plate (the third image), as shown in Figure 14 .
[0177] S152: Sorting the plurality of global contour lines of the third image from large to small to obtain an outer contour region of the third image.
[0178] In the specific implementation process, the closed regions S of all the global contour lines of the third image are sorted from large to small, and only the region with the largest area S max is retained. The region where the corresponding closed contour line is located is the outermost contour line segment of the composite material plate, and the outer contour region of the composite material plate (the third image) can be obtained based on the contour line segment.
[0179] S153: Obtaining an outer contour region centroid based on the outer contour region of the third image; wherein the x-axis coordinate of the outer contour region centroid is the average value of the x-axis of all the pixel points surrounded by the global contour lines, and the y-axis coordinate of the outer contour region centroid is the average value of the x-axis of all the pixel points surrounded by the global contour lines.
[0180] In the specific implementation process, the centroid of the region surrounded by the outer contour line is calculated, and the calculation method of the centroid is to obtain the average value of the x-axis and y-axis values of all the pixel points surrounded by the outer contour line, and the obtained centroid coordinates are C(x, y).
[0181] S154: Reassigning the gray scale of the outer contour region of the third image.
[0182] In the specific implementation process, the third image containing only the outermost closed contour line segment is subjected to gray reassignment using the 4-neighborhood gray equal relationship of 1 pixel unit distance up, down, left and right. The initial centroid coordinates are C(x, y). If the gray values of the pixel points at the up, down, left and right positions of the centroid coordinates C(x, y) are 255, the gray values are changed to 0. Then, the loop is judged to be 0. If the gray value of the 0 pixel point in the 4-neighborhood range is 0, the search is stopped. If the gray value is 255, it is 0. The search is performed until all the pixel points are searched. The assigned image based on the 4-neighborhood gray equal relationship of 1 pixel unit distance up, down, left and right is shown in FIG. 8. Figure 15
[0183] S155: Based on the second MASK template, each channel of the third image subjected to gray reassignment is extracted to obtain a red channel image, a green channel image and a blue channel image.
[0184] In the specific implementation process, the second MASK template and the third image are extracted. If the gray value of the pixel point at the corresponding position in the second MASK template is 1, the gray value in the single channel (R, G, B) of the composite material plate color image remains unchanged. If the gray value of the pixel point at the corresponding position in the second MASK template is 0, the gray value in the single channel (R, G, B) of the third image is (255, 255, 255).
[0185] S16: The red channel image, the green channel image and the blue channel image are fused to obtain a fourth image. The fourth image is a noise filtered image.
[0186] In the specific implementation process, after the extraction of each channel of the collected composite material plate color image (third image), the red channel image, the green channel image and the blue channel image corresponding to the red, green and blue channel noise removed images are obtained. Then, the red channel image, the green channel image and the blue channel image are fused to obtain the final strong background noise filtered image, as shown in FIG. 9, which is the final filtering effect diagram. Figure 16
[0187] In summary, the technical scheme of the present application extracts the target plate image through the extraction mode of the full-scale feature extraction operator, and the full-scale feature extraction operator includes a structure factor of 0°-360°, so that the composite plate part can be comprehensively filtered to remove noise. After the target plate image is deburred in sequence and fused, the target plate image is extracted from each channel based on the obtained second MASK template and fused, and finally a target plate image filtered to remove noise is obtained. The method is more adaptive to the noise pattern characteristics and gray characteristics of the target plate image, and can achieve better noise removal effect, so as to more conveniently filter the background noise of the composite material plate part, and further more conveniently detect the defects of the composite material plate part. Since the effect of filtering the background noise of the composite material plate part is better, the accuracy of the defect detection of the composite material plate part is higher.
[0188] In some embodiments, before the step of extracting the features of the target plate image based on the full-scale feature extraction operator to obtain a first image, it further includes:
[0189] S20: performing one-dimensional reduction processing on the target plate image based on a single-channel image.
[0190] In the specific implementation process, the one-dimensional reduction processing is performed based on the designed high-contrast single-channel image optimization method: 1) respectively counting the number distribution of the pixel points of the 3 channels of the color image (target plate image) in the 0-255 gray scale range, and drawing a distribution number curve relationship diagram of different gray pixel points; 2) the X axis of the coordinate system in the target plate image represents the gray level from 0 to 255, and the Y axis of the coordinate system represents the number of pixels of a certain specific gray level in the image; 3) obtaining 3 pairs of pixel point distribution relationship images corresponding to the 3 channels of the image; 4) calculating the distances L1, L2 and L3 (L1, L2 and L3 correspond to the red, green and blue channel images respectively) between the two wave peaks of the number curves in the 3 images, the distance refers to the number of gray levels spanned by the wave peak; 5) comparing the values of L1, L2 and L3, if L1 is the largest, the one-dimensional reduction processing adopts the image of the red channel, if L2 is the largest, the one-dimensional reduction processing adopts the image of the green channel, and if L3 is the largest, the one-dimensional reduction processing adopts the image of the blue channel.
[0191] S21: performing two-dimensional reduction processing on the target plate image after the one-dimensional reduction processing based on the maximum inter-class variance of the image gray distribution data.
[0192] The step of extracting the features of the target plate image based on the full-scale feature extraction operator to obtain a first image includes: extracting the features of the target plate image after the two-dimensional reduction based on the full-scale feature extraction operator to obtain a first image.
[0193] In the implementation process, the maximum inter-class variance based on the image gray distribution data is used for dimension reduction processing: 1) obtaining the normalized histogram of the target plate image after one-dimensional reduction processing, and the corresponding gray level is N; 2) using the formula to calculate the cumulative sum (where p i represents the proportion of the number of pixels corresponding to the i gray level in the target plate image to the total pixels); 3) using the formula to calculate the cumulative mean; 4) using the formula to calculate the global gray mean; 5) calculating the inter-class variance based on the obtained value and obtaining k*, so that the inter-class variance is maximum; 6) performing the second step of dimension reduction on the target plate image based on the calculated k* value; 7) the gray value of the pixel point is represented by 0 and 255, and the gray value greater than or equal to k* is transformed into 255, otherwise it is transformed into 0. After two steps of dimension reduction processing, a low-dimensional composite material surface image (target plate image) can be obtained, as shown in Figure 17 After two times of dimension reduction, the dimensions of the foreground and background feature information contained in each channel of the target plate image become smaller, so that the subsequent operation of the target plate image is more convenient.
[0194] Optionally, as shown in Figure 18 , before the step of extracting the features of the target plate image based on the full-scale feature extraction operator to obtain the first image, it further includes:
[0195] S30: Extracting the odd column gray values and even row gray values of the target plate image after the second dimension reduction to obtain a one-dimensional down-sampling image.
[0196] In the implementation process, the gray values of the corresponding positions of the odd columns and even rows of the target plate image after dimension reduction are extracted. For a 1920*1080 original image, the odd columns are 1, 3, 5, …, 1919, a total of 960 columns, and the even rows are 2, 4, 6, …, 1080, a total of 540 rows. Based on the 960 columns and 540 rows of gray data, a one-dimensional down-sampling image is formed, and the corresponding resolution is 960*540.
[0197] S31: Extracting the odd column gray values and even row gray values of the one-dimensional down-sampling image to obtain a two-dimensional down-sampling image.
[0198] The step of extracting the features of the target plate image after the second dimension reduction based on the full-scale feature extraction operator to obtain the first image includes: extracting the features of the two-dimensional down-sampling image based on the full-scale feature extraction operator to obtain the first image.
[0199] In the specific implementation process, the grayscale values of the even-numbered columns and odd-numbered rows of the first downsampled image are extracted. For the original image of 960*540, the even-numbered columns are 2, 4, 6, ..., 960, totaling 480 columns, and the corresponding odd-numbered rows are 1, 3, 5, ..., 539, totaling 270 rows. Based on the grayscale data corresponding to the 480 columns and 270 rows, a second downsampled image is constructed, with a corresponding resolution of 480*270. By performing two downsampling processes on the target board image after the second dimensionality reduction, the computational complexity and the algorithm's running efficiency can be greatly improved.
[0200] In summary, the method proposed in this application can filter out both weak and strong background noise in images of composite material plates. Furthermore, due to the design of a full-angle feature extraction method, it also demonstrates excellent noise removal capabilities for composite material plates with tilted angles. Compared to traditional methods, the method proposed in this invention is more adaptable to noise morphology and grayscale features, achieving better noise reduction results. Based on the noise-filtered image, it facilitates the accurate detection and identification of surface defects in composite material plates using automated methods, laying the foundation for efficient and high-precision inspection of aerospace composite material plates. Simultaneously, it provides a reference method for noise reduction of rectangular and square-shaped research objects based on image analysis.
[0201] In another embodiment, such as Figure 19 As shown, based on the same inventive concept as the foregoing embodiments, embodiments of this application also provide a warehousing logistics distribution route planning device, which includes:
[0202] The first extraction module is used to extract features from the target board image based on a full-scale feature extraction operator to obtain a first image; wherein, the full-scale feature extraction operator includes a structure factor of 0°-360°;
[0203] A removal module is used to remove burrs from the first image based on a difference matrix to obtain a second image; wherein the second image comprises several region images;
[0204] The first fusion module is used to fuse the images of the several regions based on a fusion formula to obtain a third image;
[0205] The first obtaining module is used to obtain a first MASK template based on the gradient value of the third image;
[0206] The second obtaining module is used to obtain a second MASK template based on the first MASK template and the rectangular region; wherein the rectangular region is obtained by the projection of the third image onto the coordinate system;
[0207] a second extraction module configured to extract each channel of the third image based on the second mask template to obtain a red channel image, a green channel image and a blue channel image;
[0208] a second fusion module configured to fuse the red channel image, the green channel image and the blue channel image to obtain a fourth image, wherein the fourth image is a noise-filtered image.
[0209] It should be noted that each module in the composite material defect detection background noise filtering device in the embodiment corresponds to each step in the composite material defect detection background noise filtering method in the foregoing embodiment one by one, and therefore, the specific implementation and the technical effects achieved by the embodiment can refer to the implementation of the foregoing composite material defect detection background noise filtering method, which will not be described here again.
[0210] In addition, in an embodiment, the present application further provides a computer device, which comprises a processor, a memory and a computer program stored in the memory, and the computer program realizes the method in the foregoing embodiment when executed by the processor.
[0211] In addition, in an embodiment, the present application further provides a computer storage medium, which stores a computer program, and the computer program realizes the method in the foregoing embodiment when executed by a processor.
[0212] In some embodiments, the computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM, etc.; or can be various devices comprising one or any combination of the above memories. The computer can be various computing devices including smart terminals and servers.
[0213] In some embodiments, the executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.
[0214] As an example, executable instructions can correspond to a file in a file system, can be stored in a part of a file that is used by the operating system to store application program data, can be stored as an "applet" in a general purpose software application, can be stored as a "plugin" in a web browser, or can be stored as an "app" in a mobile device, to name but a few.
[0215] As an example, executable instructions can be deployed to be executed on one computer, or on multiple computers of a system of computers in one location, or on multiple computers distributed among multiple locations and connected together over a communication network.
[0216] It has to be noted that, as used herein, the terms "comprising", "including", "containing", "characterized by", "comprised of", "comprising" or grammatical equivalents thereof are intended to be open-ended and non-limiting terminology, such that items or processes not explicitly listed are also intended to fall within the description. Similarly, it is intended that aspects of the described embodiments can be performed in the absence of any element not expressly provided. By way of example, an element followed by "comprising" to such an open-ended term, means including, that element and zero or more additional elements not expressly recited. The terms "a" or "an", as used herein in the detailed description and in the claims, are broadened and / or intended to comprise both singular and plural, unless explicitly indicated to the contrary.
[0217] The sequence number of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments.
[0218] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, also can be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, an optical disk) and includes a plurality of instructions for causing a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0219] The above are only preferred embodiments of the present application, and do not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the contents of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for filtering out background noise for composite defect detection, comprising: The method comprises: extracting features of a target plate image based on a full-scale feature extraction operator to obtain a first image; wherein the full-scale feature extraction operator comprises 0° and 180° structure factor mathematical models, 10° and 190° structure factor mathematical models, 20° and 200° structure factor mathematical models, 30° and 210° structure factor mathematical models, 40° and 220° structure factor mathematical models, 50° and 230° structure factor mathematical models, 60° and 240° structure factor mathematical models, 70° and 250° structure factor mathematical models, 80° and 260° structure factor mathematical models, 90° and 270° structure factor mathematical models, 100° and 280° structure factor mathematical models, 110° and 290° structure factor mathematical models, 120° and 300° structure factor mathematical models, 130° and 310° structure factor mathematical models, 140° and 320° structure factor mathematical models, 150° and 330° structure factor mathematical models, 160° and 340° structure factor mathematical models, and 170° and 350° structure factor mathematical models; the structure factor refers to a structure direction included in a range of 0°-360°; removing burrs in the first image based on a first difference matrix, a second difference matrix, and a third difference matrix to obtain a second image; wherein the first difference matrix has a size of 3x 3, the second difference matrix has a size of 5x 5, and the third difference matrix has a size of 7x 7; the second image comprises a 3x 3 rectangular region image, a 5x 5 rectangular region image, and a 7x 7 rectangular region image; fusing the plurality of region images based on a fusion formula to obtain a third image; obtaining a first MASK template based on gradient values of the third image; obtaining a second MASK template based on the first MASK template and a rectangular region; wherein the rectangular region is obtained by projection of the third image on a coordinate system; extracting each channel of the third image based on the second MASK template to obtain a red channel image, a green channel image, and a blue channel image; fusing the red channel image, the green channel image, and the blue channel image to obtain a fourth image; wherein the fourth image is an image after noise filtering processing.
2. The composite defect detection background noise filtering method of claim 1, wherein, Before the step of extracting features of a target plate image based on a full-scale feature extraction operator to obtain a first image, the method further comprises: performing one-dimensional reduction processing on the target plate image based on a single-channel image; performing two-dimensional reduction processing on the target plate image after one-dimensional reduction processing based on maximum inter-class variance of image gray scale distribution data; the step of extracting features of a target plate image based on a full-scale feature extraction operator to obtain a first image comprises: extracting features of the target plate image after two-dimensional reduction based on a full-scale feature extraction operator to obtain a first image.
3. The composite defect detection background noise filtering method of claim 2, wherein, Before the step of extracting features of the target plate image based on the full-scale feature extraction operator to obtain a first image, the method further comprises: extracting odd column gray values and even row gray values of the target plate image after the secondary dimension reduction to obtain a first down-sampling image; extracting odd column gray values and even row gray values of the first down-sampling image to obtain a second down-sampling image; the step of extracting features of the target plate image after the secondary dimension reduction based on the full-scale feature extraction operator to obtain a first image comprises: extracting features of the second down-sampling image based on the full-scale feature extraction operator to obtain a first image.
4. The composite defect detection background noise filtering method of claim 1, wherein, the step of fusing the plurality of region images based on the fusion sub to obtain a third image comprises: fusing the 3x3 rectangular region image, the 5x5 rectangular region image and the 7x7 rectangular region image based on the fusion sub to obtain a third image.
5. The composite defect detection background noise filtering method of claim 4, wherein, the step of removing burrs in the first image based on the first difference matrix, the second difference matrix and the third difference matrix to obtain a second image comprises: transforming the anchor point of the 3x3 rectangular region image through the following relationship: The anchor points of the 3x3 rectangular region image are transformed and restored by the following relationship: transforming the anchor point of the 5x5 rectangular region image through the following relationship: The anchor points of the 5x5 rectangular region image are transformed back through the following relationship: transforming the anchor point of the 7x7 rectangular region image through the following relationship: transforming the anchor point of the 7x7 rectangular region image through the following relationship: Wherein, the flag represents a counting flag; h(i,j) represents a gray value of a point (i,j) in the image; point anchor represents a center anchor point; x represents an x-axis coordinate corresponding to the center anchor point when the rectangular region image scans the image; and y represents a y-axis coordinate corresponding to the center anchor point when the rectangular region image scans the image.
6. The composite defect detection background noise filtering method of claim 4, wherein, the step of fusing the 3x3 rectangular region image, the 5x5 rectangular region image and the 7x7 rectangular region image based on the fusion sub to obtain a third image comprises: fusing the 3x3 rectangular region image, the 5x5 rectangular region image and the 7x7 rectangular region image through the following relationship: where h img3 (i,j) denotes the pixel value corresponding to the position (i,j) in the 3x3 rectangular region image, h img4 (i,j) denotes the pixel value corresponding to the position (i,j) in the 5x5 rectangular region image, h img5 (i,j) denotes the pixel value corresponding to the position (i,j) in the 7x7 rectangular region image, h img6 (i,j) denotes the pixel value corresponding to the position (i,j) in the third image, cols and rows denote the pixel position.
7. The composite defect detection background noise filtering method of claim 1, wherein, the step of obtaining a first MASK template based on the gradient value of the third image comprises: respectively calculating the gradient value of the third image in the X-axis and Y-axis directions to obtain the fusion gradient value of each pixel point in the third image; wherein the fusion gradient value is the arithmetic square root of the square sum of the gradient values in the X-axis and Y-axis directions; setting a fusion gradient threshold to remove pixel points in the third image less than the fusion gradient threshold; performing an inversion operation on the third image with the pixel points less than the fusion gradient threshold removed to obtain a first MASK template.
8. The composite defect detection background noise filtering method of claim 7, wherein, the step of respectively calculating the gradient value of the third image in the X-axis and Y-axis directions to obtain the fusion gradient value of each pixel point in the third image comprises: mapping the third image into a projection coordinate system; performing a scale restoration transformation on the third image mapped into the projection coordinate system; performing parallel projection on the pixel point region with a gray value of 0 in the third image in the X-axis and Y-axis directions respectively to obtain the X-axis region length and the Y-axis region length; respectively obtaining the maximum value and the minimum value of the X-axis region length and the Y-axis region length; Position the third image based on a minimum projection area; wherein the minimum projection area is an area where a minimum value of an X-axis region length and a minimum value of a Y-axis region length overlap; Perform grayscale processing on the positioned third image; Perform expansion processing on a grayscale region of the third image after the grayscale processing; Perform scaling processing on the grayscale region of the third image after the grayscale region expansion processing; Calculate gradient values of the third image in X-axis and Y-axis directions after the scaling processing, respectively, to obtain a fusion gradient value of each pixel point in the third image.
9. The composite defect detection background noise filtering method of claim 7, wherein, The extracting of each channel of the third image based on the second MASK template includes: Connect the pixel points of the third image greater than or equal to the fusion gradient threshold value end to end to obtain a plurality of global contour lines of the third image; The closed regions S of the global contour lines of all third images are sorted from large to small, and only the region with the largest area S is retained max The region where the corresponding closed contour line is located is the outermost contour line segment of the composite material plate, and the outer contour region of the third image can be obtained based on the contour line segment; Obtain an outer contour region centroid based on the outer contour region of the third image; wherein an x-axis coordinate of the outer contour region centroid is an average value of x-axes of all pixel points surrounded by the global contour lines, and a y-axis coordinate of the outer contour region centroid is an average value of x-axes of all pixel points surrounded by the global contour lines; Perform grayscale reassignment on the outer contour region of the third image; Extract each channel of the third image after the grayscale reassignment based on the second MASK template to obtain a red channel image, a green channel image and a blue channel image.
10. The composite defect detection background noise filtering method of claim 1, wherein, The obtaining of the second MASK template based on the first MASK template and a rectangular region includes: Obtain a rectangular region based on a maximum value and a minimum value of an X-axis region length projected on an X-axis and a Y-axis region length projected on a Y-axis of the third image; Fit the MASK template in the rectangular region to obtain the second MASK template.
11. A composite defect detection background noise filter apparatus, comprising: The device includes: A first extraction module configured to extract features of a target plate image based on a full-scale feature extraction operator to obtain a first image; wherein the full-scale feature extraction operator includes 0° and 180° structure factor mathematical models, 10° and 190° structure factor mathematical models, 20° and 200° structure factor mathematical models, 30° and 210° structure factor mathematical models, 40° and 220° structure factor mathematical models, 50° and 230° structure factor mathematical models, 60° and 240° structure factor mathematical models, 70° and 250° structure factor mathematical models, 80° and 260° structure factor mathematical models, 90° and 270° structure factor mathematical models, 100° and 280° structure factor mathematical models, 110° and 290° structure factor mathematical models, 120° and 300° structure factor mathematical models, 130° and 310° structure factor mathematical models, 140° and 320° structure factor mathematical models, 150° and 330° structure factor mathematical models, 160° and 340° structure factor mathematical models, and 170° and 350° structure factor mathematical models; the structure factor refers to a structure direction included in a range of 0°-360°; The removing module is configured to remove burrs in the first image based on a first difference matrix, a second difference matrix and a third difference matrix to obtain a second image, wherein the first difference matrix has a size of 3x3, the second difference matrix has a size of 5x5, and the third difference matrix has a size of 7x7; and the second image includes 3x3 rectangular region images, 5x5 rectangular region images and 7x7 rectangular region images; The first fusion module is configured to fuse the region images based on a fusion sub-method to obtain a third image; The first obtaining module is configured to obtain a first mask template based on gradient values of the third image; The second obtaining module is configured to obtain a second mask template based on the first mask template and a rectangular region, wherein the rectangular region is obtained by projecting the third image on a coordinate system; The second extraction module is configured to extract each channel of the third image based on the second mask template to obtain a red channel image, a green channel image and a blue channel image; The second fusion module is configured to fuse the red channel image, the green channel image and the blue channel image to obtain a fourth image, wherein the fourth image is a noise-filtered image.
12. A computer device, comprising: The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the processor executes the computer program to implement the method in any one of claims 1-10.
Citation Information
Patent Citations
Multistage filtering image denoising method fusing edge information
CN113379640A
Image noise removing method
JP2004125716A