Go to the documentation of this file.
38 #if 0 // test: Select the desired resolution
39 mrpt::vision::TCaptureCVOptions opts;
40 opts.frame_width = 320;
41 opts.frame_height = 240;
54 cout <<
"Press any key to stop capture to 'capture.rawlog'..." << endl;
64 if ((cnt++ % 20) == 0)
68 double t = tictac.
Tac();
70 printf(
"\n %f FPS\n", FPS);
76 mrpt::make_aligned_shared<CObservationImage>();
82 cerr <<
"Error retrieving images!" << endl;
90 if (
win.isOpen())
win.showImage(obs->image);
96 int main(
int argc,
char** argv)
102 if (!strstr(argv[1],
".avi"))
118 catch (std::exception& e)
120 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
125 printf(
"Another exception!!");
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
A high-performance stopwatch, with typical resolution of nanoseconds.
Contains classes for various device interfaces.
This namespace contains representation of robot actions and observations.
double Tac() noexcept
Stops the stopwatch.
void TestCapture_OpenCV()
mrpt::gui::CDisplayWindow3D::Ptr win
Saves data to a file and transparently compress the data using the given compression level.
std::shared_ptr< CObservationImage > Ptr
void Tic() noexcept
Starts the stopwatch.
This class creates a window as a graphical user interface (GUI) for displaying images to the user.
Classes for creating GUI windows for 2D and 3D visualization.
A class for grabing images from a "OpenCV"-compatible camera, or from an AVI video file.
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream,...
GLsizei const GLchar ** string
bool getObservation(mrpt::obs::CObservationImage &out_observation)
Grab an image from the opened camera.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |