forked from freudenreichan/info2Praktikum-NeuronalesNetz
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
161bc0c7bf | ||
|
|
34eceac3d3 |
No files matched your search
+29
-1
@@ -7,12 +7,40 @@
|
||||
#define FILE_HEADER_STRING "__info2_image_file_format__"
|
||||
|
||||
// TODO Implementieren Sie geeignete Hilfsfunktionen für das Lesen der Bildserie aus einer Datei
|
||||
int readHeader(File *file)
|
||||
{
|
||||
char fileHeader[32];
|
||||
|
||||
fread(fileHeader, sizeof(char), strlen(FILE_HEADER_STRING), file);
|
||||
|
||||
if(strncmp(FILE_HEADER_STRING, fileHeader, strlen(FILE_HEADER_STRING))){
|
||||
return -1;
|
||||
} else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int readIntOfFile(FILE *file){
|
||||
int number = 0;
|
||||
|
||||
fread(number, sizeof(int), 1, file);
|
||||
return number;
|
||||
}
|
||||
|
||||
int readOneImage(GrayScaleImageSeries *series, File *file){
|
||||
unsigned int height, width;
|
||||
unsigned char label;
|
||||
|
||||
fread()
|
||||
|
||||
}
|
||||
|
||||
// TODO Vervollständigen Sie die Funktion readImages unter Benutzung Ihrer Hilfsfunktionen
|
||||
GrayScaleImageSeries *readImages(const char *path)
|
||||
{
|
||||
GrayScaleImageSeries *series = NULL;
|
||||
|
||||
int col, row;
|
||||
|
||||
return series;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,6 @@ typedef float MatrixType;
|
||||
|
||||
// TODO Matrixtyp definieren
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int anzahlZeilen;
|
||||
int anzahlSpalten;
|
||||
int speicher[][];
|
||||
|
||||
} Matrix;
|
||||
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
||||
void clearMatrix(Matrix *matrix);
|
||||
|
||||
Reference in new issue
Block a user