29 cout <<
"Please, select the input video file or camera...\n";
35 cout <<
"Video stream open OK\n";
46 gl_view_main = theScene->getViewport(
"main");
49 win.unlockAccess3DScene();
58 mrpt::make_aligned_shared<mrpt::opengl::CGridPlaneXY>());
61 gl_view_aux = theScene->createViewport(
"aux");
63 gl_view_aux->setViewportPosition(10, 10, 300, 200);
64 gl_view_aux->setTransparent(
true);
67 win2.unlockAccess3DScene();
71 win2.setPos(400, 100);
73 cout <<
"Close any window to end.\n";
74 while (
win.isOpen() && win2.isOpen())
76 win.addTextMessage(5, 5,
format(
"%.02fFPS",
win.getRenderingFPS()));
77 win2.addTextMessage(5, 5,
format(
"%.02fFPS", win2.getRenderingFPS()));
78 std::this_thread::sleep_for(1ms);
87 std::dynamic_pointer_cast<CObservationImage>(obs);
88 win.get3DSceneAndLock();
89 gl_view_main->setImageView(o->image);
90 win.unlockAccess3DScene();
93 win2.get3DSceneAndLock();
94 gl_view_aux->setImageView_fast(o->image);
95 win2.unlockAccess3DScene();
113 catch (std::exception& e)
115 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
120 printf(
"Untyped exception!!");