Copper plate particle detection method and system based on edge detection and dynamic region division

The copper plate particle detection method based on edge detection and dynamic region division solves the problems of low efficiency and poor adaptability of traditional detection methods, and achieves automated detection with high accuracy and low maintenance cost.

CN121707951APending Publication Date: 2026-03-20CHINALCO SOUTHEAST COPPER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511869723.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing methods for detecting copper plate particles rely on manual inspection, which is inefficient, susceptible to subjective influence, and has a high false detection rate. Traditional automated solutions cannot adapt to changes in field conditions, resulting in low detection accuracy and high system maintenance costs.

Method used

The method employs edge detection and dynamic region segmentation. Edge detection algorithms are used to extract the edges of the copper plate surface, and the Hough transform algorithm is used to divide the region into a nine-square grid. Combined with multilayer perceptron, feature extraction and particle classification are performed to achieve dynamic region segmentation and intelligent detection.

Benefits of technology

It improves the accuracy and robustness of copper plate particle detection, adapts to changes in lighting and fluctuations in steel strip position in industrial settings, and reduces the false positive rate and system maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707951A_ABST
    Figure CN121707951A_ABST
Patent Text Reader

Abstract

The invention relates to a copper plate particle detection method and system based on edge detection and dynamic region division, and belongs to the technical field of computer vision and metal material quality detection. Comprising the following steps: firstly, obtaining an original surface image of a copper plate containing a #-shaped steel belt, preprocessing the original surface image to obtain a de-noised grayscale image, and outputting an illumination normalized grayscale image through contrast-limited adaptive histogram equalization to eliminate illumination interference. Then, salient edges are extracted through edge detection to obtain a binary edge image, Hough transform is input to obtain a #-shaped steel belt linear equation, coordinates of intersection points are calculated, and a Sudoku area is divided; and extracting features of each sudoku region to obtain feature vectors, inputting the feature vectors into a multi-layer perceptron model for training, then using the feature vectors for particle detection of a new image, and outputting a result in combination with a dichotomy criterion. And finally, a result is transmitted to a programmable logic controller through an industrial Ethernet or serial port communication, and an execution mechanism is driven to paste distinguishing labels for the particle board and the good board respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for detecting copper plate particles with edge detection and dynamic region division, belonging to the field of computer vision and metal material quality inspection technology. Background Technology

[0002] During the production, storage, and transportation of copper plates, tiny metallic or non-metallic particles may adhere to or embed on the surface. The presence of these particles can severely impact the quality of subsequent processes and potentially lead to defects in the final product. Therefore, surface particle inspection of copper plates before they are put into the next process is a crucial step in ensuring product quality. Traditional copper plate particle inspection mainly relies on manual visual inspection. This method is not only inefficient and labor-intensive, but also easily affected by factors such as the subjective state and fatigue level of the inspectors, resulting in inconsistent inspection standards and high rates of missed and false detections. This makes it difficult to meet the requirements of modern industrial production for high efficiency, high quality, consistency, and reliability.

[0003] To overcome the drawbacks of manual inspection, the industry has gradually developed automated inspection technologies based on machine vision. Existing automated solutions typically employ fixed region division methods, pre-setting detection areas in the image, extracting features using image processing techniques, and then determining the presence of particles using a simple classifier or set thresholds. However, in actual industrial settings, the placement of the copper plate and the camera's shooting angle may have slight deviations. Fixed region divisions cannot adapt to these variations, leading to a mismatch between the detection area and the actual physical area of ​​the copper plate, resulting in numerous false positives. Traditional methods rely heavily on manually designed features, which have weak ability to distinguish between interference factors such as changes in lighting, steel strip reflections, and oxidation or scratches on the copper plate surface, resulting in bottlenecks in the model's generalization ability and accuracy. When the size, shape, and distribution of particles change, the manually designed features and thresholds may need to be readjusted, making it difficult for the system to adapt to new working conditions and leading to high maintenance costs.

[0004] Therefore, there is an urgent need for a copper plate particle detection method and system that can intelligently adapt to changes in on-site conditions, possesses strong feature learning capabilities, and is based on edge detection and dynamic region division. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention proposes a copper plate particle detection method and system based on edge detection and dynamic region division.

