Image.c #11

Merged
jastornig merged 5 commits from Temp into Development 2023-09-19 13:16:04 +02:00
3 changed files with 5 additions and 6 deletions
Showing only changes of commit 52d97f3c54 - Show all commits

View file

@ -1,5 +1,3 @@
#pragma once
#include <stdio.h>
#include <stdlib.h>
@ -16,7 +14,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb
if(image_file == NULL || label_file == NULL) {
printf("ERROR: File could not be opened! (import_images)");
}
char ch;
do {
ch = fgetc(label_file);
printf("%c", ch);
@ -33,7 +31,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb
fclose(label_file);
}
void img_print (Img* img) {
void img_print (Image* img) {
//print the image
matrix_print(img->pixel_values);
@ -42,6 +40,6 @@ void img_print (Img* img) {
printf("%d", img->image_label);
}
void img_free (Img* img) {
void img_free (Image* img) {
}

View file

@ -1,4 +1,5 @@
#pragma once
#include "matrix.h"
typedef struct {
Matrix* pixel_values;

View file

@ -265,5 +265,5 @@ Matrix* matrix_flatten(Matrix* matrix, int axis) {
else if (axis == 1) result_matrix->numbers[0][i * matrix->columns + j] = matrix->numbers[i][j];
}
}
return mat;
return result_matrix;
}