| With the continuous development of the knitting industry,grooved needle is a key core component in the knitting process,and its accuracy has a crucial impact on the yield,quality and cost of knitwear.However,due to the diversity and fine characteristics of the groove needle,it is easy to produce deformation in the left and right and front and rear directions during the processing,making the detection and inspection a necessary step in the production link.At present,domestic needle-making enterprises are highly dependent on manual operation in groove-needle detection,which leads to problems of low efficiency,poor accuracy and large human factors.In order to meet the needs of high-quality grooving needle production,improving the detection method and improving the detection level have become the key issues to be solved urgently in the industry.In this paper,based on the original hardware of the research group,the software system will be optimized and adjusted,and the left-right deformation detection algorithm and the front-back deformation detection algorithm of the slot-needle are taken as the core to realize the grouping sorting of 104 grave-needle and 5175lace-needle.The specific research content of this paper is as follows:(1)Clarify the inspection requirements for the 104 groove-needle and5175 lace-needle,taking into account their appearance characteristics in the left-right and front-back directions.Analyze the specific parameters and application scenarios of the existing image acquisition module’s camera and optical lens,lighting module,and light source controller in terms of hardware.Determine the corresponding inspection scheme.(2)Preprocessing and detection algorithm design for t he left and right direction images of the groove needle.Using optical projection,place the groove needle on a glass disc and convert the straightness detection problem into gap measurement.To address the issue of impurities between the groove needle and the reflection,morphological processing is used to remove impurities,and image processing methods such as logarithmic transformation,gamma transformation,USM,and Scharr sharpening masks are used to highlight gaps.The image segmentation and positioni ng of the slot needle in the left and right directions are achieved through global threshold segmentation,minimum area filtering,and minimum rectangle methods.The deformation detection in the left and right directions is achieved using segmented measurement methods.A dynamic ROI correction method is proposed to address the change in ROI caused by the change in needle posture.(3)Preprocess and design detection algorithms for the front and rear direction images of the groove needle.By comparing the processing effects of different filtering algorithms,the median filtering algorithm is selected to reduce the damage of noise to the image while preserving the edge information of the image.Propose a direction angle difference method based on Hu moments to achieve deformation detection before and after grooved needles,and compare it with a shape based template matching method : shape based template matching forms boundaries through expansion and corrosion of templates,moves them to the same pose as the gro ove needle to be measured through coordinate transformation,and then compares the consistency of the wheel profile;The direction angle difference method based on Hu moments first extracts edges through the Canny operator.After completing coordinate system transformation,the main direction vector of the groove needle is calculated using the first and second moments of Hu moments,and then the angle difference between the direction vectors is calculated to achieve classification.(4)Observe the left and right deformation characteristics of the 104groove-needle and 5175 lace-needle for deformation detection experiments in the left and right directions,and complete the classification of left and right deformation.A template was selected for grouping and sorting experiments based on the installation tolerance and deformation characteristics of 104groove-needle and 5175 lace-needle.The results showed that the direction angle difference method based on the Hu moment has a good classification effect for groove-needles with deformation in the front and back directions.And propose sorting strategies to achieve sorting of different deformation types of groove-needles,improving the utilization rate of groove-needles. |