changed line 56 in matrix.c

This commit is contained in:
Jonas Hofmann 2025-11-24 22:06:45 +01:00
parent ed1191fffd
commit 93408c1f47
3 changed files with 3 additions and 3 deletions

View File

@ -36,6 +36,7 @@ GrayScaleImageSeries *readImages(const char *path)
expectedHeader = checkHeaderString(headerString);
printf("llu %llu\n", series->count * numberOfBytesToRead * sizeof(GrayScalePixelType));
series->images->buffer = calloc((series->count) * numberOfBytesToRead, sizeof(GrayScalePixelType));
series->labels = calloc((series->count), sizeof(&(series->labels)));

View File

@ -52,8 +52,8 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned
//printf("Ungueltige Indizes beim Setzen!\n");
return;
}
matrix.buffer[rowIdx * matrix.cols + colIdx] = value;
// printf("%d \n", rowIdx + matrix.cols * colIdx);
matrix.buffer[rowIdx + matrix.cols * colIdx] = value;
}
MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx)

View File

@ -180,7 +180,6 @@ static Matrix imageBatchToMatrixOfImageVectors(const GrayScaleImage images[], un
{
for(int i = 0; i < count; i++)
{
printf("i %d\n", i);
for(int j = 0; j < images[i].width * images[i].height; j++)
{
setMatrixAt((MatrixType)images[i].buffer[j], matrix, j, i);