Do not save output images.

This commit is contained in:
Fabien Freling 2014-07-10 22:01:30 +02:00
parent 7c6cfd9046
commit 8175b8a06c

View file

@ -1027,12 +1027,14 @@ int main(int argc, char* argv[])
}
}
double const step = 15;
// No tile
Image img(argv[1]);
float average = 0.0;
int i = 0;
for (double rotation = 0; rotation < 360; rotation += 45)
cout << "Simple image" << endl;
for (double rotation = 0; rotation < 360; rotation += step)
{
auto const before = chrono::high_resolution_clock::now();
Image* const rotated = rotate(img, rotation);
@ -1040,9 +1042,9 @@ int main(int argc, char* argv[])
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
average += duration_ms.count();
cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl;
//cout << "rotate(" << rotation << "): " << duration_ms.count() << " ms" << endl;
rotated->save(get_save_path("rotated", rotation));
//rotated->save(get_save_path("rotated", rotation));
delete rotated;
++i;
}
@ -1053,7 +1055,8 @@ int main(int argc, char* argv[])
TiledImage<16, 16> tiled_img(argv[1]);
average = 0.0;
i = 0;
for (double rotation = 0; rotation < 360; rotation += 45)
cout << "Tiled image" << endl;
for (double rotation = 0; rotation < 360; rotation += step)
{
auto const before = chrono::high_resolution_clock::now();
auto const rotated = rotate(tiled_img, rotation);
@ -1061,9 +1064,9 @@ int main(int argc, char* argv[])
auto const duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
average += duration_ms.count();
cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl;
//cout << "rotate tiled(" << rotation << "): " << duration_ms.count() << " ms" << endl;
rotated->save(get_save_path("rotated_tiled", rotation));
//rotated->save(get_save_path("rotated_tiled", rotation));
delete rotated;
++i;
}