摘要
KNN算法用于手写数字识别的时候,需要将待识别的手写数字图像(测试集)与一些已知的手写数字图像(训练集)联合在一起求向量之间的最短距离,才能判断待识别数字图像的分类.设计了一种将测试集图像中的数据与尺寸转换为与训练集图像完全相似的转换算法,并在此基础上,将测试集和训练集都转换成有相同列数量的一维向量,进而求出向量之间的距离,并通过编写Python程序对该算法进行了验证.测试结果表明,该方法对手写数字图像的正确识别率能够达到95%以上.
When KNN algorithm is used for handwritten numeral recognition, it is necessary to combine the handwritten numeral images (test set) to be recognized with the known handwritten numeral images (training set) to find the shortest distance between vectors, so that we can identify the classification of digital images to be recognized. This paper designs a transformation method that transforms the data and size of the test set into a completely similar image to the training set. Based on that, the test set and training set are trnns- formed into one-dimensional vectors with the same number of columns, and then the distance between vec-tors is obtained. Finally, the algorithm is verified by writing Python program. Experimental results show that the correct recognition rate of handwritten digital images can reach over 95 % .
作者
赵卫东
刘永红
鄢涛
于曦
ZHAO Weidong;LIU Yonghong;YAN Tao;YU Xi(Key Laboratory of Pattern Recognition and Intelligent Information Processing of Sichuan Province, Chengdu University, Chengdu 610106, China;School of Information Science and Engineering, Chengdu University, Chengdu 610106, China)
出处
《成都大学学报(自然科学版)》
2017年第4期382-384,共3页
Journal of Chengdu University(Natural Science Edition)
基金
四川省科技厅软件科学研究计划(2017ZR0198)
四川省科技厅应用基础计划(2016JY0255)资助项目