9 #ifndef CDisplayWindow_H 10 #define CDisplayWindow_H 46 static CDisplayWindowPtr Create(
48 unsigned int initWidth = 400,
49 unsigned int initHeight = 400 );
59 virtual void setCursorCross(
bool cursorIsCross)
MRPT_OVERRIDE;
72 template <
class FEATURELIST>
77 img.colorImage( imgColor );
78 imgColor.drawFeatures(list,
color,showIDs);
87 template <
class FEATURELIST>
93 img.colorImage( imgColor );
103 showImageAndPoints( imgColor, list,
color );
112 template <
class MATCHEDLIST>
127 imgColor.drawCircle(
round( i->first->x ),
round( i->first->y ), 4,
color );
128 imgColor.drawCircle(
round( i->second->x +
w ),
round( i->second->y ), 4,
color );
134 imgColor.textOut(
round( i->first->x ) - 10,
round( i->first->y ), buf,
color );
136 imgColor.textOut(
round( i->second->x +
w ) + 10,
round( i->second->y ), buf,
color );
148 template <
class FEATURELIST>
156 ASSERT_( leftList.size() == rightList.size() );
157 imgColor.joinImagesHorz( img1, img2 );
197 m_enableCursorCoordinates = enable;
void showImageAndPoints(const mrpt::utils::CImage &img, const FEATURELIST &list, const mrpt::utils::TColor &color=mrpt::utils::TColor::red, const bool &showIDs=false)
Show a given color or grayscale image on the window and print a set of points on it.
bool m_enableCursorCoordinates
Enables or disables the visualization of cursor coordinates on the window caption.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
A class for storing images as grayscale or RGB bitmaps.
void showImagesAndMatchedPoints(const mrpt::utils::CImage &img1, const mrpt::utils::CImage &img2, const FEATURELIST &leftList, const FEATURELIST &rightList, const mrpt::utils::TColor &color=mrpt::utils::TColor::red)
Show a pair of given color or grayscale images (put together) on the window and print a set of matche...
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
void enableCursorCoordinatesVisualization(bool enable)
Enables or disables the visualization of cursor coordinates on the window caption (default = enabled)...
const Scalar * const_iterator
void showTiledImageAndPoints(const mrpt::utils::CImage &img, const FEATURELIST &list, const mrpt::utils::TColor &color=mrpt::utils::TColor::red)
Show a given color or grayscale image on the window and print a set of points on it and a set of line...
GLubyte GLubyte GLubyte GLubyte w
#define DEFINE_MRPT_OBJECT(class_name)
This declaration must be inserted in all CObject classes definition, within the class declaration...
This class creates a window as a graphical user interface (GUI) for displaying images to the user...
#define DEFINE_MRPT_OBJECT_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
void line(int x0, int y0, int x1, int y1, const mrpt::utils::TColor color, unsigned int width=1, TPenStyle penStyle=psSolid) MRPT_OVERRIDE
Draws a line.
GLsizei const GLchar ** string
#define DEFINE_MRPT_OBJECT_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
static TColor red
Predefined colors.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void showImagesAndMatchedPoints(const mrpt::utils::CImage &img1, const mrpt::utils::CImage &img2, const MATCHEDLIST &mList, const mrpt::utils::TColor &color=mrpt::utils::TColor::red, bool showNumbers=false)
Show a pair of given color or grayscale images (put together) on the window and print a set of matche...
int round(const T value)
Returns the closer integer (int) to x.
int BASE_IMPEXP sprintf(char *buf, size_t bufSize, const char *format,...) MRPT_NO_THROWS MRPT_printf_format_check(3
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compiler...
GLenum GLsizei GLsizei height
size_t getWidth() const MRPT_OVERRIDE
Returns the width of the image in pixels.
The base class for GUI window classes.
void joinImagesHorz(const CImage &im1, const CImage &im2)
Joins two images side-by-side horizontally.
size_t getHeight() const MRPT_OVERRIDE
Returns the height of the image in pixels.