25 printf(
"------------------------------\n");
28 for (
int o=0; o<col-1; o++) printf(
" ");
32 for (
int o=0; o<col-1; o++) printf(
" ");
33 printf(
"------------------------------");
51 for (
int o=0; o<col-2; o++) strcat(imgStr,
" ");
55 strcat(imgStr, img->
pixel[y*MNIST_IMG_HEIGHT+x] ?
"X" :
"." );
94 printf(
"2: TESTING: Reading image No. %5d of %5d images [%d%%]\n ",(imgCount+1),
MNIST_MAX_TESTING_IMAGES,(
int)progress);
107 double successRate = 1 - ((double)errCount/(
double)(imgCount+1));
111 printf(
"Result: Correct=%5d Incorrect=%5d Success-Rate=%5.2f%% \n",imgCount+1-errCount, errCount, successRate*100);
void displayProgress(int imgCount, int errCount, int y, int x)
Outputs image recognition progress and error count.
Utitlies for displaying processing details in the terminal.
void displayLoadingProgressTesting(int imgCount, int y, int x)
Outputs reading progress while processing MNIST testing images.
Utitlies for advanced input and output to terminal screen.
void displayLoadingProgressTraining(int imgCount, int y, int x)
Outputs reading progress while processing MNIST training images.
#define MNIST_MAX_TESTING_IMAGES
number of images+labels in the TEST file/s
void locateCursor(const int row, const int col)
Set cursor position to given coordinates in the terminal window.
#define MNIST_IMG_HEIGHT
image height in pixel
#define MNIST_IMG_WIDTH
image width in pixel
void displayImageFrame(int row, int col)
Outputs a 28x28 text frame at a defined screen position.
void displayImage(MNIST_Image *img, int row, int col)
Outputs a 28x28 MNIST image as charachters ("."s and "X"s)
Utitlies for handling the MNIST files.
Data block defining a MNIST image.
#define MNIST_MAX_TRAINING_IMAGES
number of images+labels in the TRAIN file/s