A workpiece target recognition method and system based on image processing

By calculating pixel-specific sharpening coefficients and using an optimal Laplacian kernel for image sharpening, the method addresses the issues of insufficient edge enhancement and noise over-sharpening in traditional methods, improving workpiece recognition accuracy.

CN119888703BActive Publication Date: 2025-07-15SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510387016.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-15
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

In the prior art, the Laplace sharpening method does not sharpen the image edges and excessively sharpen the noise, resulting in low accuracy in the recognition of the workpiece.

Method used

By calculating the sharpening coefficient of each pixel point, building an optimal convolution kernel for Laplace sharpening, dynamically adjusting the sharpening intensity to improve image sharpness and reduce noise impact, an image processing-based artifact object recognition method and system are adopted.

Benefits of technology

It improves the clarity of the workpiece image, reduces the probability of noise oversharpening, and improves the accuracy of workpiece recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888703B_ABST
    Figure CN119888703B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technologies, and particularly to a workpiece target recognition method and system based on image processing. The method includes calculating the sharpening coefficient of each pixel point; constructing an optimal convolution kernel by multiplying the sharpening coefficient by a preset convolution kernel, and performing Laplacian sharpening on the image through the optimal convolution kernel to perform workpiece recognition. Among them, the calculation method of the sharpening coefficient includes: calculating the probability that the pixel point is located in a high-noise area; taking the normalized result of the product of the probability and the pixel point gradient value as the noise probability of the pixel point; calculating the noise tolerance of the pixel point; and obtaining the sharpening coefficient according to the noise probability and the noise tolerance. The present application has the effect of improving the accuracy of workpiece recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular, to a workpiece target recognition method and system based on image processing. Background Art

[0002] A workpiece refers to a component or material unit used for further processing or assembly in manufacturing. With the development of modern industry towards automation and intelligence, accurate recognition of workpieces becomes particularly important in the processes of workpiece picking and placing as well as workpiece classification. Machine vision means that through an image acquisition device, the equipment can "see" the workpiece, and then by processing the image, the recognition of features such as the shape and size of the workpiece is realized. After the parts are recognized, the functions of automatic sorting or assembly can be achieved, reducing manual intervention in the automated production line and improving the production efficiency of products. For example, in the patent application document with the publication number CN114078162A, the truss sorting method and system for workpieces after steel plate cutting mainly include the steps of: obtaining the texture image information and depth image information of the original workpiece in the first coordinate system; determining the first point cloud data of the original workpiece in the second coordinate system according to the texture image information and depth image information; determining the second point cloud data of the original workpiece in the second coordinate system according to the first point cloud data and the transformation matrix; and determining the target area according to the second point cloud data and the target template matching the target workpiece.

[0003] After obtaining the workpiece image information, it is often necessary to preprocess the image to sharpen the edges of the workpiece in the image for easy recognition of the workpiece. Laplacian Sharpening is an image enhancement method, which is mainly used to enhance the edges and details of the image. The high-frequency part of the image is processed based on the Laplacian operator to achieve the sharpening effect. The Laplacian operator is realized through a convolution kernel. The traditional Laplacian sharpening has the same convolution kernel for each pixel point. Therefore, there are situations where the blurred edges of workpieces in some images are not sharpened enough and the noise is sharpened too much, which causes interference to the subsequent workpiece recognition and results in low accuracy of subsequent workpiece recognition. Summary of the Invention

[0004] In order to solve the problem of poor image sharpening effect and interference to subsequent part recognition, this application provides a workpiece target recognition method and system based on image processing.

[0005] In a first aspect, this application provides a workpiece target recognition method based on image processing, adopting the following technical solutions:

[0006] The workpiece target recognition method based on image processing includes the steps of:

[0007] Calculate the sharpening coefficient of each pixel point, construct the optimal convolution kernel by multiplying the sharpening coefficient with a preset convolution kernel, and perform Laplacian sharpening on the image through the optimal convolution kernel for workpiece recognition;

