29 cout <<
"Please, select the input video file or camera...\n";
35 cout <<
"Video stream open OK\n";
39 "Demo of video textures with MRPT's OpenGL objects", 640, 480);
43 mrpt::make_aligned_shared<opengl::CGridPlaneXY>(-7, 7, -7, 7, 0, 1);
44 gl_ground->setColor(0.7, 0.7, 0.7);
48 mrpt::make_aligned_shared<opengl::CTexturedPlane>(
51 mrpt::make_aligned_shared<opengl::CTexturedPlane>(0, 1, 0, 0.75);
53 mrpt::make_aligned_shared<opengl::CTexturedPlane>(0, 1, 0, 0.75);
67 theScene->insert(gl_ground);
68 theScene->insert(gl_plane1);
69 theScene->insert(gl_plane2);
70 theScene->insert(gl_plane3);
72 win.unlockAccess3DScene();
76 cout <<
"Close the window to end.\n";
79 win.addTextMessage(5, 5,
format(
"%.02fFPS",
win.getRenderingFPS()));
80 std::this_thread::sleep_for(1ms);
90 win.get3DSceneAndLock();
91 gl_plane1->assignImage(o->image);
92 gl_plane2->assignImage(o->image);
93 gl_plane3->assignImage(o->image);
94 win.unlockAccess3DScene();
112 catch (std::exception& e)
114 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
119 printf(
"Untyped exception!!");
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
CCameraSensor::Ptr prepareVideoSourceFromUserSelection()
Show to the user a list of possible camera drivers and creates and open the selected camera...
This base provides a set of functions for maths stuff.
This namespace contains representation of robot actions and observations.
mrpt::gui::CDisplayWindow3D::Ptr win
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::rtti::CObject) is of the give...
The namespace for 3D scene representation and rendering.
GLenum GLsizei GLenum format
Classes for creating GUI windows for 2D and 3D visualization.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.