[0006] The technical solution of the present invention is as follows: On the one hand, this invention proposes a copper plate particle detection method with edge detection and dynamic region segmentation, comprising the following steps: The original image of the copper plate surface containing the grid-shaped steel strip is acquired by the monitoring equipment. The original image of the copper plate surface is preprocessed to obtain a denoised grayscale image. The denoised grayscale image is input into the contrast-limited adaptive histogram equalization algorithm to output an illumination-normalized grayscale image. Edge detection algorithms are used to extract the edges of the illumination-normalized grayscale image to obtain a binary edge image. The binary edge image is then input into the Hough transform algorithm to obtain the linear equation of the grid-shaped steel strip. Based on the linear equation, the coordinates of the intersection points of the grid-shaped steel strip are calculated, and a nine-square grid area is divided on the copper plate surface according to the intersection point coordinates. Feature extraction is performed on the nine-square grid region to obtain feature vectors; the feature vectors are input into a pre-trained multilayer perceptron to obtain the probability of particles existing on the copper plate surface in the nine-square grid region; combined with the preset particle binary classification criterion, the particle binary classification result is obtained. The particle binary classification results are input to a preset programmable logic controller via industrial Ethernet protocol or serial communication, driving the actuator to affix distinguishing labels to the particle board and the good board respectively.

[0007] Preferably, the method preprocesses the original image of the copper plate surface by grayscale conversion and Gaussian filtering, wherein: Obtain the original image of the copper plate surface containing the grid-shaped steel strip captured by the monitoring equipment, and obtain the pixel value of the original image of the copper plate surface. pixel value at Extracting the original image of the copper plate surface at the pixel level The red, green, and blue pixel values ​​at the point are used to convert the original image of the copper plate surface into a grayscale image using a grayscale algorithm; The grayscale image is input using a Gaussian filtering algorithm. The grayscale image is then convolved to suppress random noise and preserve edge details, resulting in a denoised grayscale image.

[0008] Preferably, the method inputs the denoised grayscale image into an adaptive histogram equalization algorithm that limits contrast, and outputs an illumination-normalized grayscale image, specifically as follows: The denoised grayscale image is divided into multiple independent sub-blocks; the contrast of each independent sub-block is limited, and then the contrast-limited independent sub-blocks are processed by an equalization mapping function to obtain a new grayscale value for each independent sub-block. The gray values ​​of individual sub-blocks in the denoised grayscale image are replaced with new gray values ​​processed by the equalization mapping function; after replacing the gray values ​​of each individual sub-block, an illumination-normalized grayscale image is obtained.

[0009] Preferably, the method uses an edge detection algorithm to extract salient edges from the illumination-normalized grayscale image to obtain a binary edge image, specifically: The horizontal and vertical gradients of the illumination-normalized grayscale image are calculated using horizontal and vertical gradient operators, respectively. Based on the horizontal and vertical gradients, the gradient magnitude and continuous gradient direction are calculated. The continuous gradient direction is then discretized to obtain the discrete gradient direction. Determine whether the gradient magnitude of any pixel is a local maximum along its discrete gradient direction. If so, set the gradient magnitude to 0 and remove pixels that are not on the edge center line. If not, retain the original value and refine the coarse edge into a clear edge with a single pixel width. Pixels that still have weak gradient values ​​after non-maximum suppression are filtered using double thresholds to obtain a binary edge image.

[0010] Preferably, the method utilizes the Hough transform algorithm to divide the copper plate surface into a nine-square grid region, specifically as follows: Establish a polar coordinate system for the current binary edge image, and define the coordinate system for any pixel. The equation of the line containing the line is expressed by the formula: ; In the formula, This represents the distance from the origin to the line in polar coordinates. Represents polar coordinates and The angle between the axes; Create a two-dimensional accumulator array This can be expressed as a formula: ; In the formula, In Hough space The corresponding two-dimensional accumulator value, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For each pixel in the binary edge image In the polar coordinate system of Hough space, each corresponds to a straight line equation. If multiple pixels in a binary edge image belong to the same true straight line in the binary edge image, then the curves of pixels on the same true straight line in Hough space will intersect at the same line. point; At this point, the two-dimensional accumulator Will this The value of the two-dimensional accumulator for a point increments by 1; the true straight line in the binary edge image corresponds to... The point will increase due to the auto-increment of the value of the two-dimensional accumulator. The value of the two-dimensional accumulator is much higher than that of other pixels in the binary edge image, resulting in... The highest peak values ​​of the two-dimensional accumulator, these peak values ​​correspond to The point represents the true line parameter in the binary edge image; Horizontal steel strip ,but , The equation of the straight line for the horizontal steel strip is obtained as follows: Vertical steel strip ,but , The equation of the straight line perpendicular to the steel strip is obtained as follows: ;in, This represents the x-coordinate of a pixel in a binary edge image. This represents the ordinate of a pixel in a binary edge image. This represents the distance from the origin to the line in the polar coordinate system. Since there are two horizontal steel strips and two vertical steel strips, the distance from the origin to the line in the polar coordinate system is different, resulting in four different equations for the steel strip boundary lines. Calculate the intersection points between each pair of the equations of the four steel strip boundary lines to obtain four intersection points; divide the copper plate into three equal rows horizontally and three equal columns vertically based on the four intersection points to divide the copper plate into a nine-square grid area.

