Workpiece target identification method and system based on image processing

By calculating the noise probability and noise tolerance of each pixel point, dynamically adjusting the sharpening coefficient, building the optimal convolution kernel, and performing Laplace sharpening on the image, solving the problems of insufficient image sharpening and excessive noise sharpening in artifact recognition, and improving the recognition accuracy.

CN119888703AActive Publication Date: 2025-04-25SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, in the process of image sharpening, there are problems such as insufficient sharpening of blurred edges of workpieces and excessive sharpening of noise, resulting in low accuracy in workpiece recognition.

Method used

By calculating the noise probability and noise tolerance of each pixel point, dynamically adjusting the sharpening coefficient of each pixel point, building an optimal convolution kernel, and performing Laplace sharpening on the image to improve the sharpness of the workpiece image and reduce the impact of noise.

Benefits of technology

Improves the clarity of the workpiece image, reduces the risk of noise being oversharpened, and thus improves the accuracy of workpiece recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888703A_ABST
    Figure CN119888703A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a workpiece target recognition method and system based on image processing, and the method comprises the steps: calculating the sharpening coefficient of each pixel point; constructing an optimal convolution kernel through a method of multiplying a sharpening coefficient by a preset convolution kernel, and performing Laplace sharpening on the image through the optimal convolution kernel to perform workpiece identification; the sharpening coefficient calculation method comprises the following steps: calculating the probability that a pixel point is located in a high-noise area; taking the normalization result of the product of the probability and the pixel point gradient value as the noise point probability of the pixel point; calculating the noise tolerance of the pixel points; and obtaining a sharpening coefficient according to the noise point probability and the noise tolerance. The method has the effect of improving the workpiece recognition precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Workpiece refers to a component or material unit used for further processing or assembly in the manufacturing industry. As modern industry develops towards automation and intelligence, accurate identification of workpieces has become particularly important in the process of picking and placing workpieces and sorting workpieces. The so-called machine vision refers to the use of an image acquisition device to allow the device to "see" the workpiece, and then process the image to recognize the shape, size and other features of the workpiece. After the parts are identified, the function of automatic sorting or assembly can be realized, reducing manual intervention in the automated production line and improving product production efficiency. For example, the truss sorting method and system for workpieces after steel plate cutting disclosed in the patent application document with publication number CN114078162A mainly includes the steps of: obtaining 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 the 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; 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 to facilitate the identification of the workpiece. Laplacian sharpening is an image enhancement method that is mainly used to enhance image edges and details. The high-frequency part of the image is processed based on the Laplacian operator to achieve a sharpening effect. The Laplacian operator is implemented through a convolution kernel. Traditional Laplacian sharpening uses the same convolution kernel for each pixel. Therefore, there are some cases where the blurred edges of the workpiece in some images are not sharpened enough and the noise points are over-sharpened, which interferes with the subsequent workpiece recognition and leads to low accuracy of subsequent workpiece recognition. Summary of the invention

[0004] In order to solve the problem that the image sharpening effect is poor and interferes with subsequent part recognition, the present application provides a workpiece target recognition method and system based on image processing.

[0005] In the first aspect, the present application provides a workpiece target recognition method based on image processing, which adopts the following technical solution: The workpiece target recognition method based on image processing includes the following steps: Calculate the sharpening coefficient of each pixel, construct the optimal convolution kernel by multiplying the sharpening coefficient with the preset convolution kernel, and perform Laplace sharpening on the image through the optimal convolution kernel for artifact recognition; The calculation method of the sharpening coefficient includes: calculating the probability that the pixel is located in a high noise area; taking the normalized result of the product of the probability and the pixel gradient value as the noise probability of the pixel; calculating the noise tolerance of the pixel; obtaining the sharpening coefficient according to the noise probability and the noise tolerance; the calculation formula of the noise tolerance is: ; In the formula, For the Noise tolerance for each pixel; For the The pixel point in the neighborhood The gradient regularity of each pixel; For the Pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is an exponential function with a natural constant as its base.

[0006] Calculate the noise tolerance and noise probability of each pixel in the image, and calculate the sharpening coefficient corresponding to each pixel based on the noise probability and noise tolerance of the pixel. Substitute the sharpening coefficient into the Laplace convolution kernel to form the optimal convolution kernel. In the process of optimal convolution kernel sharpening, different pixels can be sharpened to different degrees according to the sharpening coefficient corresponding to the pixel, so that the image can improve clarity while reducing the risk of over-sharpening of noise, reduce the impact of noise on subsequent artifact recognition, and improve artifact recognition accuracy.

