To create a MNIST dataset from your own images in Matlab, you will need to follow several steps:
Here is an example code for converting a folder of images with labels into a dataset of MNIST format in Matlab:
main.m899 chars30 lines
In this example code, we read in a folder of .bmp image files, preprocess them by converting to grayscale and resizing to 28x28 (the same size as the MNIST dataset), then store them into an image matrix X and a label vector y. We then save them into a .mat file in the MNIST dataset format.
gistlibby LogSnag