[0008] Among them, the calculation method of the sharpening coefficient includes: calculating the probability that the pixel point is located in a high-noise area; taking the normalized result of the product of the probability and the pixel point gradient value as the noise probability of the pixel point; calculating the noise tolerance of the pixel point; obtaining the sharpening coefficient according to the noise probability and the noise tolerance; the calculation formula of the noise tolerance is: ;

[0009] In the formula, is the noise tolerance of the th pixel point; is the th pixel point corresponding to the th pixel point in the neighborhood of the gradient regularity; is the th pixel point and the th pixel point spacing; is the th pixel point in the neighborhood of the total number of pixels; is the exponential function with the natural constant as the base.

[0010] Calculate the noise tolerance and noise probability of each pixel point in the image, and calculate the sharpening coefficient corresponding to each pixel point according to the noise probability and noise tolerance of the pixel point. Substitute the sharpening coefficient into the Laplacian convolution kernel to form the optimal convolution kernel. In the process of sharpening with the optimal convolution kernel, different degrees of sharpening can be performed on different pixel points according to the sharpening coefficient corresponding to the pixel point, so that the image can improve the clarity while reducing the risk of over-sharpening of the noise, reducing the impact of the noise on the subsequent workpiece recognition, and improving the workpiece recognition accuracy.

[0011] Optionally, the calculation steps of the gradient regularity of the pixel point include: constructing a gradient approximate point set of each pixel point; obtaining the coordinates of all pixel points in the gradient approximate point set, and constructing a coordinate set according to the coordinates of the pixel point; calculating the gradient regularity of the pixel point; the calculation formula of the gradient regularity of the pixel point is:

[0012] ; In the formula, is the th pixel point gradient regularity; and are respectively the two eigenvalues of the covariance matrix of the coordinate set of the pixel points in the gradient approximate point set of the th pixel point; is the th pixel point in the gradient approximate point set of the The cosine similarity of the gradient direction between the th pixel point and the th pixel point; is the total number of pixel points in the gradient approximation point set of the th pixel point; is the median function;

[0013] The gradient pattern of a pixel point refers to the regularity and consistency of the gradients of the pixel points in the neighborhood of the pixel point. In different regions (such as the workpiece region or the noise region, etc.), the gradients of the pixel points in the neighborhood have different manifestations. Extract the gradient approximation point set, and obtain the distribution pattern of the pixel points in the gradient approximation point set through the relationship between the two eigenvalues of the covariance matrix. Determine the gradient pattern degree of the pixel point according to the regularity of the distribution of the pixel points in the neighborhood within the gradient approximation point set, so as to facilitate the judgment of whether the pixel point is located in the noise region, and facilitate the subsequent setting of the sharpening coefficient according to the gradient pattern degree of the pixel point. Specifically, if the gradient pattern degree of a certain pixel point is large, it means that the pixel point is more likely to be at the edge of the workpiece, and a larger sharpening coefficient is required for the pixel points at the edge of the workpiece to highlight the workpiece.

[0014] Optionally, the method for constructing the gradient approximation point set includes: setting a gradient approximation interval; obtaining the gradient values of all the neighborhood pixel points of the pixel point, and the neighborhood pixel points whose gradient values are within the gradient approximation interval form the gradient approximation point set.

[0015] Optionally, the range of the gradient approximation interval is ; where is the gradient value of the th pixel point; is the maximum value of the gradients of the pixel points in the image, is the adjustment coefficient, .

[0016] Optionally, the calculation formula for the probability that a pixel point is located in a high-noise region is:

[0017] ;

[0018] Where is the possibility that the th pixel point is located in a high-noise region; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the th pixel point in the neighborhood of the th pixel point and the The pitch of a pixel point; is the total number of pixel points within the neighborhood of the th pixel point;

[0019] The high-noise area is the area with more noise points, and the noise points usually show sudden brightness changes and random distributions. In the neighborhood range, if the gradient values of two pixel points are both large, then these two pixel points are points with sudden brightness changes. If the distance between two points with sudden brightness changes is farther, it means that the distribution of the two pixel points is more dispersed. Therefore, the probability that they are in the high-noise area is higher, realizing the recognition of the high-noise area.