[0007] Optionally, the step of calculating the gradient regularity of the pixel points includes: constructing a gradient approximate point set for 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 points; calculating the gradient regularity of the pixel points; the calculation formula of the gradient regularity of the pixel points is: ; In the formula, For the The gradient regularity of each pixel; and Respectively The two eigenvalues ​​of the covariance matrix of the coordinate set of the pixel points in the gradient approximation point set; For the The gradient approximation point set of the pixel Pixels and The cosine similarity of the gradient direction of pixels; For the The total number of pixels in the gradient approximation point set of pixels; is the median function; is a linear normalization function.

[0008] The gradient regularity of a pixel point refers to the regularity and consistency of the gradient of a pixel point in the neighborhood of the pixel point. In different areas (workpiece area or noise area, etc.), the gradient of the pixel points in the neighborhood has different performances. Extract the gradient approximate point set, and obtain the distribution regularity of the pixel points in the gradient approximate point set through the relationship between the two eigenvalues ​​of the covariance matrix. Determine the gradient regularity of the pixel point based on the regularity of the pixel point distribution in the neighborhood of the gradient approximate point set, so as to facilitate the judgment of whether the pixel point is located in the noise area, and to facilitate the subsequent setting of the sharpening coefficient based on the gradient regularity of the pixel point. Specifically, if the gradient regularity of a pixel point is larger, 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 point at the edge of the workpiece to highlight the workpiece.

[0009] Optionally, the method for constructing the gradient approximate point set includes: setting a gradient approximate interval; obtaining gradient values ​​of all neighborhood pixels of the pixel point, and the neighborhood pixels whose gradient values ​​are within the gradient approximate interval constitute the gradient approximate point set.

[0010] Optionally, the gradient approximation interval ranges from ; In the formula, For the The gradient value of each pixel; is the maximum value of the pixel gradient in the image, is the adjustment coefficient, .

[0011] Optionally, the probability of a pixel being located in a high noise area is calculated as: ; In the formula, For the The probability that a pixel is located in a high noise area; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is a linear normalization function.

[0012] High noise areas are areas with more noise points, which usually show brightness mutation and random distribution. Within the neighborhood, if the gradient values ​​of two pixels are both large, then these two pixels are points of brightness mutation. If the two points of brightness mutation are farther apart, the two pixels are more dispersed, so the probability of them being in the high noise area is higher, and the high noise area can be identified.

[0013] Optionally, the probability of a pixel being located in a high noise area is calculated as: ; In the formula, For the The probability that a pixel is located in a high noise area; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is a linear normalization function.

[0014] Optionally, the sharpening factor is calculated as: ; In the formula, For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the Noise tolerance of each pixel.

[0015] By calculating the probability of noise points 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 to a greater extent, while at the same time, the over-sharpening of noise points is reduced. Therefore, in complex industrial environments, dynamically adjusting the sharpening intensity of each pixel point can improve the recognition accuracy of complex workpieces.

[0016] Optionally, the sharpening factor is calculated as: ; In the formula, For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the Noise tolerance of each pixel; is the adjustment factor.

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

[0018] During image processing, it can be adjusted according to actual conditions. value, increasing the flexibility of image processing.

[0019] In the second aspect, the present application provides a workpiece target recognition method based on image processing, which adopts the following technical solution: The workpiece target recognition system based on image processing comprises: a processor and a memory, wherein 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 is implemented.

[0020] The above-mentioned workpiece target recognition method based on image processing is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.

[0021] The present application has the following technical effects: the noise probability and noise tolerance of the pixel point are calculated to set the corresponding sharpening coefficient for each pixel point, and the Laplace convolution kernel sharpens different pixels 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 noise points being over-sharpened is reduced, thereby improving recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a method flow chart of the workpiece target recognition method based on image processing in this application.

[0023] Figure 2 This is a method flow chart of step S1 of the workpiece target recognition method based on image processing in the present application. DETAILED DESCRIPTION

[0024] The embodiments of the present application disclose a method and system for workpiece target recognition based on image processing, set a sharpening coefficient for each pixel in the workpiece image, obtain the optimal convolution kernel for each pixel according to the sharpening coefficient of each pixel, and sharpen the workpiece image by applying Laplace sharpening of the optimal convolution kernel to improve the clarity of the workpiece image while reducing the situation where noise points are over-sharpened.

