Search

CN-122023360-A - Method for detecting turning effect of oxide layer on surface of bar

CN122023360ACN 122023360 ACN122023360 ACN 122023360ACN-122023360-A

Abstract

The invention belongs to the technical field of image detection, and particularly relates to a method for detecting turning effect of an oxide layer on the surface of a bar. The method comprises the steps of carrying out Gaussian differential pyramid decomposition and double-branch perception network pretreatment on the surface image of the bar after turning, effectively inhibiting noise interference, constructing a mutual information characteristic quantization system, extracting frequency domain energy distribution of a mutual information attenuation spectrum curve, respectively calculating a process consistency index and a surface abnormal disturbance index, and realizing objective and accurate judgment of turning quality based on double-index fusion. The invention overcomes the defects of strong subjectivity, low efficiency and insufficient adaptability of the traditional manual detection method, has high detection precision, good repeatability and quick response, and remarkably improves the subsequent processing precision of the bar and the service reliability of the product.

Inventors

  • WANG RONGSHAN
  • YANG BING
  • LIU YANG
  • ZHENG SHUAI
  • ZHOU XIANGCHUN
  • Meng Sudong
  • ZHANG YUNYUN
  • WANG BAOQUAN

Assignees

  • 山东新景机械有限公司

Dates

Publication Date
20260512
Application Date
20260203

Claims (9)

  1. 1. The method for detecting the turning effect of the oxide layer on the surface of the bar is characterized by comprising the following steps of: acquiring gray level images of the surface of the bar after turning under the uniform illumination condition, and dividing the gray level images into M multiplied by N local analysis windows which are regularly arranged, wherein M is the number of axial windows, and N is the number of circumferential windows; For each local analysis window, constructing a gray value set and a normalized local space coordinate set of pixels in the window, and calculating a mutual information characteristic value between the gray value set and the normalized local space coordinate set, wherein the mutual information characteristic value represents the statistical dependency intensity of gray distribution and space position in a local area; generating a two-dimensional mutual information characteristic distribution matrix based on the mutual information characteristic values of all the local analysis windows; Carrying out one-dimensional projection on the two-dimensional mutual information characteristic distribution matrix along the window arrangement direction to obtain a mutual information attenuation spectrum curve, wherein the abscissa of the mutual information attenuation spectrum curve is a window sequence index, and the ordinate is a mutual information characteristic value after one-dimensional projection; Calculating the frequency domain energy distribution of the mutual information attenuation spectrum curve, performing discrete Fourier transform on the attenuation spectrum curve, extracting the energy duty ratio of a low-frequency component as a process consistency index, and extracting the energy duty ratio of a high-frequency component as a surface abnormal disturbance index; And calculating turning effect quality scores through normalization weighted summation based on the process consistency index and the surface abnormal disturbance index, and averaging the quality scores of a plurality of collecting surfaces around the bar to obtain a final bar turning effect quality score.
  2. 2. The method for detecting the turning effect of an oxide layer on the surface of a bar according to claim 1, wherein the preprocessing of the gray image data is required after the gray image of the surface of the bar under the uniform illumination condition is obtained after the turning, comprising: Preprocessing an input noisy image, generating a plurality of image feature images with different scales through a Gaussian differential pyramid, and simultaneously calculating pixel gradient variances of the feature images with different scales; Inputting the pixel gradient variance into a dual-branch perception network, dividing noise into high-frequency impulse noise and low-frequency Gaussian noise by a threshold adaptive classifier by a first branch, calculating by a pixel neighborhood correlation to obtain a noise intensity gradient coefficient by a second branch, and outputting a decoupled noise type label and a noise intensity distribution matrix; Based on the noise type labels and the noise intensity distribution matrix, distributing dynamic fusion weights for the generated scale feature graphs, and simultaneously mapping the noise intensity distribution matrix into weight bias of a convolution kernel through a convolution kernel dynamic adjustment mechanism to obtain an enhanced feature graph; And (5) carrying out pixel value normalization processing on the enhanced feature image, and outputting a final denoising image.
  3. 3. The method for detecting turning effects of oxide layers on surfaces of bars according to claim 1, wherein the implementation of the normalized local space coordinate set comprises: the method comprises the steps of constructing a local rectangular coordinate system by taking the top left corner vertex of a local analysis window as a coordinate origin, taking the width direction of the window as an X axis and the height direction as a Y axis; For each pixel in the window, calculating the transverse pixel offset and the longitudinal pixel offset of the pixel relative to the origin; performing scale normalization to linearly map all coordinate values to a [0,1] closed interval; and combining the horizontal coordinates and the vertical coordinates after normalization of each pixel into two-dimensional coordinate pairs, and maintaining a one-to-one correspondence with the pixels of the gray value sequence to form a normalized local space coordinate set.
  4. 4. The method for detecting turning effects of oxide layers on the surface of a rod according to claim 1, wherein when a gray value set of pixels in a window is constructed, gray level rank normalization is required to be performed on the gray value set of pixels in the window, each pixel gray value is replaced by the percentile rank in the gray level sequence of the whole image, and the absolute gray scale influence is eliminated.
  5. 5. The method for detecting turning effects of oxide layers on surfaces of bars according to claim 1, wherein the calculating of the mutual information characteristic value comprises: Discretizing gray values in a local window into L levels, discretizing normalized local space coordinates into P multiplied by Q grids; constructing a gray scale coordinate joint probability distribution matrix and an edge probability distribution vector; calculating mutual information characteristic values: , wherein, For the i-th gray level, For the spatial coordinates of the kth column and the q-th row, Is of gray scale And space coordinates The probability of the simultaneous occurrence of the two, Is of gray scale The probability of the occurrence of the presence of a defect, Is space coordinates Probability of occurrence.
  6. 6. The method for detecting the turning effect of the oxide layer on the surface of the bar according to claim 1, wherein the step of generating the two-dimensional mutual information characteristic distribution matrix is to sequentially combine m×n local analysis windows which are regularly arranged to obtain the two-dimensional mutual information characteristic distribution matrix based on the mutual information characteristic values of all the local analysis windows.
  7. 7. The method for detecting the turning effect of the oxide layer on the surface of the bar according to claim 1, wherein the one-dimensional projection adopts a weighted average strategy, wherein the weight is determined according to the window space distance of each abscissa window position through a Gaussian function, and Gaussian weighted fusion is carried out on the mutual information characteristic values of each column to generate a mutual information attenuation spectrum curve as an ordinate.
  8. 8. The method for detecting the turning effect of the oxide layer on the surface of the bar according to claim 1, wherein the calculation mode of extracting the energy ratio of the low-frequency component as the process consistency index is as follows: wherein To attenuate the complex value of the spectral curve fourier transform at frequency f, For a low cut-off frequency, And C is a process consistency index for the maximum frequency.
  9. 9. The method for detecting the turning effect of the oxide layer on the surface of the bar according to claim 1, wherein the calculation mode for extracting the energy ratio of the high-frequency component as the surface abnormality disturbance index is as follows: , wherein, Standard deviation and mean of the mutual information characteristic distribution matrix are respectively, Is the high frequency starting frequency.

