CN-122016849-A - Stamping liquid foreign matter detection method based on image processing
Abstract
The invention relates to the technical field of image processing and industrial detection, in particular to a stamping liquid foreign matter detection method based on image processing. The method comprises the steps of setting a curved flow channel unit in a detection section to construct an inertial differential flow field, collecting a gray level image sequence of stamping liquid under the inertial differential flow field, preprocessing, extracting an independent motion area as a candidate target, calculating an actual speed vector of a reference speed vector field and the candidate target, calculating dynamic slip probability according to deviation of the actual speed vector and a corresponding position in the reference speed vector field, calculating visual form probability according to contour curvature entropy, brightness variation coefficient and shape factor of the candidate target, and carrying out fusion calculation on the dynamic slip probability and the visual form probability to obtain final foreign matter confidence. The invention combines the density-based fluid sorting principle with the machine vision feature extraction, effectively identifies metal foreign matters, reduces bubble interference and improves detection precision.
Inventors
- ZHUANG XIAOHUA
- LI YI
- TANG YUEHUI
- YE CHANGYI
Assignees
- 广州杜朗介质科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (10)
- 1. The stamping liquid foreign matter detection method based on image processing is characterized by comprising the following steps: Arranging a curved flow channel unit at a detection section to construct an inertial differentiation flow field, arranging a coaxial light source at one side of the curved flow channel unit, arranging an image acquisition device at the other side of the curved flow channel unit, acquiring a gray image sequence of the stamping liquid under the inertial differentiation flow field, and preprocessing to obtain an independent movement region as a candidate target; Calculating an actual speed vector of the candidate target, acquiring a reference speed vector field corresponding to the inertia differentiation flow field, and calculating the dynamic slip probability of the candidate target based on the deviation of the actual speed vector and the speed vector of the candidate target in the reference speed vector field; extracting contour curvature entropy, brightness variation coefficient and shape factor of the candidate target, and calculating visual morphology probability of the candidate target based on the contour curvature entropy, the brightness variation coefficient and the shape factor; And calculating the final foreign matter confidence coefficient of the candidate target based on the dynamic slippage probability and the visual morphology probability, comparing the final foreign matter confidence coefficient with a preset judgment threshold value, and outputting a foreign matter detection result.
- 2. The image processing-based stamping liquid foreign matter detection method according to claim 1, wherein the kinetic slip probability satisfies a relation: Wherein, the For the kinetic slip probability; is the actual velocity vector; a velocity vector for a corresponding position of the candidate object in the reference velocity vector field; is the euclidean norm; is a preset normalization parameter; as a hyperbolic tangent function.
- 3. The image processing-based method for detecting a foreign object in a press liquid according to claim 1, wherein the visual morphology probability satisfies a relation: Wherein, the Probability for the visual morphology; Entropy of curvature for the profile; Is the brightness variation coefficient; Is the shape factor; Is a natural logarithmic function; as a hyperbolic tangent function.
- 4. The image processing-based stamping liquid foreign matter detection method according to claim 1, wherein the final foreign matter confidence satisfies a relation: Wherein, the Confidence for the final foreign object; For the said probability of dynamic slip, Is the visual morphology probability.
- 5. The method for detecting foreign matters in a stamping liquid based on image processing according to claim 2, wherein the normalization parameters are comprehensively calibrated by a statistical optimization experiment based on a real sample.
- 6. The method for detecting foreign matters in a stamping liquid based on image processing according to claim 1, wherein the curved flow channel unit is specifically an S-shaped double-curvature transparent pipeline with a nonlinear flow channel structure.
- 7. The image processing-based stamping liquid foreign matter detection method according to claim 1, wherein the reference velocity vector field is obtained by performing hydrodynamic simulation on a geometric model of the curved flow path unit.
- 8. The method for detecting foreign matters in a press liquid based on image processing according to claim 1, wherein the shape factor is calculated based on the circumference and the area of the candidate object.
- 9. The image processing-based punch liquid foreign matter detection method according to claim 1, wherein the foreign matter detection result includes: If the final foreign matter confidence coefficient is larger than the judging threshold value, judging that the candidate target is a metal foreign matter and generating an alarm signal; and if the final foreign object confidence is smaller than or equal to the judging threshold, judging that the candidate target is a nonmetallic foreign object.
- 10. The method for detecting the foreign matters in the stamping liquid based on the image processing according to claim 1, wherein the preprocessing comprises the steps of establishing a static background model of the curved flow channel unit, obtaining a foreground motion mask based on the difference between the gray level image sequence and the static background model, and carrying out connected domain analysis on the foreground motion mask to obtain the candidate target.
Description
Stamping liquid foreign matter detection method based on image processing Technical Field The invention relates to the technical field of image processing and industrial detection, in particular to a stamping liquid foreign matter detection method based on image processing. Background In the stamping process in the high-end manufacturing fields of automobile manufacturing, aerospace and the like, the cleanliness of a stamping liquid circulation loop is directly related to the service life of a die and the surface quality of a workpiece, metal scraps mixed in the stamping liquid are main reasons for causing die strain and product rejection, and therefore, the online and accurate metal foreign matter detection is realized and has important industrial value. At present, the existing online visual detection technology mainly faces three major core problems that firstly, bubbles interfere, a large number of bubbles exist in stamping liquid, specular reflection points of the bubbles show gray values extremely similar to metallic luster on images, so that the false alarm rate of a traditional brightness-based detection algorithm is extremely high, secondly, the problem of motion quietness is solved, researches show that about 30% of metal fragments keep a translation non-rolling posture in fluid, namely, the foreign matters have no flickering characteristics and obvious shape changes, the phenomenon of false alarm is extremely easy to occur, secondly, metal omission detection is realized, part of the long-term circulated metal foreign matters are hardly provided with reflection characteristics due to serious oxidation of surfaces, namely, the flickering degree is close to 0, the dark foreign matters are extremely easy to judge as a background in the traditional detection algorithm which needs to meet the characteristics of shape, flickering and rolling at the same time, thirdly, parameter debugging is difficult, the traditional algorithm generally relies on a weighting summation mode to synthesize a plurality of characteristics, and a field engineer is required to repeatedly debug according to experience, and environmental universality is lacking. In summary, the prior art lacks a foreign matter detection scheme capable of simultaneously solving the problems of bubble interference, metal omission and difficult parameter adjustment. Disclosure of Invention In order to solve the problems that bubbles and metals cannot be effectively distinguished, the translation state and dark metal omission ratio is high, and manual experience parameter debugging is relied on in the prior art, the invention provides a stamping liquid foreign matter detection method based on image processing, which comprises the following steps: setting a curved flow channel unit at a detection section to construct an inertia differential flow field, setting a coaxial light source at one side of the curved flow channel unit, setting an image acquisition device at the other side of the curved flow channel unit, acquiring a gray image sequence of stamping liquid under the inertia differential flow field, preprocessing the gray image sequence to obtain an independent motion area as a candidate target, calculating an actual speed vector of the candidate target, acquiring a reference speed vector field corresponding to the inertia differential flow field, calculating a dynamic slip probability of the candidate target based on the deviation of the actual speed vector and a speed vector at the position of the candidate target in the reference speed vector field, extracting contour curvature entropy, brightness variation coefficient and shape factor of the candidate target, calculating a visual form probability of the candidate target based on the contour curvature entropy, brightness variation coefficient and shape factor, calculating a final foreign matter confidence of the candidate target based on the dynamic slip probability and the visual form probability, comparing the final foreign matter confidence with a preset judging threshold, and outputting a foreign matter detection result. The invention establishes a foreign matter detection mechanism based on a physical separation and visual identification method by constructing an inertial differentiation flow field in a detection section and combining an image processing algorithm, and is characterized in that dynamic slip probability is introduced based on a fluid dynamic principle, so that foreign matters with mass generate speed deviation relative to a background flow field, further, foreign matters which are extremely easy to miss in the traditional pure visual detection, such as metals with surface oxidation, non-reflection and mass are identified, meanwhile, multi-dimensional feature extraction is carried out on outline curvature entropy, brightness and shape factor of a target by combining visual morphology probability, and highlight bubbles and metal foreign matters are distinguished. Further, th