[0025] Reference Figure 1 , the workpiece target recognition method based on image processing includes steps S1-S2; S1, calculate the sharpness coefficient of each pixel; After collecting the image of the workpiece, the workpiece image is preprocessed. The gradient value and gradient direction of each pixel in the image are obtained to determine the neighborhood of the pixel. The Euclidean distance between any two pixels in the neighborhood of the pixel is calculated, and the probability of the pixel being located in the high noise area is calculated by the distance between the pixels. The noise probability of the pixel is calculated based on the probability of the pixel being located in the high noise area and the gradient value of the pixel; the gradient approximation interval is determined, and the pixels whose gradient values ​​in the neighborhood of the pixel are located in the gradient approximation interval are obtained to construct the gradient approximation point set of each pixel. According to the coordinates of the pixels in the gradient approximation point set, the covariance matrix is ​​constructed, and the two eigenvalues ​​of the covariance matrix are calculated. The pixel gradient regularity is calculated by the two eigenvalues ​​of the covariance matrix and the similarity of the gradient direction between any two different pixels in the gradient approximation point set, and the noise tolerance is calculated by the gradient regularity. The sharpening coefficient is determined based on the noise probability and the noise tolerance.

[0026] Reference Figure 2 , step S1 includes step S11 to step S15; S11: Calculate the probability that the pixel is in a high noise area; The original image of the workpiece is captured by an industrial camera, and the original image of the workpiece is grayed to obtain the workpiece image. The graying of the original image can reduce the amount of calculation for subsequent processing.

[0027] With each pixel as the center, a square area is constructed as the neighborhood of each pixel. In this embodiment, the neighborhood includes Of course, in other embodiments, the size of the neighborhood can be determined according to actual conditions to adjust the number of pixels in the neighborhood. For example, the number of pixels in the neighborhood can be set to For the pixels at the edge of the workpiece image, the missing pixels in the neighborhood are completed by mirror flipping.

[0028] Get the gradient value of the pixel in the neighborhood; get the Euclidean distance between any two different pixels in the neighborhood of each pixel, and use this distance as the distance between the two pixels. Calculate the probability of each pixel being in a high noise area based on the distance between the two pixels and the gradient value of the pixel in the neighborhood.

[0029] In one embodiment, the probability of a pixel being in a high noise area is calculated as follows: ; In the formula, For the The probability that a pixel is located in a high noise area; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is a linear normalization function.

[0030] High noise areas are areas with more noise points, and noise points usually appear as sudden changes in brightness and randomly distributed pixels. Indicates The pixel in the neighborhood pixels and The influence coefficient of the pixel. If the gradient values ​​of two pixels are both large, it means that the two pixels are points of sudden brightness changes. At this time, the distance between the two pixels can further determine the nature of the pixel (noise or edge). The farther the distance between the two points of sudden brightness changes, the more dispersed the two pixels are, and the more likely they are noise points. Therefore, when measuring the Whether the pixel is located in a high noise area, when the The pixel in the neighborhood pixels and When the gradient of the pixel is high, pixels and The pixel spacing is The probability that the pixel is located in a high noise area is greater. The higher the value of the weighted sum of the distances between all pixels in the neighborhood of a pixel, the higher the value of the weighted sum of the distances between all pixels in the neighborhood of a pixel. The more discrete the positions of pixels with high gradients in the neighborhood of a pixel, the The more likely a pixel is to be located in a high noise area.

[0031] In another embodiment, the calculation formula for the probability that a pixel point is in a high noise area is: ; In the formula, For the The probability that a pixel is located in a high noise area; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is a linear normalization function.

[0032] pass Calculating the mean after double summation can better reflect the distribution characteristics of pixels in the neighborhood.

[0033] S12: taking the normalized result of the product of the probability and the pixel gradient value as the noise probability of the pixel; Specifically, the calculation formula for the noise probability of each pixel is: ; In the formula, For the The noise probability of each pixel; For the The probability that a pixel is located in a high noise area; For the The gradient value of each pixel; is a linear normalization function.

[0034] In an image, the greater the probability that a pixel is located in a high noise area and the larger its own gradient value is, the greater the probability that the pixel is a noise point.

[0035] S13: Calculate the noise tolerance of the pixel; The gradient approximation interval of each pixel point is set according to the gradient of each pixel point; the pixel points whose gradient values ​​are in the gradient approximation interval among all the pixel points in the neighborhood of a pixel point are obtained, and the pixel points whose gradient values ​​are in the gradient approximation interval constitute the gradient approximation point set of the pixel point.

[0036] In this embodiment, the gradient approximation interval is ;in For the The gradient value of each pixel; It is the maximum value of the gradient among all pixels in the image; is the adjustment coefficient.

[0037] In this embodiment is 0.1, in other embodiments It can be 0.2, 0.25, etc. During the workpiece recognition process, it can be adjusted according to the actual situation. value to obtain higher recognition accuracy.

