changed line 56 in matrix.c
This commit is contained in:
parent
ed1191fffd
commit
93408c1f47
@ -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)));
|
||||
|
||||
|
||||
4
matrix.c
4
matrix.c
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user