[0020] Optionally, the calculation formula for the probability that a pixel point is located in the high-noise area is:

[0021] ;

[0022] In the formula, is the possibility that the th pixel point is located in the high-noise area; is the gradient value of the th pixel point within the neighborhood of the th pixel point; is the gradient value of the th pixel point within the neighborhood of the th pixel point; is the distance between the th pixel point and the th pixel point within the neighborhood of the th pixel point; is the total number of pixel points within the neighborhood of the th pixel point;

[0023] Optionally, the calculation formula for the sharpening coefficient is: ;

[0024] In the formula, is the sharpening coefficient of the th pixel point; is the noise probability of the th pixel point; is the noise tolerance of the th pixel point.

[0025] By calculating the noise probability and noise tolerance, the sharpening coefficient of each pixel point is dynamically adjusted. On the one hand, the blurred edges of the workpiece are sharpened more, while reducing the over-sharpening of noise points. Therefore, in a complex industrial environment, dynamically adjusting the sharpening intensity of each pixel point can improve the recognition accuracy of complex workpieces.

[0026] Optionally, the calculation formula for the sharpening coefficient is as follows: ;

[0027] In the formula, is the sharpening coefficient of the th pixel point; is the noise probability of the th pixel point; is the noise tolerance of the th pixel point; is the adjustment coefficient.

[0028] By setting the adjustment coefficient, the sharpening coefficient can be flexibly adjusted to meet the processing requirements of different images in different scenarios; the clarity of the workpiece image is improved, thereby improving the accuracy of workpiece recognition.

[0029] During the image processing process, the value of can be adjusted according to the actual situation to improve the flexibility during the image processing process.

[0030] In a second aspect, the present application provides a workpiece target recognition method based on image processing, adopting the following technical solution:

[0031] A workpiece target recognition system based on image processing includes: a processor and a memory, and the memory stores computer program instructions, which when executed by the processor implement the workpiece target recognition method based on image processing as described above.

[0032] Generate a computer program for the workpiece target recognition method based on image processing as described above and store it in the memory to be loaded and executed by the processor. Thus, a system is made according to the memory and the processor, which is convenient to use.

[0033] The present application has the following technical effects: calculating the noise probability and noise tolerance of pixel points, setting corresponding sharpening coefficients for each pixel point, and the Laplacian convolution kernel sharpens different pixel points in the image to different degrees according to different sharpening coefficients. On the one hand, the clarity of the workpiece image is improved, and on the other hand, the probability of over-sharpening of noise points is reduced, improving the recognition accuracy. Description of the Drawings

[0034] Figure 1 is the method flow chart of the workpiece target recognition method based on image processing of the present application.

[0035] Figure 2 is the method flow chart of step S1 of the workpiece target recognition method based on image processing of the present application. Detailed Embodiments

[0036] The embodiments of the present application disclose a workpiece target recognition method and system based on image processing. A sharpening coefficient is set for each pixel point in the workpiece image, and an optimal convolution kernel for each pixel point is obtained according to the sharpening coefficient of each pixel point. The operation of sharpening the workpiece image by applying the Laplacian sharpening of the optimal convolution kernel is performed to improve the clarity of the workpiece image while reducing the over-sharpening of noise points.

[0037] Referring to Figure 1 , the workpiece target recognition method based on image processing includes steps S1 - step S2;

[0038] S1, calculating the sharpening coefficient of each pixel point;