[0038] Get the coordinates of all pixels in the gradient approximation point set, and construct a coordinate set based on the coordinates of the pixels; The covariance matrix of the coordinate set is obtained according to the coordinate set, and two eigenvalues ​​of the covariance matrix are obtained by eigendecomposition.

[0039] Specifically, the covariance matrix of the coordinate set is , , , ; In the formula, For the The covariance matrix of the coordinate set of the gradient approximation point set of pixels; For the The horizontal coordinate discreteness of the gradient approximation point set of pixels; For the The vertical coordinate discreteness of the gradient approximation point set of pixels; , For the The correlation between the data changes in the horizontal and vertical directions of the gradient approximation point set of each pixel; For the The gradient approximation point set of the pixel The horizontal coordinate of the pixel point; For the The gradient approximation point set of the pixel The vertical coordinate of the pixel; For the The gradient of a pixel is the mean of the horizontal coordinates of all pixels in the approximate point set; For the The gradient of a pixel is the mean of the ordinates of all pixels in the approximate point set; For the The total number of pixels in the gradient approximation point set of each pixel.

[0040] S14: Calculate pixel point gradient regularity; The calculation formula of pixel gradient regularity is: ; In the formula For the The gradient regularity of each pixel; and Respectively The two eigenvalues ​​of the covariance matrix of the coordinate set of the pixel points in the gradient approximation point set; For the The gradient approximation point set of the pixel Pixels and The cosine similarity of the gradient direction of pixels; For the The total number of pixels in the gradient approximation point set of pixels; is the median function; is a linear normalization function.

[0041] In the covariance matrix, the eigenvalues ​​of the covariance matrix represent the degree of change of the data in different directions; if the pixels in the gradient approximation point set are roughly distributed along a straight line or strip, the difference between the two eigenvalues ​​is large. If the pixels in the gradient approximation point set are distributed within a circular range, it means 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 are distributed linearly, Much greater than ,but is close to 1; on the contrary, if the pixels in the gradient approximation point set are distributed in a circle, then The closer it is to 0, that is, when the pixel line in the gradient approximation point set of the pixel point is linearly distributed, the higher the gradient regularity of the pixel point.

[0042] Indicates The overall difference in the gradient direction of the gradient approximation point set corresponding to the pixels. The edge of the workpiece in the image usually has a series of pixels with similar gradient directions. If the gradient directions of the gradient approximation point set are similar, the probability that the pixels in the gradient approximation point set belong to the same edge is higher. The closer the gradients of the pixels in the gradient approximation point set are, the The higher the gradient regularity of each pixel, the better.

[0043] In another embodiment, the calculation formula of pixel gradient regularity is: ; In the formula, For the The gradient regularity of each pixel; and Respectively The two eigenvalues ​​of the covariance matrix of the coordinate set of the pixel points in the gradient approximation point set; For the The gradient approximation point set of the pixel Pixels and The cosine similarity of the gradient direction of pixels; For the The total number of pixels in the gradient approximation point set of pixels; is the median function; is a linear normalization function.

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

[0045] The noise tolerance calculation formula for each pixel is: ; In the formula, For the Noise tolerance of each pixel; For the The first pixel in the neighborhood The gradient regularity of each pixel; For the Pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is an exponential function with a natural constant as its base.

[0046] Exponential function As weight, Increase The value of will decrease rapidly, so the Pixel pair The influence of pixels increases with decreasing distance. Indicates The gradient regularity of the pixel point directly affects the The noise tolerance of each pixel, The bigger, the Pixels and The closer the distance between pixels, the The higher the noise tolerance of each pixel, the better.

[0047] S15: Obtaining a sharpening coefficient according to the noise point probability and the noise tolerance; In one embodiment, the sharpening coefficient calculation formula for each pixel is: ; In the formula, For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the Noise tolerance of each pixel.

[0048] The greater the noise tolerance, the greater the probability that the pixel is the edge of the workpiece, so the sharpening coefficient is greater. If the pixel noise probability is high, it means that the pixel is likely to be a noise point, so the sharpening coefficient is smaller to reduce the risk of over-sharpening of noise points.

[0049] In another embodiment, the sharpening coefficient calculation formula of each pixel is: ; For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the The noise tolerance of each pixel, To adjust the coefficient, it can be adjusted according to the actual situation during image processing size to better sharpen the image.

[0050] S2: construct an optimal convolution kernel by multiplying the sharpening coefficient with the preset convolution kernel, and perform Laplace sharpening on the image through the optimal convolution kernel for artifact recognition; Substitute the sharpening coefficient into the preset convolution kernel to obtain the optimal convolution kernel. The image is sharpened using the optimal convolution kernel.

