forked from freudenreichan/info2Praktikum-NeuronalesNetz
imageInput korrigiert durch neue Tests
This commit is contained in:
1 parent
060b22f50e
commit
d999786d02
1 file changed
+2
-2
@@ -77,7 +77,7 @@ GrayScaleImageSeries *pictureSeriesmemory(unsigned short numImagesShort) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
series->count *= (unsigned int)numImagesShort;
|
||||
series->count = (unsigned int)numImagesShort;
|
||||
series->images = (GrayScaleImage*)malloc(series->count * sizeof(GrayScaleImage));
|
||||
series->labels = (unsigned char*)malloc(series->count * sizeof(unsigned char));
|
||||
|
||||
@@ -96,7 +96,7 @@ GrayScaleImageSeries *pictureSeriesmemory(unsigned short numImagesShort) {
|
||||
int PicturesLabelsimport(GrayScaleImageSeries *series, FILE *file, unsigned short widthShort, unsigned short heightShort){
|
||||
|
||||
unsigned int pixelsPerImage = (unsigned int)widthShort * heightShort;
|
||||
for (unsigned int i = 0 < series->count; i++;) {
|
||||
for (unsigned int i = 0; i < series->count; i++;) {
|
||||
series->images[i].width = (unsigned int)widthShort;
|
||||
series->images[i].height=(unsigned int)heightShort;
|
||||
series->images[i].buffer = (GrayScalePixelType *)malloc(pixelsPerImage * sizeof(GrayScalePixelType));
|
||||
|
||||
Reference in new issue
Block a user