26 #include <boost/thread/thread.hpp>
27 #include <boost/bind.hpp>
31 #include <types/MNISTTypes.hpp>
32 #include <types/TensorTypes.hpp>
34 #include <logger/Log.hpp>
35 #include <logger/ConsoleOutput.hpp>
36 using namespace mic::logger;
38 #include <importers/CIFARImporter.hpp>
39 #include <importers/BMPImporter.hpp>
43 using namespace mic::opengl::visualization;
56 mic::importers::BMPImporter<float> importer;
57 importer.setDataFilename(
"../../../data/rainbow.bmp");
60 if (!importer.importData())
63 importer.setBatchSize(4);
66 while (!APP_STATE->Quit()) {
69 if (!APP_STATE->isPaused()) {
72 if (APP_STATE->isSingleStepModeOn())
73 APP_STATE->pressPause();
76 APP_DATA_SYNCHRONIZATION_SCOPED_LOCK();
80 mic::types::TensorBatch<float> batch = importer.getRandomBatch();
83 w_batch->setBatchUnsynchronized(batch.data());
104 int main(
int argc,
char* argv[]) {
106 LOGGER->addOutput(
new ConsoleOutput());
107 LOG(LINFO) <<
"Logger initialized. Starting application";
121 LOG(LINFO) <<
"Waiting for threads to join...";
124 LOG(LINFO) <<
"Threads joined - ending application";
void test_thread_body(void)
Function for testing ImageEncoder/WindowImage2D classes.
WindowRGBTensor< float > * w_batch
Window displaying the image.
#define VGL_MANAGER
Macro returning OpenGL window manager instance.
int main(int argc, char *argv[])
Main program function. Runs two threads: main (for GLUT) and another one (for data processing)...
OpenGL-based window responsible for displaying RGB (three channel) batch in a window.
Declaration of WindowManager class along with a bunch of helpful types and macros.