[0039] After collecting the image of the workpiece, preprocess the workpiece image. Obtain the gradient value and gradient direction of each pixel point in the image, and determine the pixel point neighborhood. Calculate the Euclidean distance between any two pixel points in the pixel point neighborhood, calculate the probability that the pixel point is located in the high-noise area through the distance between pixel points, and calculate the noise point probability of the pixel point according to the probability that the pixel point is located in the high-noise area and the gradient value of the pixel point; determine the gradient approximation interval, obtain the pixel points in the pixel point neighborhood whose gradient values are located in the gradient approximation interval, and construct a gradient approximation point set for each pixel point. According to the coordinates of the pixels in the gradient approximation point set, construct a covariance matrix, and calculate two eigenvalues of the covariance matrix. Calculate the pixel point gradient regularity through the two eigenvalues of the covariance matrix and the similarity of the gradient directions between any two different pixel points in the gradient approximation point set, and calculate the noise tolerance through the gradient regularity. Determine the sharpening coefficient according to the noise point probability and the noise tolerance.

[0040] Referring to Figure 2 , step S1 includes steps S11 - step S15;

[0041] S11: calculating the probability that the pixel point is in the high-noise area;

[0042] Shoot the original image of the workpiece through an industrial camera, and perform gray-scale processing on the original image of the workpiece to obtain the workpiece image. Gray-scale processing the original image reduces the computational complexity of subsequent processing.

[0043] Taking each pixel point as the center, construct a square area as the neighborhood of each pixel point. In this embodiment, the neighborhood contains pixel points. Of course, in other embodiments, the size of the neighborhood can be determined according to the actual situation to adjust the number of pixel points in the neighborhood. For example, the number of pixel points in the neighborhood can be set to . For the pixel points at the edge of the workpiece image, make up for the missing pixel points in the neighborhood by mirror flipping.

[0044] Obtain the gradient values of the pixel points in the neighborhood; obtain the Euclidean distance between any two different pixel points in the neighborhood of each pixel point, and use this distance as the distance between the two pixel points. Calculate the probability that each pixel point is in a high-noise area according to the distance between the two pixel points and the gradient values of the pixel points in the neighborhood.

[0045] In one embodiment, the calculation formula for the probability that a pixel point is in a high-noise area is:

[0046] ;

[0047] In the formula, is the probability that the th pixel point is in a high-noise area; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the distance between the th pixel point and the th pixel point in the neighborhood of the th pixel point; is the total number of pixel points in the neighborhood of the th pixel point; is a linear normalization function.

[0048] A high-noise area is an area with more noise points, and noise points usually show sudden brightness changes and randomly distributed pixel points. represents the influence coefficient between the th pixel point and the th pixel point in the neighborhood of the th pixel point. If the gradient values of both pixel points are large, it means that these two pixel points are points with sudden brightness changes. At this time, the distance between the two pixel points can further determine the nature of the pixel points (belonging to noise points or edges). The farther the distance between two points with sudden brightness changes, the more scattered these two pixel points are and the more likely they are to belong to noise points. Therefore, when measuring whether the th pixel point is in a high-noise area, when the gradient of the th pixel point and the th pixel point in the neighborhood of the th pixel point is high, the distance between the th pixel point and the th pixel point has a greater impact on the probability that the th pixel point is in a high-noise area. When the weighted sum of the distances between all pixel points in the neighborhood of the th pixel point pairwise according to the degree of influence is higher, it means that the The more discrete the positions of the pixels with high gradients in the neighborhood of a pixel are, the higher the probability that the th pixel is located in a high-noise area.

[0049] In another embodiment, the calculation formula for the probability that a pixel is in a high-noise area is:

[0050] ;

[0051] In the formula, is the probability that the th pixel is located in a high-noise area; is the gradient value of the th pixel in the neighborhood of the th pixel; is the gradient value of the th pixel in the neighborhood of the th pixel; is the distance between the th pixel and the th pixel and the th pixel in the neighborhood of the th pixel; is the total number of pixels in the neighborhood of the th pixel;

[0052] By calculating the mean value after double summation, it can better reflect the distribution characteristics of the pixels in the neighborhood.

[0053] S12: Using the normalized result of the product of the probability and the pixel gradient value as the noise probability of the pixel;

[0054] Specifically, the calculation formula for the noise probability of each pixel is: ;

[0055] In the formula, is the noise probability of the th pixel; is the probability that the th pixel is located in a high-noise area; is the gradient value of the th pixel; is the linear normalization function.

