MNIST手写数字数据库保存为*.bmp图像之MATLAB源程序
手写数字库很容易建立,但是总会很浪费时间。Google实验室的Corinna Cortes和纽约大学柯朗研究所的Yann LeCun建有一个手写数字数据库,训练库有60,000张手写数字图像,测试库有10,000张。源图像数据可访问原站 http://yann.lecun.com/exdb/mnist/进行下载,或到 http://download.csdn.net/detail/destiny0321/9167873进行下载,该数据库的一个文件中包含了所有的图像,使用起来很不方便。笔者在MATLAB平台上将该数据包保存为一张一张的带有标识的.bmp图片文件,以供今后研究使用。
- 首先讲解一下train-images.idx3-ubyte这个数据库个存储格式:
训练集图像格式(train-images.idx3-ubyte)
offset——–type————–value———- description
0000 —32 bit integer——0x00000803—–magic number
0004—32 bit integer——–60000——number of images
0008—32 bit integer———-28———–number of rows
0012—32 bit integer———-28——–number of columns
0016—unsigned byte ——–??——————pixel