32 cerr <<
"The user didn't pick any camera. Exiting." << endl;
38 cout <<
"Press 's' to save frames.\nClose the window to exit.\n";
68 if (o->hasIntensityImage)
img = &o->intensityImage;
75 double t = tictac.
Tac();
76 cout <<
"Frame Rate: " <<
counter /
t <<
" fps" << endl;
92 cout <<
"Saving frame to: " << sFile << endl;
93 img->saveToFile(sFile);
101 std::this_thread::sleep_for(2ms);
104 cout <<
"Closing..." << endl;
118 catch (std::exception& e)
120 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
125 printf(
"Untyped exception!!");
double Tac() noexcept
Stops the stopwatch.
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...
int getch() noexcept
An OS-independent version of getch, which waits until a key is pushed.
A high-performance stopwatch, with typical resolution of nanoseconds.
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement, as from a time-of-flight range camera or any other RGBD sensor.
Contains classes for various device interfaces.
#define ASSERT_(f)
Defines an assertion mechanism.
This class creates a window as a graphical user interface (GUI) for displaying images to the user...
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
This namespace contains representation of robot actions and observations.
mrpt::gui::CDisplayWindow3D::Ptr win
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
#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...
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
Classes for creating GUI windows for 2D and 3D visualization.
void Tic() noexcept
Starts the stopwatch.
void TestCameraCaptureAsk()
A class for storing images as grayscale or RGB bitmaps.