[0011] Preferably, the method utilizes the probability of particles existing on the surface of the copper plate in the nine-square grid area, combined with a preset particle binary classification criterion, to obtain the particle binary classification result, specifically as follows: Feature extraction is performed on the nine-square grid region to obtain feature vectors. These feature vectors are then input into a pre-trained multilayer perceptron to obtain the probability of particles existing on the copper plate surface within the nine-square grid region. Combined with a pre-defined particle binary classification criterion, the particle binary classification result is determined, expressed by the formula: ; In the formula, This represents the results of the particle binary classification. This indicates that there are particles on the surface of the copper plate in the current 3x3 grid area. This indicates that there are no particles on the surface of the copper plate in the current 3x3 grid area. This indicates the probability that particles exist on the surface of the copper plate in the current 3x3 grid area.

[0012] On the other hand, the present invention also proposes a copper plate particle detection system with edge detection and dynamic region division, comprising the following modules: Image preprocessing and equalization module: acquires the original image of the copper plate surface containing the grid-shaped steel strip collected by the monitoring equipment, preprocesses the original image of the copper plate surface to obtain a denoised grayscale image; inputs the denoised grayscale image into the contrast-limited adaptive histogram equalization algorithm, and outputs an illumination-normalized grayscale image. Detection region segmentation module: The edge detection algorithm is used to extract the edges of the illumination normalized grayscale image to obtain a binary edge image; the binary edge image is input into the Hough transform algorithm to obtain the straight line equation of the grid-shaped steel strip; the intersection coordinates of the grid-shaped steel strip are calculated based on the straight line equation; and the nine-square grid area is divided on the copper plate surface according to the intersection coordinates. Feature extraction and model training module: Extract features from the nine-square grid region to obtain feature vectors; input the feature vectors into a pre-trained multilayer perceptron to obtain the probability of particles existing on the copper plate surface in the nine-square grid region; combine the pre-set particle binary classification criteria to obtain the particle binary classification result. Differentiating label pasting module: The particle binary classification results are input to a preset programmable logic controller via industrial Ethernet protocol or serial communication, which drives the actuator to paste differentiating labels on the particle board and the good board respectively.

[0013] In another aspect, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in any embodiment of the present invention.

[0014] In another aspect, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.

[0015] The present invention has the following beneficial effects: (1) This invention is a copper plate particle detection method and system for edge detection and dynamic region division. By limiting the contrast adaptive histogram equalization technology, which is different from global histogram equalization, it specifically solves the problem of uneven illumination on the copper plate surface in industrial scenarios: it improves the local illumination difference through sub-block equalization, avoids excessive noise enhancement through contrast limitation, and preserves the edge details of steel strip and copper plate, so that subsequent edge detection can more accurately extract the edge features of steel strip and particles, providing a high-quality image foundation for Hough transform line detection.

[0016] (2) This invention is a copper plate particle detection method and system based on edge detection and dynamic region division. It overcomes the limitations of traditional fixed region division by using Hough transform to detect the linear equations of the grid-shaped steel strips, calculate intersection points, and dynamically divide the area into a nine-square grid. This feature can adapt to slight fluctuations in the position of the steel strips in industrial scenarios, ensuring that the nine-square grid area is always precisely aligned with the grid-shaped steel strips on the copper plate. This avoids the region misalignment problem caused by steel strip offset in fixed region division, providing a precise spatial positioning basis for subsequent particle detection in each region, effectively improving the accuracy of region-level detection and system robustness. Attached Figure Description

[0017] Figure 1 This is a flowchart of the copper plate particle detection method proposed in Embodiment 1 of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.

[0020] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0022] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.

[0023] Example 1: See Figure 1 This embodiment proposes a copper plate particle detection method based on edge detection and dynamic region segmentation, including the following steps: S100: Acquire the original image of the copper plate surface captured by a high-resolution industrial camera, and obtain the pixel value of the original image. pixel value at Extracting pixels from the original image The red, green, and blue pixel values ​​at a given location are used to convert the original image into a grayscale image using a grayscale conversion algorithm, expressed by the formula: ; In the formula, Represents the grayscale image at pixels grayscale value at that location Represents pixels The red channel pixel value at that location, Represents pixels The green channel pixel value at that location, Represents pixels The blue channel pixel value at that location.

