Abstract:The quality defects of Ice cream stick divide into two categories:geometric dimension deviation and chromatic aberration, the means of quality inspection at present is manual eyeballing. which is difficult to ensure the quality classification. A set of online visual inspection system sample machine is developed to solve this problem. The system includes ice cream stick transmission system, light sources, lens, cameras, the computer and Separation system, four cameras respectively achieve positive imaging, opposite imaging and both sides imaging. Counting method is used to solve the fusion of multi-point testing results and data memory from the testing results to the separation points. Adopting multithreading technology to solve the problems of the synchronization work of multiple cameras, improve the running speed and so on. Field tests show that this system can provide ice cream stick image which meets the requirements of the quality testing, and accurately control the sorting system to grade ice cream stick according to the quality inspection results. The ice cream stick detection rate can reach 15 per second.