[0051] In one embodiment, the size of the initial convolution kernel selection matrix is of ; In order to sharpen the image. Substituting the sharpening coefficient into the initial convolution kernel, we get .

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

[0053] Each pixel in the image has a corresponding sharpening coefficient. Different pixels 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 points, thereby improving the accuracy of workpiece recognition.

[0054] The sharpened image is input into the preset neural network model to obtain the workpiece recognition result. In this embodiment, the neural network model uses the YoloV8 model; the coordinates of the workpiece and the type of the workpiece are determined according to the position information of the workpiece and the feature information of the workpiece in the recognition result of the workpiece. The coordinates of the workpiece are converted into the base coordinate system of the robot arm through a coordinate conversion algorithm (such as hand-eye calibration), and the servo motor is driven to control the robot arm to grab the target workpiece according to the position relationship of the workpiece coordinates in the base coordinate system. Finally, the automatic sorting of the workpiece is completed based on the sorting path of the preset workpiece type.

[0055] An embodiment of the present application also discloses a workpiece target recognition system based on image processing, including a processor and a memory, wherein 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.

[0056] 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 configuration and functions are known in the art, so they will not be described in detail here.

[0057] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A workpiece target recognition method based on image processing, characterized in that: Includes steps: Calculate the sharpening coefficient of each pixel; construct the optimal convolution kernel by multiplying the sharpening coefficient with the preset convolution kernel, and perform Laplace sharpening on the image through the optimal convolution kernel for artifact recognition; The calculation method of the sharpening coefficient includes: calculating the probability that the pixel is located in a high noise area; taking the normalized result of the product of the probability and the pixel gradient value as the noise probability of the pixel; calculating the noise tolerance of the pixel; obtaining the sharpening coefficient according to the noise probability and the noise tolerance; the calculation formula of the noise tolerance is: ; In the formula, For the Noise tolerance for each pixel; For the The pixel point in the neighborhood The gradient regularity of each pixel; For the Pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is an exponential function with a natural constant as its base.

2. The workpiece target recognition method based on image processing according to claim 1 is characterized in that: The calculation steps of the gradient regularity of pixel points include: constructing a gradient approximate point set for 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 points; calculating the gradient regularity of the pixel point; the calculation formula of the gradient regularity of the pixel point is: ; In the formula, For the The gradient regularity of each pixel; and Respectively The two eigenvalues ​​of the covariance matrix of the coordinate set of the pixel points in the gradient approximation point set; For the The gradient approximation point set of the pixel Pixels and The cosine similarity of the gradient direction of pixels; For the The total number of pixels in the gradient approximation point set of pixels; is the median function; is a linear normalization function.

3. The workpiece target recognition method based on image processing according to claim 2 is characterized in that: The method for constructing a gradient approximate point set includes: setting a gradient approximate 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 approximate interval constitute the gradient approximate point set.

4. The workpiece target recognition method based on image processing according to claim 3 is characterized in that: The gradient approximation interval range is ; In the formula, For the The gradient value of each pixel; is the maximum value of the pixel gradient in the image, is the adjustment coefficient, .

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

6. The workpiece target recognition method based on image processing according to claim 1 is characterized in that: The probability that a pixel is located in a high noise area is calculated as: ; In the formula, For the The probability that a pixel is located in a high noise area; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood The gradient value of each pixel; For the The pixel in the neighborhood pixels and The distance between pixels; For the The total number of pixels in the neighborhood of a pixel; is a linear normalization function.

7. The workpiece target recognition method based on image processing according to claim 1 is characterized in that: The calculation formula of the sharpening factor is: ; In the formula, For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the Noise tolerance of each pixel.

8. The workpiece target recognition method based on image processing according to claim 1 is characterized in that: The calculation formula of the sharpening factor is: ; In the formula, For the The sharpening factor of each pixel; For the The noise probability of each pixel; For the Noise tolerance of each pixel; is the adjustment factor.

9. A workpiece target recognition system based on image processing, characterized in that: include: A processor and a memory, wherein 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 to 8 is implemented.

Citation Information

Patent Citations

  • Image sharpening method based on mode prediction and direction sequencing

    CN102035997A

  • Industrial camera image sharpening method, device and equipment and storage medium

    CN115311242A

  • 3D printing lattice structure defect detection method

    CN118096579A

  • Image-based power generation equipment part production detection method

    CN118552522A

  • Transmission shaft part defect detection method and system based on image processing

    CN118552549A

Cited By

  • Power supply module component defect detection method and system in severe environment

    CN122391221A