[0024] S101. Utilizing the smoothing properties of the high-pass function, a convolution operation is performed on the grayscale image to suppress random noise while preserving image edge details. This can be expressed by the following formula: ; ; In the formula, This indicates the pixel values ​​of a grayscale image after high-pass filtering. grayscale value at that location This represents the half-size of the filter kernel. Represents a two-dimensional Gaussian function. The standard deviation of the Gaussian function is represented by... These represent the indices of the pixels.

[0025] S102. Further, after the grayscale image is high-pass filtered, the pixels are... The grayscale value at that point is input into an adaptive histogram equalization algorithm that limits contrast. Specifically: The grayscale image is divided into multiple independent sub-blocks for separate processing, and the grayscale distribution within each sub-block is clearly defined, as expressed by the formula: ; In the formula, The grayscale value in the character block is Histogram frequency, Indicates the first Line number Sub-blocks of the column, Represents a counting algorithm; When local noise (such as tiny reflective spots) exists within a sub-block, the corresponding histogram frequency will be abnormally high. Direct equalization will overstretch the contrast of this noise, resulting in block artifacts in the image. Therefore, contrast limiting is performed, expressed by the formula: ; In the formula, This represents the frequency of the histogram after contrast limiting. This represents the algorithm for finding the minimum value. This indicates the preset contrast limit threshold; Furthermore, after contrast limiting, the grayscale values ​​of the sub-blocks need to be mapped from the original range to a new range to enhance the contrast within the sub-blocks, as expressed by the formula: ; In the formula, This represents the grayscale value mapping function. This indicates the rounding algorithm. This represents the maximum value of the target grayscale range. Indicates the grayscale index. This represents the frequency of the histogram after contrast limiting. Indicates grayscale values ​​from 0 to Cumulative histogram frequency; After performing histogram statistics, contrast limiting, and equalization mapping functions on each sub-block, the gray value of each pixel in the original filtered image is replaced with the mapped gray value corresponding to its sub-block. After processing all sub-blocks, a normalized image with uniform illumination and consistent contrast is obtained, expressed by the formula: ; In the formula, This represents the grayscale image after illumination normalization at the pixel level. The grayscale value.

[0026] It should be noted that due to uneven lighting and steel strip reflection in the detection scene, the grayscale distribution of the grayscale image is uneven, which affects subsequent edge detection. The adaptive histogram equalization algorithm with limited contrast divides the image into multiple sub-blocks, performs histogram equalization on each sub-block, and limits the contrast, finally stitching together a normalized image with consistent lighting.

[0027] S200. Input the illumination-normalized grayscale image into the Canny edge detection algorithm, specifically: Using the horizontal gradient operator Calculate the horizontal gradient Its convolution kernel's positive and negative distribution can capture vertical gray-level abrupt changes, corresponding to vertical edges in the image (such as the vertical edge of a steel strip), expressed by the formula: ; ; In the formula, Represents the gradient in the horizontal direction. This represents the gradient operator in the horizontal direction; Using the vertical gradient operator Calculate the gradient in the vertical direction Its convolution kernel's positive and negative distribution can capture horizontal gray-level abrupt changes, corresponding to horizontal edges in the image (such as the horizontal edge of a steel strip), expressed by the formula: ; ; In the formula, Represents the gradient in the horizontal direction. This represents the gradient operator in the vertical direction; Based on horizontal gradient and vertical gradient Calculate the gradient magnitude. The larger the magnitude, the more distinct the edge at that location. This can be expressed by the formula: ; In the formula, Indicates the gradient magnitude; Furthermore, the gradient direction is calculated, which represents the extension direction of the edge, preparing for subsequent edge refinement, and is expressed by the formula: ; In the formula, Indicates the gradient direction. This represents the two-parameter arctangent function.

