Abstract
As the development of machine vision technology, artificial intelligence algorithms are gradually popularized for identifying images. However, traditional KNN algorithm actually costs too much time when classifying images, which is not qualified to actual application scenes. An improved algorithm is proposed in the paper. The test time has been greatly shortened and the efficiency of KNN algorithm is improved by increasing the screening of data sets. By setting STM32F103 as master control and OV7670 as camera, actual detection of volleyball, football, and basketball was carried out after test environment was set up. And the test time is shorter compared with that of general KNN algorithm. At the same time, the identification accuracy is high, which indicates that the method has good practicability.

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.