Description

Method for detecting turning effect of oxide layer on surface of bar Technical Field The invention belongs to the technical field of image detection, and particularly relates to a method for detecting turning effect of an oxide layer on the surface of a bar. Background The turning of the oxide layer on the surface of the bar is a key procedure in the fields of metallurgy and mechanical processing, and the turning effect directly influences the subsequent processing precision and service life of the bar. Along with industrial automation upgrading, the demands of the market on the accuracy, objectivity and high efficiency of turning effect detection are increasingly urgent. At present, bar turning effect detection is mostly dependent on manual visual or simple image gray scale comparison methods. The manual detection is greatly influenced by subjective experience, misjudgment and missed judgment are easy to occur, and the detection efficiency is low. Disclosure of Invention The invention provides a method for detecting turning effect of an oxide layer on the surface of a bar material aiming at the technical problems in the background art. In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps: acquiring gray level images of the surface of the bar after turning under the uniform illumination condition, and dividing the gray level images into M multiplied by N local analysis windows which are regularly arranged, wherein M is the number of axial windows, and N is the number of circumferential windows; For each local analysis window, constructing a gray value set and a normalized local space coordinate set of pixels in the window, and calculating a mutual information characteristic value between the gray value set and the normalized local space coordinate set, wherein the mutual information characteristic value represents the statistical dependency intensity of gray distribution and space position in a local area; generating a two-dimensional mutual information characteristic distribution matrix based on the mutual information characteristic values of all the local analysis windows; Carrying out one-dimensional projection on the two-dimensional mutual information characteristic distribution matrix along the window arrangement direction to obtain a mutual information attenuation spectrum curve, wherein the abscissa of the mutual information attenuation spectrum curve is a window sequence index, and the ordinate is a mutual information characteristic value after one-dimensional projection; Calculating the frequency domain energy distribution of the mutual information attenuation spectrum curve, performing discrete Fourier transform on the attenuation spectrum curve, extracting the energy duty ratio of a low-frequency component as a process consistency index, and extracting the energy duty ratio of a high-frequency component as a surface abnormal disturbance index; And calculating turning effect quality scores through normalization weighted summation based on the process consistency index and the surface abnormal disturbance index, and averaging the quality scores of a plurality of collecting surfaces around the bar to obtain a final bar turning effect quality score. Preferably, the preprocessing of the gray image data is required after the gray image of the surface of the bar after turning under the uniform illumination condition is acquired, including: Preprocessing an input noisy image, generating a plurality of image feature images with different scales through a Gaussian differential pyramid, and simultaneously calculating pixel gradient variances of the feature images with different scales; Inputting the pixel gradient variance into a dual-branch perception network, dividing noise into high-frequency impulse noise and low-frequency Gaussian noise by a threshold adaptive classifier by a first branch, calculating by a pixel neighborhood correlation to obtain a noise intensity gradient coefficient by a second branch, and outputting a decoupled noise type label and a noise intensity distribution matrix; Based on the noise type labels and the noise intensity distribution matrix, distributing dynamic fusion weights for the generated scale feature graphs, and simultaneously mapping the noise intensity distribution matrix into weight bias of a convolution kernel through a convolution kernel dynamic adjustment mechanism to obtain an enhanced feature graph; And (5) carrying out pixel value normalization processing on the enhanced feature image, and outputting a final denoising image. Preferably, the implementation of the normalized local spatial coordinate set includes: the method comprises the steps of constructing a local rectangular coordinate system by taking the top left corner vertex of a local analysis window as a coordinate origin, taking the width direction of the window as an X axis and the height direction as a Y axis; For each pixel in the window, c