[0028] Furthermore, the continuous gradient direction It is discretized into four intervals, each corresponding to one of four image edge directions, specifically: The first direction of discretization is the horizontal edge (i.e., the left and right neighborhoods), and the gradient direction interval is... The second direction of discretization is The gradient direction interval is as follows: (i.e., the top-left to bottom-right neighborhood) The discretized third direction is the vertical edge (i.e., the upper and lower neighborhoods), and the gradient direction interval is... Discretization in the fourth direction is Slanted edge (i.e., top right to bottom left neighborhood); Determine the current pixel If the gradient magnitude is a local maximum along the gradient direction, then the gradient magnitude is set to 0, i.e., pixels not on the edge center line are removed; if it is, the original value is retained, thus refining the coarse edge into a sharp edge of one pixel width, expressed by the formula: ; In the formula, Indicates the pixel after non-maximum suppression gradient magnitude at that point This indicates the operation of finding the maximum value. This represents the gradient magnitude of the first adjacent pixel corresponding to the current gradient direction. This indicates the gradient assignment of the second adjacent pixel corresponding to the current gradient direction; It should be noted that, depending on the interval described in the discretization direction, the specific expressions for the gradient magnitudes of the first and second adjacent pixels corresponding to the current gradient direction are as follows: Discretization in the first direction, , Discretization in the second direction , Discretization of the third party downwards, , Discretization in the fourth direction , .

[0029] Furthermore, pixels that still exhibit weak gradient values ​​after non-maximum suppression are filtered out using a dual thresholding method. Strong edge detection: When the gradient magnitude of a pixel When the edge features of a pixel are very distinct and it is a valid edge, it is marked as an edge and retained; among them, This indicates a preset high threshold. Non-edge determination: When the gradient magnitude of a pixel When the edge features of a pixel are extremely weak, it is marked as background noise and discarded; among them, This indicates a preset low threshold. Weak edge detection: When the gradient magnitude of a pixel is within... If the pixel's characteristics fall between the edge and background noise, it is considered a weak edge and requires further judgment based on the connectivity of the weak edge: if the weak edge pixel is connected to a strong edge pixel, check the 8 neighboring pixels of the weak edge, i.e., if there are strong edge pixels in the top, bottom, left, right, and four diagonal directions, then mark it as an edge; if there are no strong edge pixels around the weak edge pixel, then mark it as background noise and discard it. Output the grayscale values ​​of the binary edge image. In this process, the long straight strong edges corresponding to the steel strip will be clearly preserved.

[0030] S201. Establish a polar coordinate system for the current binary edge image, defining the coordinate system for any pixel. The line containing this line can be represented by the formula: ; In the formula, This represents the distance from the origin to the line in polar coordinates. Represents polar coordinates and The angle between the axes; Create a two-dimensional accumulator array This can be expressed as a formula: ; In the formula, In Hough space The corresponding accumulator value, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For each pixel in a binary edge image, there is a corresponding straight line in the polar coordinate system of Hough space. If multiple pixels in a binary edge image belong to the same true straight line, the curves of these points in Hough space will intersect at the same point. Point; at this time, the two-dimensional accumulator Will this The accumulator value of a point increments by 1; the actual line in the image corresponds to... The points will be affected by the auto-incrementing of the accumulator values ​​of a large number of binary edge image pixels, causing... The accumulator value is much higher than that of other pixels, resulting in The highest peak values ​​of the accumulator, these peak values ​​correspond to The point represents the true line parameter in the binary edge image; Furthermore, the horizontal steel strip ,but , The equation of the straight line for the horizontal steel strip is obtained as follows: Vertical steel strip ,but , The equation of the straight line perpendicular to the steel strip is obtained as follows: ;in, This represents the x-coordinate of a pixel in a binary edge image. This represents the ordinate of a pixel in a binary edge image. This represents the distance from the origin to the line in polar coordinates.