[0056] In an image, when the probability that a pixel is located in a high-noise area is greater and its own gradient value is also greater, the probability that the pixel belongs to noise is also greater.

[0057] S13: Calculate the noise tolerance of the pixel;

[0058] Set the gradient approximation interval for each pixel according to the gradient of each pixel; obtain the pixels whose gradient values are within the gradient approximation interval among all the pixels in the neighborhood of a pixel, and the pixels with multiple gradient values within the gradient approximation interval constitute the gradient approximation point set of this pixel.

[0059] In this embodiment, the gradient approximation interval is ; where is the gradient value of the th pixel; is the maximum value of the gradients among all the pixels in the image; is the adjustment coefficient.

[0060] ; in this embodiment is 0.1, and in other embodiments can be 0.2, 0.25, etc. During the workpiece recognition process, the value of can be adjusted according to the actual situation to obtain higher recognition accuracy.

[0061] Obtain the coordinates of all the pixels in the gradient approximation point set, and construct a coordinate set according to the coordinates of the pixels;

[0062] Obtain the covariance matrix of the coordinate set according to the coordinate set, and obtain two eigenvalues of the covariance matrix through eigenvalue decomposition.

[0063] Specifically, the covariance matrix of the coordinate set is ,

[0064] , ,

[0065] ;

[0066] In the formula, is the covariance matrix of the coordinate set of the gradient approximation point set of the th pixel; is the horizontal coordinate dispersion of the gradient approximation point set of the th pixel; is the vertical coordinate dispersion of the gradient approximation point set of the th pixel; , is the correlation of the data change in the horizontal axis direction and the vertical axis direction of the gradient approximation point set of the th pixel; is the horizontal coordinate of the th pixel in the gradient approximation point set of the th pixel; is the th pixel in the gradient approximation point set of the The ordinate of the pixel point; is the mean value of the abscissas of all pixel points in the gradient approximation point set of the -th pixel point; is the mean value of the ordinates of all pixel points in the gradient approximation point set of the -th pixel point; is the total number of pixel points in the gradient approximation point set of the -th pixel point.

[0067] S14: Calculate the gradient regularity degree of the pixel point;

[0068] The calculation formula for the gradient regularity degree of the pixel point is: ;

[0069] In the formula is the gradient regularity degree of the -th pixel point; and are respectively the two eigenvalues of the covariance matrix of the coordinate set of pixel points in the gradient approximation point set of the -th pixel point; is the cosine similarity of the gradient direction between the -th pixel point and the -th pixel point in the gradient approximation point set of the -th pixel point; is the total number of pixel points in the gradient approximation point set of the -th pixel point; is the median function; is the linear normalization function.

[0070] In the covariance matrix, the eigenvalues of the covariance matrix represent the degree of change of the data in different directions; if the pixel points in the gradient approximation point set are roughly distributed along a straight line or a strip, the difference between the two eigenvalues is large. If the pixel points in the gradient approximation point set are distributed within a circular range, it indicates that the degree of change of the data in all directions is similar, and the difference between the two eigenvalues of the covariance matrix is small. In the formula, if the points in the gradient approximation point set of a pixel point are linearly distributed, is much greater than , then is close to 1; conversely, if the pixel points in the gradient approximation point set are circularly distributed, then is close to 0, that is, when the pixel line in the gradient approximation point set of this pixel point is linearly distributed, the gradient regularity degree of this pixel point is higher.

[0071] represents the The overall difference in the gradient directions in the gradient approximation point set corresponding to a pixel. In an image, the edges of a workpiece usually have a series of pixels with similar gradient directions. If the gradient directions in the gradient approximation point set are similar, it indicates a higher probability that the pixels in the gradient approximation point set belong to the same edge. Therefore, when the gradients of the pixels in the gradient approximation point set corresponding to the th pixel are closer, the gradient regularity of the th pixel is higher.

[0072] In another embodiment, the calculation formula for the gradient regularity of a pixel is:

