Clean up (1)
This commit is contained in:
parent
f836c53711
commit
cf8b0a8b94
8 changed files with 312 additions and 302 deletions
|
|
@ -159,7 +159,6 @@ Image** import_images(char* image_file_string, char* label_file_string, int* _nu
|
|||
}
|
||||
|
||||
void img_print (Image* img) {
|
||||
|
||||
//print the image
|
||||
matrix_print(img->pixel_values);
|
||||
//print the number of the image
|
||||
|
|
@ -183,7 +182,7 @@ void img_free (Image* img) {
|
|||
free(img);
|
||||
}
|
||||
|
||||
void images_free (Image** images, int quantity){
|
||||
void images_free(Image** images, int quantity) {
|
||||
//frees every single image
|
||||
for(int i=0;i<quantity;i++){
|
||||
img_free(images[i]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
#pragma once
|
||||
#include "../matrix/matrix.h"
|
||||
|
||||
#include "../matrix/matrix.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -14,19 +11,11 @@ typedef struct {
|
|||
} Image_Container;
|
||||
|
||||
static const int MAGIC_NUMBER_LABEL = 2049;
|
||||
|
||||
static const int MAGIC_NUMBER_IMAGES = 2051;
|
||||
|
||||
/**
|
||||
* reads a specified number of images out of the training dataset
|
||||
* @param image_file_string Path to the file containing the image data
|
||||
* @param label_file_string Path to the file containing the image labels
|
||||
* @param ptr via this pointer, the images can be accessed
|
||||
* @param count maximum number of images to be loaded. If it is 0, all available images are loaded.
|
||||
* @return
|
||||
*/
|
||||
Image ** import_images(char* image_file_string, char* label_file_string, int* number_imported, int count);
|
||||
Image * load_pgm_image(char * image_file_string);
|
||||
void img_print (Image* image);
|
||||
void img_visualize(Image*image);
|
||||
void img_free (Image* image);
|
||||
void img_free (Image* image);
|
||||
void images_free (Image** images, int quantity);
|
||||
Reference in a new issue