[0031] S202. Since there are two horizontal steel strips and two vertical steel strips, the distances from the origin to the straight lines in the polar coordinate system are different. Therefore, the equations of the four steel strip boundary lines are obtained, expressed by the formula: ; ; ; ; In the formula, These represent the distances from the origin to the line in the polar coordinate system; Calculate the pairwise intersections of the four steel strip boundary lines to obtain four intersection points, which are respectively , , , Divide the coin into three equal rows horizontally and three equal columns vertically based on the four intersection points; then divide the coin into a 3x3 grid based on the three equal rows horizontally and three equal columns vertically, with the grid coordinates as follows: It means that among them Represents the x-coordinate of the 3x3 grid area, and , Represents the vertical coordinate of the 3x3 grid area, and ; Obtain the illumination-normalized grayscale image after dividing the region into a nine-grid area, and then plot the image at the pixel level. The grayscale value is denoted as ; S203. From the illumination-normalized grayscale image divided into nine grid regions, extract a partial image of one region within the nine grids, and analyze the pixel values ​​of the partial image. The grayscale values ​​are compressed using the following formula: ; In the formula, This represents the compressed, illumination-normalized grayscale image at the pixel level. grayscale value, This represents a local image of one region in a normally normalized grayscale image divided into nine grid regions, at pixel points. grayscale value, This indicates the preset compression level. This represents the function for downward verification; Based on the compressed illumination-normalized grayscale image at the pixel level grayscale value The gray-level co-occurrence matrix is ​​calculated. ,in, These represent grayscale values, This indicates the number of pixels between two different pixels. Indicates the orientation of another pixel relative to the current pixel; The calculation process of the gray-level co-occurrence matrix here is existing technology and will not be elaborated here; To reflect the sharpness of the texture in the selected local area, the contrast of the local area is calculated, expressed by the formula: ; In the formula, Indicates local area contrast. Indicates the number of gray levels. Represents the gray-level co-occurrence matrix; To reflect the linear correlation of the texture in the selected local region, the local region correlation is calculated, expressed by the formula: ; In the formula, Indicates local regional correlation. This indicates that the sum of the rows in the gray-level co-occurrence matrix corresponds to the gray-level value. The frequency mean, This indicates that the sum of the columns in the gray-level co-occurrence matrix corresponds to the gray-level value. The frequency mean, This indicates that the sum of the rows in the gray-level co-occurrence matrix corresponds to the gray-level value. The frequency standard deviation, This indicates that the sum of the columns in the gray-level co-occurrence matrix corresponds to the gray-level value. The frequency standard deviation; The perimeter and area characteristics are calculated based on the actual parameters of the copper plate, and are denoted as follows: and ; Based on the local region contrast, the linear correlation of local region texture, and the perimeter and area characteristics, a feature vector is constructed, denoted as... .

[0032] S300. Input the feature vector into the multilayer perceptron model. In this embodiment, the input layer has... There are 1 feature, and the hidden layer has 1 feature. There are neurons in the output layer, with a total of _____ neurons. One neuron; After calculation in the hidden layer, the output is expressed by the formula: ; In the formula, Indicates the hidden layer number 1 The output of each neuron This represents the activation function. This represents the feature index in the feature vector. This represents the total number of features in the eigenvector. Represents the first input layer The first feature is passed to the hidden layer. The weights of each neuron, Represents the neuron index. Represents the first input layer One characteristic, Indicates the hidden layer number 1 The bias vector of each neuron; Hidden layer The output of each neuron is input to the output layer. After calculation by the output layer, the output is expressed by the formula: ; In the formula, This indicates the probability that particles exist on the surface of the copper plate in the current 3x3 grid area. This represents the total number of neurons in the hidden layer. Indicates the hidden layer number 1 The weights from each neuron to the output layer neurons. This represents the bias vector of the output layer; Furthermore, based on the preset decision rules, the binary classification result of the particles is determined, expressed by the formula: ; In the formula, This represents the binary classification result of the particles. This indicates that there are particles on the surface of the copper plate in the current 3x3 grid area. This indicates that there are no particles on the surface of the copper plate in the current 3x3 grid area; Based on the output of the multilayer perceptron model and the judgment results of whether particles exist in the copper plate in the local area, the loss function of the multilayer perceptron model is calculated, expressed by the formula: ; In the formula, This represents the loss function of the multilayer perceptron model. This represents the number of samples used to train the multilayer perceptron model. This represents the sample index used to train the multilayer perceptron model; Based on the loss function, the error is propagated from the output layer to the input layer through backpropagation to calculate the parameters of each network, including the gradient of the weights and biases of each layer with respect to the loss. Using a preset optimizer, the parameters are adjusted according to the gradient to reduce the loss function of the multilayer perceptron model and make the network classification results closer to the real situation of whether there are particles in the nine-square grid area. The forward calculation, loss calculation, backpropagation, and parameter update are repeated on a batch of copper plate samples in the local area of ​​the nine-square grid for iterative training.

[0033] S400 inputs the particle binary classification results to a preset programmable logic controller via industrial Ethernet protocol or serial communication, driving the actuator to affix distinguishing labels to the particle board and the good board respectively.