[0073] ; where is the gradient regularity of the th pixel; and are respectively the two eigenvalues of the covariance matrix of the coordinate sets of the pixels in the gradient approximation point set corresponding to the th pixel; is the cosine similarity of the gradient directions between the th pixel and the th pixel in the gradient approximation point set corresponding to the th pixel; is the total number of pixels in the gradient approximation point set corresponding to the th pixel; is the median function; is the linear normalization function.

[0074] This formula replaces the square root operation with an absolute value operation, which is faster during the operation process and improves the calculation efficiency.

[0075] The calculation formula for the noise tolerance of each pixel is:

[0076] ;

[0077] where is the noise tolerance of the th pixel; is the gradient regularity of the th pixel in the neighborhood of the th pixel; is the distance between the th pixel and the th pixel; is the total number of pixels in the neighborhood of the th pixel; is the exponential function with the natural constant as the base.

[0078] The exponential function is used as a weight. As The increase of The value will decrease rapidly, so the influence of the nth pixel on the represents the gradient regularity degree of the nth pixel, and this value directly affects the noise tolerance of the The larger the distance between the nth pixel and the mth pixel, the higher the noise tolerance of the

[0079] S15: Obtain the sharpening coefficient according to the noise probability and the noise tolerance;

[0080] In one embodiment, the calculation formula for the sharpening coefficient of each pixel is:

[0081] ;

[0082] In the formula, is the sharpening coefficient of the nth pixel; is the noise probability of the nth pixel; is the noise tolerance of the mth pixel.

[0083] In the formula, the larger the noise tolerance, the greater the probability that the pixel is the edge of the workpiece, so the sharpening coefficient is larger. If the noise probability of the pixel is large, it means that the probability that the pixel belongs to noise is relatively large, so the sharpening coefficient is smaller to reduce the risk of over-sharpening of noise.

[0084] In another embodiment, the calculation formula for the sharpening coefficient of each pixel is:

[0085] ;

[0086] is the sharpening coefficient of the nth pixel; is the noise probability of the nth pixel; is the noise tolerance of the mth pixel, is the adjustment coefficient, which can be adjusted according to the actual situation during the image processing to better sharpen the image.

[0087] S2: Construct an optimal convolution kernel by multiplying the sharpening coefficient with a preset convolution kernel, and perform Laplacian sharpening on the image through the optimal convolution kernel for workpiece recognition;

[0088] Substitute the sharpening coefficient into the preset convolution kernel to obtain the optimal convolution kernel. Sharpen the image through the optimal convolution kernel.

[0089] In one embodiment, the selected matrix size of the initialized convolution kernel is of ; for facilitating image sharpening. After substituting the sharpening coefficient into the initialized convolution kernel, is obtained.

[0090] In another embodiment, the initialized convolution kernel is ; Substitute the sharpening coefficient into the initial convolution kernel to obtain is obtained.

[0091] There is a corresponding sharpening coefficient for each pixel point in the image. Different pixel points are sharpened to different degrees according to different sharpening coefficients, which can improve the clarity of the workpiece image while reducing the risk of over-sharpening of noise, thereby improving the accuracy of workpiece recognition.

[0092] Input the sharpened image into a preset neural network model to obtain the workpiece recognition result. In this embodiment, the neural network model selects the YoloV8 model; determine the coordinates and types of the workpiece according to the position information and feature information of the workpiece in the workpiece recognition result. Convert the coordinates of the workpiece to the base coordinate system of the robotic arm through a coordinate conversion algorithm (such as hand-eye calibration), and drive the servo motor to control the robotic arm to grasp the target workpiece according to the position relationship of the workpiece coordinates in the base coordinate system. Finally, complete the automatic sorting of workpieces based on the sorting path of the preset workpiece types.

[0093] The embodiment of the present application also discloses a workpiece target recognition system based on image processing, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the workpiece target recognition method based on image processing according to the present application is implemented.

[0094] The above system also includes other components well known to those skilled in the art such as a communication bus and a communication interface, and their settings and functions are known in the art, so they will not be described in detail here.

