With the intelligent development of magnetic particle inspection, the quality of magnetic
indications formed at cracks is closely related to the accuracy of magnetic particle inspection
image analysis results. The concentration of magnetic suspension is a key process parameter
affecting the quality of magnetic indication formation. Hence, this study presents an online
detection method based on machine vision for measuring magnetic suspension concentration.
The method initially enhances the contrast of images of the pear-shaped measuring tube
containing magnetic suspension and then extracts scale lines through feature analysis and
morphological processing. A method for extracting the magnetic particle sedimentation area of
magnetic suspension based on a dual-threshold segmentation algorithm is proposed. The
contour filtering algorithm and pixel calibration method are used to obtain the magnetic particle
concentration of the non-estimation and estimation areas based on scale line extraction,
ultimately forming an online accurate detection method for magnetic suspension concentration
values. Experiments were conducted to validate the method against different concentrations,
turbidity levels, tilting angles of the pear-shaped measuring tube, and ambient brightness. The
results show that the error in magnetic suspension concentration detection based on this method
is within 5%. This has certain reference value for the stable control of magnetic suspension
concentration and for enhancing the reliability of intelligent decision-making results in
magnetic particle inspection.