[0034] Example 2: Image preprocessing and equalization module: acquires the original image of the copper plate surface containing the grid-shaped steel strip collected by the monitoring equipment, preprocesses the original image to obtain a denoised grayscale image; inputs the denoised grayscale image into the contrast-limited adaptive histogram equalization algorithm, and outputs an illumination-normalized grayscale image. Detection region segmentation module: The edge detection algorithm is used to extract the significant edges of the illumination normalized grayscale image to obtain a binary edge image; the binary edge image is input into the Hough transform algorithm to obtain the linear equation of the grid-shaped steel strip; the intersection coordinates of the grid-shaped steel strip are calculated based on the linear equation; and a nine-square grid area is divided on the copper plate surface according to the intersection coordinates. Feature extraction and model training module: Perform feature extraction on each of the nine-square grid regions to obtain feature vectors, input the feature vectors into the multilayer perceptron model for training, and obtain the trained multilayer perceptron model; use the trained multilayer perceptron model to perform particle detection on the new image of the copper plate surface containing the grid-shaped steel strip collected by the monitoring equipment, and combine it with the preset particle binary classification criterion to obtain the particle binary classification result; Differentiating label pasting module: The particle binary classification results are input to a preset programmable logic controller via industrial Ethernet protocol or serial communication, which drives the actuator to paste differentiating labels on the particle board and the good board respectively.

[0035] Example 3: This embodiment proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method described in any embodiment of the present invention.

[0036] Example 4: This embodiment proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.

[0037] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0038] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0039] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0040] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0041] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for detecting copper plate particles based on edge detection and dynamic region segmentation, characterized in that, Includes the following steps: The original image of the copper plate surface containing the grid-shaped steel strip is acquired by the monitoring equipment. The original image of the copper plate surface is preprocessed to obtain a denoised grayscale image. The denoised grayscale image is input into the contrast-limited adaptive histogram equalization algorithm to output an illumination-normalized grayscale image. Edge detection algorithms are used to extract the edges of the illumination-normalized grayscale image to obtain a binary edge image. The binary edge image is then input into the Hough transform algorithm to obtain the linear equation of the grid-shaped steel strip. Based on the linear equation, the coordinates of the intersection points of the grid-shaped steel strip are calculated, and a nine-square grid area is divided on the copper plate surface according to the intersection point coordinates. Feature vectors are obtained by extracting features from the nine-square grid region; The feature vector is input into a pre-trained multilayer perceptron to obtain the probability of particles existing on the surface of the copper plate in the nine-square grid area. Combined with the preset particle binary classification criterion, the particle binary classification result is obtained. The particle binary classification results are input to a preset programmable logic controller via industrial Ethernet protocol or serial communication, driving the actuator to affix distinguishing labels to the particle board and the good board respectively.

2. The copper plate particle detection method based on edge detection and dynamic region division according to claim 1, characterized in that, The method preprocesses the original image of the copper plate surface, including grayscale conversion and Gaussian filtering, wherein: Obtain the original image of the copper plate surface containing the grid-shaped steel strip captured by the monitoring equipment, and obtain the pixel value of the original image of the copper plate surface. pixel value at Extracting the original image of the copper plate surface at the pixel level The red, green, and blue pixel values ​​at the point are used to convert the original image of the copper plate surface into a grayscale image using a grayscale algorithm; The grayscale image is input using a Gaussian filtering algorithm. The grayscale image is then convolved to suppress random noise and preserve edge details, resulting in a denoised grayscale image.

3. The copper plate particle detection method based on edge detection and dynamic region division according to claim 1, characterized in that, The method inputs the denoised grayscale image into a contrast-limited adaptive histogram equalization algorithm and outputs an illumination-normalized grayscale image, specifically as follows: The denoised grayscale image is divided into multiple independent sub-blocks; the contrast of each independent sub-block is limited, and then the contrast-limited independent sub-blocks are processed by an equalization mapping function to obtain a new grayscale value for each independent sub-block. The gray values ​​of individual sub-blocks in the denoised grayscale image are replaced with new gray values ​​processed by the equalization mapping function; after replacing the gray values ​​of each individual sub-block, an illumination-normalized grayscale image is obtained.

4. The copper plate particle detection method based on edge detection and dynamic region division according to claim 1, characterized in that, The method employs an edge detection algorithm to extract salient edges from an illumination-normalized grayscale image, resulting in a binary edge image. Specifically: The horizontal and vertical gradients of the illumination-normalized grayscale image are calculated using horizontal and vertical gradient operators, respectively. Based on the horizontal and vertical gradients, the gradient magnitude and continuous gradient direction are calculated. The continuous gradient direction is then discretized to obtain the discrete gradient direction. Determine whether the gradient magnitude of any pixel is a local maximum along its discrete gradient direction. If so, set the gradient magnitude to 0 and remove pixels that are not on the edge center line. If not, retain the original value and refine the coarse edge into a clear edge with a single pixel width. Pixels that still have weak gradient values ​​after non-maximum suppression are filtered using double thresholds to obtain a binary edge image.