[0095] The above are all the preferred embodiments of the present application. The protection scope of the present application is not limited by this. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.

Claims

1. A workpiece target recognition method based on image processing, characterized in that, Including the steps: Calculating the sharpening coefficient of each pixel point; constructing an optimal convolution kernel by multiplying the sharpening coefficient with a preset convolution kernel, and performing Laplacian sharpening on the image through the optimal convolution kernel for workpiece recognition; The calculation method of the sharpening coefficient includes: calculating the probability that the pixel point is located in a high-noise area; taking the normalized result of the product of the probability and the pixel point gradient value as the noise probability of the pixel point; calculating the noise tolerance of the pixel point; obtaining the sharpening coefficient according to the noise probability and the noise tolerance; Among them, the calculation formula for the noise tolerance is: ; In the formula, is the noise tolerance of the th pixel point; is the gradient regularity of the th pixel point in the neighborhood corresponding to the th pixel point; is the distance between the th pixel point and the th pixel point; is the total number of pixel points in the neighborhood of the th pixel point; is the exponential function with the natural constant as the base; The calculation steps of the gradient regularity of the pixel point include: constructing a gradient approximation point set of each pixel point; obtaining the coordinates of all pixel points in the gradient approximation point set, and constructing a coordinate set according to the coordinates of the pixel point; calculating the gradient regularity of the pixel point; the calculation formula of the gradient regularity of the pixel point is: ; In the formula, is the gradient regularity degree of the -th pixel point; and are respectively the two eigenvalues of the covariance matrix of the coordinate set of the pixel points in the gradient approximation point set of the -th pixel point; is the cosine similarity of the gradient directions between the -th pixel point and the -th pixel point in the gradient approximation point set of the -th pixel point; is the total number of pixel points in the gradient approximation point set of the -th pixel point; is the median function; is the linear normalization function; The calculation formula for the sharpening coefficient is as follows: or , is the sharpening coefficient of the th pixel point, is the noise probability of the th pixel point, is the adjustment coefficient.

2. The workpiece target recognition method based on image processing according to claim 1, wherein The construction method of the gradient approximation point set includes: setting a gradient approximation interval; constructing a pixel neighborhood; obtaining the gradient values of all neighboring pixel points of the pixel point, and the neighboring pixel points whose gradient values are within the gradient approximation interval form a gradient approximation point set.

3. The workpiece target recognition method based on image processing according to claim 2, characterized in that The gradient approximation interval range is ; where is the gradient value of the th pixel; is the maximum value of the pixel gradients in the image, is the adjustment coefficient, .

4. The workpiece target recognition method based on image processing according to claim 1, wherein The calculation formula of the probability that the pixel point is located in a high-noise area is: ; Wherein, is the probability that the th pixel point is located in a high-noise area; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the gradient value of the th pixel point in the neighborhood of the th pixel point; is the distance between the th pixel point and the th pixel point and the th pixel point in the neighborhood of the th pixel point; is the total number of pixel points in the neighborhood of the th pixel point; is a linear normalization function.

5. The workpiece target recognition method based on image processing according to claim 1, characterized in that The calculation formula of the probability that the pixel point is located in a high-noise area is: ; Wherein, is the probability that the -th pixel is located in a high-noise area; is the gradient value of the -th pixel in the neighborhood of the -th pixel; is the gradient value of the -th pixel in the neighborhood of the -th pixel; is the distance between the -th pixel and the -th pixel in the neighborhood of the -th pixel; is the total number of pixels in the neighborhood of the -th pixel; is a linear normalization function.

6. An object recognition system for workpieces based on image processing, characterized in that, Including: A processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the workpiece target recognition method based on image processing according to any one of claims 1-5 is implemented.

Citation Information

Patent Citations

  • Truss sorting method and system for workpieces after steel plate cutting

    CN114078162A

  • 3D printing lattice structure defect detection method

    CN118096579A

  • Endoscope image real-time enhancement method for emergency treatment

    CN119107254A

  • Method for sharpening a digital image with signal to noise estimation

    US20030161545A1