Skip to content

Commit 886eae9

Browse files
committed
Fix for IMM database + GCC fix
Closes #4 Also re-adds support for IMM databases.
1 parent 4ba0ed1 commit 886eae9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/io/database_io.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ namespace dest {
302302
}
303303
}
304304
}
305+
306+
dst.row(0) *= imageSize.width;
307+
dst.row(1) *= imageSize.height;
308+
309+
305310
return dst.rows() > 0 && dst.cols() > 0;
306311

307312
}
@@ -364,10 +369,10 @@ namespace dest {
364369
DEST_LOG("Failed to read points." << std::endl);
365370
return false;
366371
}
367-
str = std::stringstream(line);
372+
std::stringstream linestr(line);
368373

369374
float x, y;
370-
str >> x >> y;
375+
linestr >> x >> y;
371376

372377
dst(0, i) = x - 1.f; // Matlab to C++ offset
373378
dst(1, i) = y - 1.f;
@@ -435,10 +440,10 @@ namespace dest {
435440
DEST_LOG("Failed to read points." << std::endl);
436441
return false;
437442
}
438-
str = std::stringstream(line);
443+
std::stringstream linestr(line);
439444

440445
float x, y;
441-
str >> x >> y;
446+
linestr >> x >> y;
442447

443448
dst(0, i) = x;
444449
dst(1, i) = imageSize.height - y - 1;

0 commit comments

Comments
 (0)