5. The copper plate particle detection method based on edge detection and dynamic region division according to claim 1, characterized in that, The method utilizes the Hough transform algorithm to divide the copper plate surface into a nine-square grid region, specifically as follows: Establish a polar coordinate system for the current binary edge image, and define the coordinate system for any pixel. The equation of the line containing the line is expressed by the formula: ; In the formula, This represents the distance from the origin to the line in polar coordinates. Represents polar coordinates and The angle between the axes; Create a two-dimensional accumulator array This can be expressed as a formula: ; In the formula, In Hough space The corresponding two-dimensional accumulator value, This is an indicator function that returns 1 if the condition within the parentheses is true, and 0 otherwise. For each pixel in the binary edge image In the polar coordinate system of Hough space, each corresponds to a straight line equation. ; If multiple pixels in a binary edge image belong to the same ground truth line, then the curves of pixels on the same ground truth line in Hough space will intersect at the same point. point; At this point, the two-dimensional accumulator Will this The value of the two-dimensional accumulator for a point increments by 1; the true straight line in the binary edge image corresponds to... The point will increase due to the auto-increment of the value of the two-dimensional accumulator. The value of the two-dimensional accumulator is much higher than that of other pixels in the binary edge image, resulting in... The highest peak values ​​of the two-dimensional accumulator, these peak values ​​correspond to The point represents the true line parameter in the binary edge image; Horizontal steel strip ,but , The equation of the straight line for the horizontal steel strip is obtained as follows: Vertical steel strip ,but , The equation of the straight line perpendicular to the steel strip is obtained as follows: ;in, This represents the x-coordinate of a pixel in a binary edge image. This represents the ordinate of a pixel in a binary edge image. This represents the distance from the origin to the line in the polar coordinate system. Since there are two horizontal steel strips and two vertical steel strips, the distance from the origin to the line in the polar coordinate system is different, resulting in four different equations for the steel strip boundary lines. Calculate the intersection points between each pair of the equations of the four steel strip boundary lines to obtain four intersection points; divide the copper plate into three equal rows horizontally and three equal columns vertically based on the four intersection points to divide the copper plate into a nine-square grid area.

6. The copper plate particle detection method based on edge detection and dynamic region division according to claim 1, characterized in that, The method utilizes the probability of particles existing on the surface of a copper plate in a nine-square grid area, combined with a preset particle binary classification criterion, to obtain the particle binary classification result, specifically as follows: Feature extraction is performed on the nine-square grid region to obtain feature vectors. These feature vectors are then input into a pre-trained multilayer perceptron to obtain the probability of particles existing on the copper plate surface within the nine-square grid region. Combined with a pre-defined particle binary classification criterion, the particle binary classification result is determined, expressed by the formula: ; In the formula, This represents the results of the particle binary classification. This indicates that there are particles on the surface of the copper plate in the current 3x3 grid area. This indicates that there are no particles on the surface of the copper plate in the current 3x3 grid area. This indicates the probability that particles exist on the surface of the copper plate in the current 3x3 grid area.

7. A copper plate particle detection system with edge detection and dynamic region segmentation, characterized in that, Includes the following modules: Image preprocessing and equalization module: acquires the original image of the copper plate surface containing the grid-shaped steel strip collected by the monitoring equipment, preprocesses the original image of the copper plate surface to obtain a denoised grayscale image; inputs the denoised grayscale image into the contrast-limited adaptive histogram equalization algorithm, and outputs an illumination-normalized grayscale image. Detection region segmentation module: The edge detection algorithm is used to extract the edges of the illumination normalized grayscale image to obtain a binary edge image; the binary edge image is input into the Hough transform algorithm to obtain the straight line equation of the grid-shaped steel strip; the intersection coordinates of the grid-shaped steel strip are calculated based on the straight line equation; and the nine-square grid area is divided on the copper plate surface according to the intersection coordinates. Feature extraction and model training module: Extracts features from the nine-square grid region to obtain feature vectors; The feature vector is input into a pre-trained multilayer perceptron to obtain the probability of particles existing on the surface of the copper plate in the nine-square grid area. Combined with the preset particle binary classification criterion, the particle binary classification result is obtained. Differentiating label pasting module: The particle binary classification results are input to a preset programmable logic controller via industrial Ethernet protocol or serial communication, which drives the actuator to paste differentiating labels on the particle board and the good board respectively.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 6.