In the process of LED chip manufacturing,chip sorting is an important part of it.In the sorting session,the function of the vision processing system is to identify and locate the chip.The speed and accuracy of chip recognition and positioning has a huge impact on the performance of the sorting machine.In this paper,we focus on the visual processing module in the sorting machine,algorithms for the lighting environment adjustment and template matching of the chip are designed and implemented.The main points of the paper are:The main functions of the sorter,its workflow and its hardware and software system composition are introduced.The expected performance indicators for the sorting machine are presented.A comparative analysis of the hardware involved in the experimental platform was conducted to select the appropriate hardware according to the experimental requirements.The characteristics of high-quality chip images and the effect of light on chip image quality were analyzed.The lighting characteristics of ring and point light sources were introduced.In order to reduce the dependence on the operator,algorithms are designed to evaluate the quality of light and automatically adjust the light.To this end,the grayscale histogram of the chip is first analyzed and an automatic threshold segmentation method based on grayscale histogram analysis is proposed to segment the chip region and the background region of the image,respectively counting the sum of the lengths of the edges they contain.The difference between the chip area edge length and the background area edge length was used as the evaluation score for quality.The evaluation score of the chip image effectively reflects the current light environment,and then adjusts the light according to the evaluation value to achieve automatic adjustment of the light environment.The chip image noise type was analyzed.The image is mainly contaminated by Gaussian noise,and a side-window Gaussian filter is used to filter out the noise while still retaining the edge detail of the image.To reduce the dependence on the operator in the chip template making process,the chip template automatic picking function was developed.In the chip recognition and positioning,the smallest external rectangle combined with NCC type matching secondary positioning strategy is used to quickly and accurately position the chip.Based on C#.NET3.5,the chip recognition and positioning software is developed to meet the functions of image acquisition,display,scanning,chip recognition and positioning,data storage and automatic dimming.The experiments which verify the effectiveness of the light environment auto-tuning algorithm,template auto-selection algorithm and chip secondary positioning algorithm were designed. |