Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpDisplayGTK Class Reference

#include <visp3/gui/vpDisplayGTK.h>

+ Inheritance diagram for vpDisplayGTK:

Public Types

enum  vpScaleType {
  SCALE_AUTO, SCALE_1, SCALE_2, SCALE_3,
  SCALE_4, SCALE_5, SCALE_6, SCALE_7,
  SCALE_8, SCALE_9, SCALE_10, SCALE_DEFAULT
}
 

Public Member Functions

 vpDisplayGTK ()
 
 vpDisplayGTK (int winx, int winy, const std::string &title="")
 
 vpDisplayGTK (vpImage< unsigned char > &I, vpScaleType type)
 
 vpDisplayGTK (vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="", vpScaleType type=SCALE_DEFAULT)
 
 vpDisplayGTK (vpImage< vpRGBa > &I, vpScaleType type)
 
 vpDisplayGTK (vpImage< vpRGBa > &I, int winx=-1, int winy=-1, const std::string &title="", vpScaleType type=SCALE_DEFAULT)
 
virtual ~vpDisplayGTK ()
 
void getImage (vpImage< vpRGBa > &I)
 
unsigned int getScreenDepth ()
 
unsigned int getScreenHeight ()
 
void getScreenSize (unsigned int &width, unsigned int &height)
 
unsigned int getScreenWidth ()
 
void init (vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
 
void init (vpImage< vpRGBa > &I, int winx=-1, int winy=-1, const std::string &title="")
 
void init (unsigned int width, unsigned int height, int winx=-1, int winy=-1, const std::string &title="")
 
Inherited functionalities from vpDisplay
unsigned int computeAutoScale (unsigned int width, unsigned int height)
 
unsigned int getDownScalingFactor ()
 
unsigned int getHeight () const
 
unsigned int getWidth () const
 
int getWindowXPosition () const
 
int getWindowYPosition () const
 
bool isInitialised ()
 
virtual void setDownScalingFactor (unsigned int scale)
 
void setDownScalingFactor (vpScaleType scaleType)
 

Static Public Member Functions

Static public vpDisplay functionalities on gray level images.
static unsigned int getDownScalingFactor (const vpImage< unsigned char > &I)
 
static void close (vpImage< unsigned char > &I)
 
static void display (const vpImage< unsigned char > &I)
 
static void displayArrow (const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
 
static void displayArrow (const vpImage< unsigned char > &I, int i1, int j1, int i2, int j2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
 
static void displayCamera (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness)
 
static void displayCharString (const vpImage< unsigned char > &I, const vpImagePoint &ip, const char *string, const vpColor &color)
 
static void displayCharString (const vpImage< unsigned char > &I, int i, int j, const char *string, const vpColor &color)
 
static void displayCircle (const vpImage< unsigned char > &I, const vpImagePoint &center, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayCircle (const vpImage< unsigned char > &I, int i, int j, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayCross (const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
 
static void displayCross (const vpImage< unsigned char > &I, int i, int j, unsigned int size, const vpColor &color, unsigned int thickness=1)
 
static void displayDotLine (const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
static void displayDotLine (const vpImage< unsigned char > &I, int i1, int j1, int i2, int j2, const vpColor &color, unsigned int thickness=1)
 
static void displayEllipse (const vpImage< unsigned char > &I, const vpImagePoint &center, const double &coef1, const double &coef2, const double &coef3, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
 
static void displayEllipse (const vpImage< unsigned char > &I, const vpImagePoint &center, const double &coef1, const double &coef2, const double &coef3, const double &theta1, const double &theta2, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
 
static void displayFrame (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, vpImagePoint offset=vpImagePoint(0, 0))
 
static void displayLine (const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
static void displayLine (const vpImage< unsigned char > &I, int i1, int j1, int i2, int j2, const vpColor &color, unsigned int thickness=1)
 
static void displayPoint (const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
 
static void displayPoint (const vpImage< unsigned char > &I, int i, int j, const vpColor &color, unsigned int thickness=1)
 
static void displayPolygon (const vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, const vpColor &color, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, const vpImagePoint &topLeft, const vpImagePoint &bottomRight, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, const vpRect &rectangle, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, const vpImagePoint &center, float angle, unsigned int width, unsigned int height, const vpColor &color, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, int i, int j, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< unsigned char > &I, unsigned int i, unsigned int j, float angle, unsigned int width, unsigned int height, const vpColor &color, unsigned int thickness=1)
 
static void displayROI (const vpImage< unsigned char > &I, const vpRect &roi)
 
static void displayText (const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
 
static void displayText (const vpImage< unsigned char > &I, int i, int j, const std::string &s, const vpColor &color)
 
static void flush (const vpImage< unsigned char > &I)
 
static void flushROI (const vpImage< unsigned char > &I, const vpRect &roi)
 
static bool getClick (const vpImage< unsigned char > &I, bool blocking=true)
 
static bool getClick (const vpImage< unsigned char > &I, vpImagePoint &ip, bool blocking=true)
 
static bool getClick (const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClick (const vpImage< unsigned char > &I, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClickUp (const vpImage< unsigned char > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClickUp (const vpImage< unsigned char > &I, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static void getImage (const vpImage< unsigned char > &Is, vpImage< vpRGBa > &Id)
 
static bool getKeyboardEvent (const vpImage< unsigned char > &I, bool blocking=true)
 
static bool getKeyboardEvent (const vpImage< unsigned char > &I, std::string &key, bool blocking=true)
 
static bool getKeyboardEvent (const vpImage< unsigned char > &I, char *key, bool blocking=true)
 
static bool getPointerMotionEvent (const vpImage< unsigned char > &I, vpImagePoint &ip)
 
static bool getPointerPosition (const vpImage< unsigned char > &I, vpImagePoint &ip)
 
static void setBackground (const vpImage< unsigned char > &I, const vpColor &color)
 
static void setFont (const vpImage< unsigned char > &I, const std::string &font)
 
static void setTitle (const vpImage< unsigned char > &I, const std::string &windowtitle)
 
static void setWindowPosition (const vpImage< unsigned char > &I, int winx, int winy)
 
Static public vpDisplay functionalities on 32 bits color images.
static unsigned int getDownScalingFactor (const vpImage< vpRGBa > &I)
 
static void close (vpImage< vpRGBa > &I)
 
static void display (const vpImage< vpRGBa > &I)
 
static void displayArrow (const vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
 
static void displayArrow (const vpImage< vpRGBa > &I, int i1, int j1, int i2, int j2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
 
static void displayCamera (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness)
 
static void displayCharString (const vpImage< vpRGBa > &I, const vpImagePoint &ip, const char *string, const vpColor &color)
 
static void displayCharString (const vpImage< vpRGBa > &I, int i, int j, const char *string, const vpColor &color)
 
static void displayCircle (const vpImage< vpRGBa > &I, const vpImagePoint &center, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayCircle (const vpImage< vpRGBa > &I, int i, int j, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayCross (const vpImage< vpRGBa > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
 
static void displayCross (const vpImage< vpRGBa > &I, int i, int j, unsigned int size, const vpColor &color, unsigned int thickness=1)
 
static void displayDotLine (const vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
static void displayDotLine (const vpImage< vpRGBa > &I, int i1, int j1, int i2, int j2, const vpColor &color, unsigned int thickness=1)
 
static void displayEllipse (const vpImage< vpRGBa > &I, const vpImagePoint &center, const double &coef1, const double &coef2, const double &coef3, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
 
static void displayEllipse (const vpImage< vpRGBa > &I, const vpImagePoint &center, const double &coef1, const double &coef2, const double &coef3, const double &theta1, const double &theta2, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
 
static void displayFrame (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, vpImagePoint offset=vpImagePoint(0, 0))
 
static void displayLine (const vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
static void displayLine (const vpImage< vpRGBa > &I, int i1, int j1, int i2, int j2, const vpColor &color, unsigned int thickness=1)
 
static void displayPoint (const vpImage< vpRGBa > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
 
static void displayPoint (const vpImage< vpRGBa > &I, int i, int j, const vpColor &color, unsigned int thickness=1)
 
static void displayPolygon (const vpImage< vpRGBa > &I, const std::vector< vpImagePoint > &vip, const vpColor &color, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, const vpImagePoint &topLeft, const vpImagePoint &bottomRight, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, const vpRect &rectangle, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, const vpImagePoint &center, float angle, unsigned int width, unsigned int height, const vpColor &color, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, int i, int j, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
static void displayRectangle (const vpImage< vpRGBa > &I, unsigned int i, unsigned int j, float angle, unsigned int width, unsigned int height, const vpColor &color, unsigned int thickness=1)
 
static void displayROI (const vpImage< vpRGBa > &I, const vpRect &roi)
 
static void displayText (const vpImage< vpRGBa > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
 
static void displayText (const vpImage< vpRGBa > &I, int i, int j, const std::string &s, const vpColor &color)
 
static void flush (const vpImage< vpRGBa > &I)
 
static void flushROI (const vpImage< vpRGBa > &I, const vpRect &roi)
 
static bool getClick (const vpImage< vpRGBa > &I, bool blocking=true)
 
static bool getClick (const vpImage< vpRGBa > &I, vpImagePoint &ip, bool blocking=true)
 
static bool getClick (const vpImage< vpRGBa > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClick (const vpImage< vpRGBa > &I, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClickUp (const vpImage< vpRGBa > &I, vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static bool getClickUp (const vpImage< vpRGBa > &I, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
static void getImage (const vpImage< vpRGBa > &Is, vpImage< vpRGBa > &Id)
 
static bool getKeyboardEvent (const vpImage< vpRGBa > &I, bool blocking=true)
 
static bool getKeyboardEvent (const vpImage< vpRGBa > &I, std::string &key, bool blocking=true)
 
static bool getKeyboardEvent (const vpImage< vpRGBa > &I, char *key, bool blocking=true)
 
static bool getPointerMotionEvent (const vpImage< vpRGBa > &I, vpImagePoint &ip)
 
static bool getPointerPosition (const vpImage< vpRGBa > &I, vpImagePoint &ip)
 
static void setBackground (const vpImage< vpRGBa > &I, const vpColor &color)
 
static void setFont (const vpImage< vpRGBa > &I, const std::string &font)
 
static void setTitle (const vpImage< vpRGBa > &I, const std::string &windowtitle)
 
static void setWindowPosition (const vpImage< vpRGBa > &I, int winx, int winy)
 

Protected Member Functions

void setFont (const std::string &fontname)
 
void setTitle (const std::string &title)
 
void setWindowPosition (int winx, int winy)
 
void clearDisplay (const vpColor &color=vpColor::white)
 
void closeDisplay ()
 
void displayArrow (const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color=vpColor::white, unsigned int w=4, unsigned int h=2, unsigned int thickness=1)
 
void displayCharString (const vpImagePoint &ip, const char *text, const vpColor &color=vpColor::green)
 
void displayCircle (const vpImagePoint &center, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
void displayCross (const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
 
void displayDotLine (const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
void displayImage (const vpImage< vpRGBa > &I)
 
void displayImage (const vpImage< unsigned char > &I)
 
void displayImage (const unsigned char *I)
 
void displayImageROI (const vpImage< unsigned char > &I, const vpImagePoint &iP, const unsigned int width, const unsigned int height)
 
void displayImageROI (const vpImage< vpRGBa > &I, const vpImagePoint &iP, const unsigned int width, const unsigned int height)
 
void displayLine (const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
 
void displayPoint (const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
 
void displayRectangle (const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
void displayRectangle (const vpImagePoint &topLeft, const vpImagePoint &bottomRight, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
void displayRectangle (const vpRect &rectangle, const vpColor &color, bool fill=false, unsigned int thickness=1)
 
void flushDisplay ()
 
void flushDisplayROI (const vpImagePoint &iP, const unsigned int width, const unsigned int height)
 
bool getClick (bool blocking=true)
 
bool getClick (vpImagePoint &ip, bool blocking=true)
 
bool getClick (vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
bool getClickUp (vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)
 
bool getKeyboardEvent (bool blocking=true)
 
bool getKeyboardEvent (std::string &key, bool blocking=true)
 
bool getPointerMotionEvent (vpImagePoint &ip)
 
bool getPointerPosition (vpImagePoint &ip)
 
void setScale (vpScaleType scaleType, unsigned int width, unsigned int height)
 

Protected Attributes

bool m_displayHasBeenInitialized
 
int m_windowXPosition
 
int m_windowYPosition
 
unsigned int m_width
 
unsigned int m_height
 
std::string m_title
 
unsigned int m_scale
 
vpScaleType m_scaleType
 

Detailed Description

The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class GTK should be installed. Installation instructions are provided here https://visp.inria.fr/3rd_gtk.

The example below shows how to display an image with this video device.

#include <visp3/core/vpConfig.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/core/vpImagePoint.h>
int main()
{
#if defined(VISP_HAVE_GTK)
vpImage<unsigned char> I; // Grey level image
// Read an image in PGM P5 format
#ifdef _WIN32
vpImageIo::read(I, "C:/temp/ViSP-images/Klimt/Klimt.pgm");
#else
vpImageIo::read(I, "/local/soft/ViSP/ViSP-images/Klimt/Klimt.pgm");
#endif
// Initialize the display with the image I. Display and image are
// now link together.
d.init(I);
// Specify the window location
// Set the display window title
vpDisplay::setTitle(I, "My GTK display");
// Set the display background with image I content
// Draw a red rectangle in the display overlay (foreground)
vpDisplay::displayRectangle(I, 10, 10, 100, 20, vpColor::red, true);
// Draw a red rectangle in the display overlay (foreground)
vpImagePoint topLeftCorner;
topLeftCorner.set_i(50);
topLeftCorner.set_j(10);
vpDisplay::displayRectangle(I, topLeftCorner, 100, 20, vpColor::green, true);
// Flush the foreground and background display
// Get non blocking keyboard events
std::cout << "Check keyboard events..." << std::endl;
char key[10];
bool ret;
for (int i=0; i< 200; i++) {
bool ret = vpDisplay::getKeyboardEvent(I, key, false);
if (ret)
std::cout << "keyboard event: key: " << "\"" << key << "\"" << std::endl;
}
// Get a blocking keyboard event
std::cout << "Wait for a keyboard event..." << std::endl;
ret = vpDisplay::getKeyboardEvent(I, key, true);
std::cout << "keyboard event: " << ret << std::endl;
if (ret)
std::cout << "key: " << "\"" << key << "\"" << std::endl;
// Wait for a click in the display window
std::cout << "Wait for a button click..." << std::endl;
#endif
}
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, displayGTK.cpp, displaySequence.cpp, fernClassifier.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, grabV4l2.cpp, grabV4l2MultiCpp11Thread.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, photometricVisualServoing.cpp, planarObjectDetector.cpp, poseVirtualVS.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityInteractionCurrent.cpp, servoAfma6FourPoints2DCamVelocityInteractionDesired.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoSimu4Points.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoViper650FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, SickLDMRS-Process.cpp, templateTracker.cpp, testClick.cpp, testDisplayRoi.cpp, testDisplays.cpp, testImageResize.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint.cpp, testMouseEvent.cpp, testNurbs.cpp, testRobotAfma6Pose.cpp, testRobotViper850Pose.cpp, testSurfKeyPoint.cpp, testTrackDot.cpp, testVideoDevice.cpp, testVideoDeviceDual.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, trackMeNurbs.cpp, tutorial-blob-tracker-live-v4l2.cpp, tutorial-detection-object-mbt2.cpp, tutorial-image-filter.cpp, tutorial-video-recorder.cpp, tutorial-viewer.cpp, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 138 of file vpDisplayGTK.h.

Member Enumeration Documentation

enum vpDisplay::vpScaleType
inherited

Values that could be applied to a display to down scale the size of the display.

Enumerator
SCALE_AUTO 

Auto down scaling factor computed fom the screen resolution.

SCALE_1 

Display and image have the same size.

SCALE_2 

Display width and height is down scaled by 2 wrt the image size.

SCALE_3 

Display width and height is down scaled by 3 wrt the image size.

SCALE_4 

Display width and height is down scaled by 4 wrt the image size.

SCALE_5 

Display width and height is down scaled by 5 wrt the image size.

SCALE_6 

Display width and height is down scaled by 6 wrt the image size.

SCALE_7 

Display width and height is down scaled by 7 wrt the image size.

SCALE_8 

Display width and height is down scaled by 8 wrt the image size.

SCALE_9 

Display width and height is down scaled by 9 wrt the image size.

SCALE_10 

Display width and height is down scaled by 10 wrt the image size.

SCALE_DEFAULT 

Display and image have the same size. Similar to vpDisplay::SCALE_1.

Definition at line 173 of file vpDisplay.h.

Constructor & Destructor Documentation

vpDisplayGTK::vpDisplayGTK ( )

Basic constructor.

To initialize the window position, title and size you may call init(vpImage<unsigned char> &, int, int, const std::string &) or init(vpImage<vpRGBa> &, int, int, const std::string &).

#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/core/vpImage.h>
int main()
{
d.init(I, 100, 200, "My display");
}

Definition at line 233 of file vpDisplayGTK.cpp.

vpDisplayGTK::vpDisplayGTK ( int  x,
int  y,
const std::string &  title = "" 
)

Constructor that just initialize the display position in the screen and the display title.

Parameters
x,y: The window is set at position x,y (column index, row index).
title: Window title.

To initialize the display size, you need to call init().

#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/core/vpImage.h>
int main()
{
vpDisplayGTK d(100, 200, "My display");
d.init(I);
}

Definition at line 202 of file vpDisplayGTK.cpp.

References vpDisplay::m_title, vpDisplay::m_windowXPosition, and vpDisplay::m_windowYPosition.

vpDisplayGTK::vpDisplayGTK ( vpImage< unsigned char > &  I,
vpScaleType  scaleType 
)

Constructor : initialize a display to visualize a gray level image (8 bits).

Parameters
I: Image to be displayed (not that image has to be initialized).
scaleType: If this parameter is set to:

Definition at line 82 of file vpDisplayGTK.cpp.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), init(), and vpDisplay::setScale().

vpDisplayGTK::vpDisplayGTK ( vpImage< unsigned char > &  I,
int  x = -1,
int  y = -1,
const std::string &  title = "",
vpScaleType  scaleType = SCALE_DEFAULT 
)

Constructor : initialize a display to visualize a gray level image (8 bits).

Parameters
I: Image to be displayed (not that image has to be initialized).
x,y: The window is set at position x,y (column index, row index).
title: Window title.
scaleType: If this parameter is set to:

Definition at line 111 of file vpDisplayGTK.cpp.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), init(), and vpDisplay::setScale().

vpDisplayGTK::vpDisplayGTK ( vpImage< vpRGBa > &  I,
vpScaleType  scaleType 
)

Constructor : initialize a display to visualize a RGBa level image (32 bits).

Parameters
I: Image to be displayed (not that image has to be initialized)
scaleType: If this parameter is set to:

Definition at line 139 of file vpDisplayGTK.cpp.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), init(), and vpDisplay::setScale().

vpDisplayGTK::vpDisplayGTK ( vpImage< vpRGBa > &  I,
int  x = -1,
int  y = -1,
const std::string &  title = "",
vpScaleType  scaleType = SCALE_DEFAULT 
)

Constructor : initialize a display to visualize a RGBa level image (32 bits).

Parameters
I: Image to be displayed (not that image has to be initialized)
x,y: The window is set at position x,y (column index, row index).
title: Window title.
scaleType: If this parameter is set to:

Definition at line 166 of file vpDisplayGTK.cpp.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), init(), and vpDisplay::setScale().

vpDisplayGTK::~vpDisplayGTK ( )
virtual

Destructor.

Definition at line 246 of file vpDisplayGTK.cpp.

References closeDisplay().

Member Function Documentation

void vpDisplayGTK::clearDisplay ( const vpColor color = vpColor::white)
protected
Warning
Not implemented yet.

Definition at line 779 of file vpDisplayGTK.cpp.

References vpTRACE.

void vpDisplay::close ( vpImage< unsigned char > &  I)
staticinherited
void vpDisplay::close ( vpImage< vpRGBa > &  I)
staticinherited

Close the display attached to I.

Definition at line 13 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::closeDisplay ( )
protected

Close the window.

See Also
init()

Definition at line 720 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized.

Referenced by ~vpDisplayGTK().

unsigned int vpDisplay::computeAutoScale ( unsigned int  width,
unsigned int  height 
)
inherited

Computes the down scaling factor that should be applied to the window size to display the image given the resolution of the screen.

Parameters
width,height: Image size.
Returns

Definition at line 263 of file vpDisplay.cpp.

Referenced by vpDisplay::setScale().

void vpDisplay::display ( const vpImage< unsigned char > &  I)
staticinherited

Display image I.

Warning
Display has to be initialized.
Suppress the overlay drawing.
Parameters
I: Image to display.
See Also
init(), close()
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grab1394Two.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, grabDisk.cpp, grabFlyCapture.cpp, grabOpenCV.cpp, grabRealSense.cpp, grabV4l2.cpp, grabV4l2MultiCpp11Thread.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, photometricVisualServoing.cpp, planarObjectDetector.cpp, poseVirtualVS.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityInteractionCurrent.cpp, servoAfma6FourPoints2DCamVelocityInteractionDesired.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoViper650FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, templateTracker.cpp, testClick.cpp, testDisplayRoi.cpp, testDisplays.cpp, testFeatureSegment.cpp, testImageResize.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint.cpp, testMouseEvent.cpp, testNurbs.cpp, testRealSense.cpp, testRobotAfma6Pose.cpp, testRobotViper850Pose.cpp, testSurfKeyPoint.cpp, testTrackDot.cpp, testVideoDevice.cpp, testVideoDeviceDual.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, trackMeNurbs.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-blob-auto-tracker.cpp, tutorial-blob-tracker-live-firewire.cpp, tutorial-blob-tracker-live-v4l2.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-grabber-1394-writer.cpp, tutorial-grabber-1394.cpp, tutorial-grabber-CMU1394.cpp, tutorial-grabber-flycapture.cpp, tutorial-grabber-opencv-threaded.cpp, tutorial-grabber-opencv.cpp, tutorial-grabber-v4l2-threaded.cpp, tutorial-grabber-v4l2.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-filter.cpp, tutorial-image-simulator.cpp, tutorial-image-viewer.cpp, tutorial-klt-tracker-live-v4l2.cpp, tutorial-klt-tracker-with-reinit.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint.cpp, tutorial-matching-surf-deprecated.cpp, tutorial-matching-surf-homography-deprecated.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker-stereo-mono.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-mb-tracker.cpp, tutorial-me-ellipse-tracker.cpp, tutorial-me-line-tracker.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-tracking.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-template-tracker.cpp, tutorial-video-reader.cpp, tutorial-video-recorder.cpp, tutorial-viewer.cpp, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 624 of file vpDisplay_uchar.cpp.

Referenced by vpDisplayX::clearDisplay(), vpDisplayX::closeDisplay(), vpDot2::defineDots(), vpDisplayX::displayCharString(), vpDisplayX::displayCircle(), vpDisplayX::displayDotLine(), vpDisplayX::displayImage(), vpDisplayX::displayImageROI(), vpDisplayX::displayLine(), vpDisplayX::displayPoint(), vpDisplayX::displayRectangle(), vpDisplayX::flushDisplay(), vpDisplayX::flushDisplayROI(), vpDisplayX::getClick(), vpDisplayX::getClickUp(), vpWireFrameSimulator::getExternalImage(), vpDisplayX::getImage(), vpWireFrameSimulator::getInternalImage(), vpDisplayX::getKeyboardEvent(), vpDisplayX::getPointerMotionEvent(), vpDisplayX::getPointerPosition(), vpPlot::init(), vpDisplayX::init(), vpMbTracker::initClick(), vpDisplayX::setFont(), vpSimulatorAfma6::setPosition(), vpDisplayX::setTitle(), vpDisplayX::setWindowPosition(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), and vpPlot::~vpPlot().

void vpDisplay::display ( const vpImage< vpRGBa > &  I)
staticinherited

Display image I.

Warning
Display has to be initialized.
Suppress the overlay drawing.
Parameters
I: Image to display.
See Also
init(), close()

Definition at line 624 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayArrow ( const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color = vpColor::white,
unsigned int  w = 4,
unsigned int  h = 2,
unsigned int  thickness = 1 
)
protected

Display an arrow from image point ip1 to image point ip2.

Parameters
ip1,ip2: Initial and final image point.
color: Arrow color.
w,h: Width and height of the arrow.
thickness: Thickness of the lines used to display the arrow.

Definition at line 791 of file vpDisplayGTK.cpp.

References displayLine(), vpImagePoint::distance(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpDisplay::m_displayHasBeenInitialized, vpDisplayException::notInitializedError, vpImagePoint::set_i(), vpImagePoint::set_j(), and vpMath::sqr().

void vpDisplay::displayArrow ( const vpImage< unsigned char > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color = vpColor::white,
unsigned int  w = 4,
unsigned int  h = 2,
unsigned int  thickness = 1 
)
staticinherited

Display an arrow from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Arrow color.
w,h: Width and height of the arrow.
thickness: Thickness of the lines used to display the arrow.
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, and testDisplays.cpp.

Definition at line 27 of file vpDisplay_uchar.cpp.

Referenced by vpMeLine::computeRhoTheta(), vpProjectionDisplay::displayCamera(), vpMeTracker::initTracking(), and vpMeTracker::track().

void vpDisplay::displayArrow ( const vpImage< unsigned char > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color = vpColor::white,
unsigned int  w = 4,
unsigned int  h = 2,
unsigned int  thickness = 1 
)
staticinherited

Display an arrow from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1: Initial image point.
i2,j2: Final image point.
color: Arrow color.
w,h: Width and height of the arrow.
thickness: Thickness of the lines used to display the arrow.

Definition at line 44 of file vpDisplay_uchar.cpp.

void vpDisplay::displayArrow ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color = vpColor::white,
unsigned int  w = 4,
unsigned int  h = 2,
unsigned int  thickness = 1 
)
staticinherited

Display an arrow from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Arrow color.
w,h: Width and height of the arrow.
thickness: Thickness of the lines used to display the arrow.

Definition at line 27 of file vpDisplay_rgba.cpp.

void vpDisplay::displayArrow ( const vpImage< vpRGBa > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color = vpColor::white,
unsigned int  w = 4,
unsigned int  h = 2,
unsigned int  thickness = 1 
)
staticinherited

Display an arrow from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1: Initial image point.
i2,j2: Final image point.
color: Arrow color.
w,h: Width and height of the arrow.
thickness: Thickness of the lines used to display the arrow.

Definition at line 44 of file vpDisplay_rgba.cpp.

void vpDisplay::displayCamera ( const vpImage< unsigned char > &  I,
const vpHomogeneousMatrix cMo,
const vpCameraParameters cam,
double  size,
const vpColor color,
unsigned int  thickness 
)
staticinherited

Display the projection of an object camera represented by a cone in the image.

Parameters
I: The image associated to the display.
cMo: Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image.
cam: Camera intrinsic parameters.
size: Size of the object camera.
color: Color used to display the camera in the image.
thickness: Thickness of the graphics drawing.

Definition at line 64 of file vpDisplay_uchar.cpp.

Referenced by vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

void vpDisplay::displayCamera ( const vpImage< vpRGBa > &  I,
const vpHomogeneousMatrix cMo,
const vpCameraParameters cam,
double  size,
const vpColor color,
unsigned int  thickness 
)
staticinherited

Display the projection of an object camera represented by a cone in the image.

Parameters
I: The image associated to the display.
cMo: Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image.
cam: Camera intrinsic parameters.
size: Size of the object camera.
color: Color used to display the camera in the image.
thickness: Thickness of the graphics drawing.

Definition at line 64 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayCharString ( const vpImagePoint ip,
const char *  text,
const vpColor color = vpColor::green 
)
protected

Display a string at the image point ip location.

To select the font used to display the string, use setFont().

Parameters
ip: Upper left image point location of the string in the display.
text: String to display in overlay.
color: String color.
See Also
setFont()

Definition at line 852 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplay::displayCharString ( const vpImage< unsigned char > &  I,
const vpImagePoint ip,
const char *  string,
const vpColor color 
)
staticinherited

Display a string at the image point ip location. Use rather displayText() that does the same.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
ip: Upper left image point location of the string in the display.
string: String to display in overlay.
color: String color.
See Also
setFont(), displayText()
Examples:
sonarPioneerReader.cpp.

Definition at line 84 of file vpDisplay_uchar.cpp.

void vpDisplay::displayCharString ( const vpImage< unsigned char > &  I,
int  i,
int  j,
const char *  string,
const vpColor color 
)
staticinherited

Display a string at the image point (i,j) location. Use rather displayText() that does the same.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
i,j: Upper left image point location of the string in the display.
string: String to display in overlay.
color: String color.
See Also
setFont(), displayText()

Definition at line 104 of file vpDisplay_uchar.cpp.

void vpDisplay::displayCharString ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip,
const char *  string,
const vpColor color 
)
staticinherited

Display a string at the image point ip location. Use rather displayText() that does the same.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
ip: Upper left image point location of the string in the display.
string: String to display in overlay.
color: String color.
See Also
setFont(), displayText()

Definition at line 84 of file vpDisplay_rgba.cpp.

void vpDisplay::displayCharString ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
const char *  string,
const vpColor color 
)
staticinherited

Display a string at the image point (i,j) location. Use rather displayText() that does the same.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
i,j: Upper left image point location of the string in the display.
string: String to display in overlay.
color: String color.
See Also
setFont(), displayText()

Definition at line 104 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayCircle ( const vpImagePoint center,
unsigned int  radius,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protected

Display a circle.

Parameters
center: Circle center position.
radius: Circle radius.
color: Circle color.
fill: When set to true fill the circle.
thickness: Thickness of the circle. This parameter is only useful when fill is set to false.

Definition at line 890 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplay::displayCircle ( const vpImage< unsigned char > &  I,
const vpImagePoint center,
unsigned int  radius,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a circle.

Parameters
I: The image associated to the display.
center: Circle center position.
radius: Circle radius.
color: Circle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the circle. This parameter is only useful when fill is set to false.
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, testDisplays.cpp, testKeyPoint-2.cpp, tutorial-detection-object-mbt2.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, and tutorial-image-display.cpp.

Definition at line 121 of file vpDisplay_uchar.cpp.

Referenced by vpFeatureSegment::display(), vpProjectionDisplay::display(), vpKeyPoint::displayMatching(), and vpDot2::trackAndDisplay().

void vpDisplay::displayCircle ( const vpImage< unsigned char > &  I,
int  i,
int  j,
unsigned int  radius,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a circle.

Parameters
I: The image associated to the display.
i,j: Circle center position.
radius: Circle radius.
color: Circle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the circle. This parameter is only useful when fill is set to false.

Definition at line 138 of file vpDisplay_uchar.cpp.

void vpDisplay::displayCircle ( const vpImage< vpRGBa > &  I,
const vpImagePoint center,
unsigned int  radius,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a circle.

Parameters
I: The image associated to the display.
center: Circle center position.
radius: Circle radius.
color: Circle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the circle. This parameter is only useful when fill is set to false.

Definition at line 121 of file vpDisplay_rgba.cpp.

void vpDisplay::displayCircle ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
unsigned int  radius,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a circle.

Parameters
I: The image associated to the display.
i,j: Circle center position.
radius: Circle radius.
color: Circle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the circle. This parameter is only useful when fill is set to false.

Definition at line 138 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayCross ( const vpImagePoint ip,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
protected

Display a cross at the image point ip location.

Parameters
ip: Cross location.
size: Size (width and height) of the cross.
color: Cross color.
thickness: Thickness of the lines used to display the cross.

Definition at line 938 of file vpDisplayGTK.cpp.

References displayLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpDisplay::m_displayHasBeenInitialized, vpDisplayException::notInitializedError, vpImagePoint::set_i(), and vpImagePoint::set_j().

void vpDisplay::displayCross ( const vpImage< unsigned char > &  I,
const vpImagePoint ip,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a cross at the image point ip location.

Parameters
I: The image associated to the display.
ip: Cross location.
size: Size (width and height) of the cross.
color: Cross color.
thickness: Thickness of the lines used to display the cross.
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, poseVirtualVS.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityInteractionCurrent.cpp, servoAfma6FourPoints2DCamVelocityInteractionDesired.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Segment2DCamVelocity.cpp, servoViper650FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, sonarPioneerReader.cpp, testDisplays.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testNurbs.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-klt-tracker-live-v4l2.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-surf-homography-deprecated.cpp, and tutorial-pose-from-qrcode-image.cpp.

Definition at line 152 of file vpDisplay_uchar.cpp.

Referenced by vpMbtDistanceCylinder::computeInteractionMatrixError(), vpDot2::defineDots(), vpKltOpencv::display(), vpDot2::display(), vpPlanarObjectDetector::display(), vpDot::display(), vpKeyPointSurf::display(), vpMeNurbs::display(), vpMeLine::display(), vpMeSite::display(), vpFernClassifier::display(), vpMeEllipse::display(), vpKeyPoint::display(), vpCalibration::displayData(), vpCalibration::displayGrid(), vpKeyPoint::displayMatching(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpMbtDistanceKltPoints::displayPrimitive(), vpMbtDistanceKltCylinder::displayPrimitive(), vpMeSite::getQueryList(), vpTemplateTrackerZone::initClick(), vpPolygon::initClick(), vpMbTracker::initClick(), vpMeEllipse::initTracking(), vpMeNurbs::initTracking(), vpMeLine::initTracking(), vpMeLine::sample(), vpMeNurbs::seekExtremities(), vpMeLine::seekExtremities(), vpDot2::track(), and vpDot::track().

void vpDisplay::displayCross ( const vpImage< unsigned char > &  I,
int  i,
int  j,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a cross at the image point (i,j) location.

Parameters
I: The image associated to the display.
i,j: Cross location.
size: Size (width and height) of the cross.
color: Cross color.
thickness: Thickness of the lines used to display the cross.

Definition at line 166 of file vpDisplay_uchar.cpp.

void vpDisplay::displayCross ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a cross at the image point ip location.

Parameters
I: The image associated to the display.
ip: Cross location.
size: Size (width and height) of the cross.
color: Cross color.
thickness: Thickness of the lines used to display the cross.

Definition at line 152 of file vpDisplay_rgba.cpp.

void vpDisplay::displayCross ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a cross at the image point (i,j) location.

Parameters
I: The image associated to the display.
i,j: Cross location.
size: Size (width and height) of the cross.
color: Cross color.
thickness: Thickness of the lines used to display the cross.

Definition at line 166 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayDotLine ( const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
protected

Display a dashed line from image point ip1 to image point ip2.

Parameters
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Line thickness.

Definition at line 975 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplay::displayDotLine ( const vpImage< unsigned char > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a dashed line from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Dashed line thickness.
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, and testDisplays.cpp.

Definition at line 179 of file vpDisplay_uchar.cpp.

Referenced by vpDot2::trackAndDisplay().

void vpDisplay::displayDotLine ( const vpImage< unsigned char > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a dashed line from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1Initial image point.
i2,j2Final image point.
color: Line color.
thickness: Dashed line thickness.

Definition at line 193 of file vpDisplay_uchar.cpp.

void vpDisplay::displayDotLine ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a dashed line from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Dashed line thickness.

Definition at line 179 of file vpDisplay_rgba.cpp.

void vpDisplay::displayDotLine ( const vpImage< vpRGBa > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a dashed line from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1Initial image point.
i2,j2Final image point.
color: Line color.
thickness: Dashed line thickness.

Definition at line 193 of file vpDisplay_rgba.cpp.

void vpDisplay::displayEllipse ( const vpImage< unsigned char > &  I,
const vpImagePoint center,
const double &  coef1,
const double &  coef2,
const double &  coef3,
bool  use_centered_moments,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display an ellipse from its parameters expressed in pixels.

Parameters
I: Image to consider.
center: Center $(u_c, v_c)$ of the ellipse.
coef1,coef2,coef3: Depending on the parameter use_centered_moments these parameters are:
  • the centered moments expressed in pixels: $\mu_{20}, \mu_{11}, \mu_{02}$;
  • the major and minor axis lenght in pixels and the excentricity of the ellipse in radians: $a, b, e$.
use_centered_moments: When false, the parameters coef1, coef2, coef3 are the parameters $a, b, e$. When true, the parameters coef1, coef2, coef3 are rather the centered moments $\mu_{20}, \mu_{11}, \mu_{02}$ expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments.
color: Drawings color.
thickness: Drawings thickness.

All the points $(u_\theta,v_\theta)$ on the ellipse are drawn thanks to its parametric representation:

\[ \left(\begin{array}{c} u_\theta \\ v_\theta \end{array} \right) = \left(\begin{array}{c} u_c \\ v_c \end{array} \right) + \left(\begin{array}{cc} \cos(e) & -\sin(e) \\ \sin(e) & \cos(e) \end{array} \right) \left(\begin{array}{c} a \cos(\theta) \\ b \sin(\theta) \end{array} \right) \]

with $0 \leq \theta \leq 2\pi$.

The following example shows how to use for example this function to display the result of a tracking.

vpMeEllipse ellipse;
...
vpDisplay::display(I);
ellipse.track(I) ;
vpDisplay::displayEllipse(I, ellipse.getCenter(), ellipse.get_mu20(), ellipse.get_mu11(), ellipse.get_mu02(),
true, vpColor::orange, 1);

Definition at line 244 of file vpDisplay_uchar.cpp.

References vpMath::rad().

Referenced by vpMbtDistanceCircle::display(), and vpDisplay::displayEllipse().

void vpDisplay::displayEllipse ( const vpImage< unsigned char > &  I,
const vpImagePoint center,
const double &  coef1,
const double &  coef2,
const double &  coef3,
const double &  theta1,
const double &  theta2,
bool  use_centered_moments,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display an ellipse from its parameters expressed in pixels.

Parameters
I: Image to consider.
center: Center $(u_c, v_c)$ of the ellipse.
coef1,coef2,coef3: Depending on the parameter use_centered_moments these parameters are:
  • the centered moments expressed in pixels: $\mu_{20}, \mu_{11}, \mu_{02}$;
  • the major and minor axis lenght in pixels and the excentricity of the ellipse in radians: $a, b, e$.
theta1,theta2: Angles $(\theta_1, \theta_2)$ in radians used to select a portion of the ellipse. If theta1=0 and theta2=vpMath::rad(360) all the ellipse is displayed.
use_centered_moments: When false, the parameters coef1, coef2, coef3 are the parameters $a, b, e$. When true, the parameters coef1, coef2, coef3 are rather the centered moments $\mu_{20}, \mu_{11}, \mu_{02}$ expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments.
color: Drawings color.
thickness: Drawings thickness.

All the points $(u_\theta,v_\theta)$ on the ellipse are drawn thanks to its parametric representation:

\[ \left(\begin{array}{c} u_\theta \\ v_\theta \end{array} \right) = \left(\begin{array}{c} u_c \\ v_c \end{array} \right) + \left(\begin{array}{cc} \cos(e) & -\sin(e) \\ \sin(e) & \cos(e) \end{array} \right) \left(\begin{array}{c} a \cos(\theta) \\ b \sin(\theta) \end{array} \right) \]

with $\theta_1 \leq \theta \leq \theta_2$.

The following example shows how to use for example this function to display the result of a tracking.

vpMeEllipse ellipse;
...
vpDisplay::display(I);
ellipse.track(I) ;
ellipse.get_mu11(), ellipse.get_mu02(),
ellipse.getSmallestAngle(), ellipse.getHighestAngle(),
true, vpColor::orange, 1);

Definition at line 300 of file vpDisplay_uchar.cpp.

void vpDisplay::displayEllipse ( const vpImage< vpRGBa > &  I,
const vpImagePoint center,
const double &  coef1,
const double &  coef2,
const double &  coef3,
bool  use_centered_moments,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display an ellipse from its parameters expressed in pixels.

Parameters
I: Image to consider.
center: Center $(u_c, v_c)$ of the ellipse.
coef1,coef2,coef3: Depending on the parameter use_centered_moments these parameters are:
  • the centered moments expressed in pixels: $\mu_{20}, \mu_{11}, \mu_{02}$;
  • the major and minor axis lenght in pixels and the excentricity of the ellipse in radians: $a, b, e$.
use_centered_moments: When false, the parameters coef1, coef2, coef3 are the parameters $a, b, e$. When true, the parameters coef1, coef2, coef3 are rather the centered moments $\mu_{20}, \mu_{11}, \mu_{02}$ expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments.
color: Drawings color.
thickness: Drawings thickness.

All the points $(u_\theta,v_\theta)$ on the ellipse are drawn thanks to its parametric representation:

\[ \left(\begin{array}{c} u_\theta \\ v_\theta \end{array} \right) = \left(\begin{array}{c} u_c \\ v_c \end{array} \right) + \left(\begin{array}{cc} \cos(e) & -\sin(e) \\ \sin(e) & \cos(e) \end{array} \right) \left(\begin{array}{c} a \cos(\theta) \\ b \sin(\theta) \end{array} \right) \]

with $0 \leq \theta \leq 2\pi$.

The following example shows how to use for example this function to display the result of a tracking.

vpMeEllipse ellipse;
...
vpDisplay::display(I);
ellipse.track(I) ;
vpDisplay::displayEllipse(I, ellipse.getCenter(), ellipse.get_mu20(), ellipse.get_mu11(), ellipse.get_mu02(),
true, vpColor::orange, 1);

Definition at line 244 of file vpDisplay_rgba.cpp.

References vpDisplay::displayEllipse(), and vpMath::rad().

void vpDisplay::displayEllipse ( const vpImage< vpRGBa > &  I,
const vpImagePoint center,
const double &  coef1,
const double &  coef2,
const double &  coef3,
const double &  theta1,
const double &  theta2,
bool  use_centered_moments,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display an ellipse from its parameters expressed in pixels.

Parameters
I: Image to consider.
center: Center $(u_c, v_c)$ of the ellipse.
coef1,coef2,coef3: Depending on the parameter use_centered_moments these parameters are:
  • the centered moments expressed in pixels: $\mu_{20}, \mu_{11}, \mu_{02}$;
  • the major and minor axis lenght in pixels and the excentricity of the ellipse in radians: $a, b, e$.
theta1,theta2: Angles $(\theta_1, \theta_2)$ in radians used to select a portion of the ellipse. If theta1=0 and theta2=vpMath::rad(360) all the ellipse is displayed.
use_centered_moments: When false, the parameters coef1, coef2, coef3 are the parameters $a, b, e$. When true, the parameters coef1, coef2, coef3 are rather the centered moments $\mu_{20}, \mu_{11}, \mu_{02}$ expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments.
color: Drawings color.
thickness: Drawings thickness.

All the points $(u_\theta,v_\theta)$ on the ellipse are drawn thanks to its parametric representation:

\[ \left(\begin{array}{c} u_\theta \\ v_\theta \end{array} \right) = \left(\begin{array}{c} u_c \\ v_c \end{array} \right) + \left(\begin{array}{cc} \cos(e) & -\sin(e) \\ \sin(e) & \cos(e) \end{array} \right) \left(\begin{array}{c} a \cos(\theta) \\ b \sin(\theta) \end{array} \right) \]

with $\theta_1 \leq \theta \leq \theta_2$.

The following example shows how to use for example this function to display the result of a tracking.

vpMeEllipse ellipse;
...
vpDisplay::display(I);
ellipse.track(I) ;
ellipse.get_mu11(), ellipse.get_mu02(),
ellipse.getSmallestAngle(), ellipse.getHighestAngle(),
true, vpColor::orange, 1);

Definition at line 300 of file vpDisplay_rgba.cpp.

void vpDisplay::displayFrame ( const vpImage< unsigned char > &  I,
const vpHomogeneousMatrix cMo,
const vpCameraParameters cam,
double  size,
const vpColor color = vpColor::none,
unsigned int  thickness = 1,
vpImagePoint  offset = vpImagePoint(0,0) 
)
staticinherited

Display the projection of an object frame represented by 3 arrows in the image.

Parameters
I: The image associated to the display.
cMo: Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image.
cam: Camera intrinsic parameters.
size: Size of the object frame.
color: Color used to display the frame in the image.
thickness: the thickness of the line.
offset: Offset in pixels applied to the frame origin location in the image.
Examples:
mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, testKeyPoint-2.cpp, testKeyPoint-4.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker-stereo-mono.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-mb-tracker.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-tracking.cpp, and tutorial-pose-from-qrcode-image.cpp.

Definition at line 323 of file vpDisplay_uchar.cpp.

Referenced by vpPose::display(), vpMbTracker::initClick(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

void vpDisplay::displayFrame ( const vpImage< vpRGBa > &  I,
const vpHomogeneousMatrix cMo,
const vpCameraParameters cam,
double  size,
const vpColor color = vpColor::none,
unsigned int  thickness = 1,
vpImagePoint  offset = vpImagePoint(0,0) 
)
staticinherited

Display the projection of an object frame represented by 3 arrows in the image.

Parameters
I: The image associated to the display.
cMo: Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image.
cam: Camera intrinsic parameters.
size: Size of the object frame.
color: Color used to display the frame in the image.
thickness: the thickness of the line.
offset: Offset in pixels applied to the frame origin location in the image.

Definition at line 323 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayImage ( const vpImage< vpRGBa > &  I)
protected

Display the color image I in RGBa format (32bits).

Warning
Display has to be initialized.
Suppress the overlay drawing.
Parameters
I: Image to display.
See Also
init(), closeDisplay()

Definition at line 626 of file vpDisplayGTK.cpp.

References vpImage< Type >::bitmap, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_height, vpDisplay::m_scale, vpDisplay::m_width, vpDisplayException::notInitializedError, and vpImage< Type >::subsample().

void vpDisplayGTK::displayImage ( const vpImage< unsigned char > &  I)
protected

Display the gray level image I (8bits).

Warning
Display has to be initialized.
Suppress the overlay drawing.
Parameters
I: Image to display.
See Also
init(), closeDisplay()

Definition at line 536 of file vpDisplayGTK.cpp.

References vpImage< Type >::bitmap, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_height, vpDisplay::m_scale, vpDisplay::m_width, vpDisplayException::notInitializedError, and vpImage< Type >::subsample().

void vpDisplayGTK::displayImage ( const unsigned char *  I)
protected
Warning
Not implemented yet.
See Also
init(), closeDisplay()

Definition at line 710 of file vpDisplayGTK.cpp.

References vpTRACE.

void vpDisplayGTK::displayImageROI ( const vpImage< unsigned char > &  I,
const vpImagePoint iP,
const unsigned int  w,
const unsigned int  h 
)
protected

Display a selection of the gray level image I (8bits).

Warning
Display has to be initialized.
Suppress the overlay drawing in the region of interest.
Parameters
I: Image to display.
iP: Top left corner of the region of interest
w: Width of the region of interest
h: Height of the region of interest
See Also
init(), closeDisplay()

Definition at line 587 of file vpDisplayGTK.cpp.

References vpImageTools::crop(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, and vpDisplayException::notInitializedError.

void vpDisplayGTK::displayImageROI ( const vpImage< vpRGBa > &  I,
const vpImagePoint iP,
const unsigned int  w,
const unsigned int  h 
)
protected

Display a selection of the color image I in RGBa format (32bits).

Warning
Display has to be initialized.
Suppress the overlay drawing in the region of interest.
Parameters
I: Image to display.
iP: Top left corner of the region of interest
w: Width of the region of interest
h: Height of the region of interest
See Also
init(), closeDisplay()

Definition at line 678 of file vpDisplayGTK.cpp.

References vpImageTools::crop(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, and vpDisplayException::notInitializedError.

void vpDisplayGTK::displayLine ( const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
protected

Display a line from image point ip1 to image point ip2.

Parameters
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Line thickness.

Definition at line 1020 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

Referenced by displayArrow(), and displayCross().

void vpDisplay::displayLine ( const vpImage< unsigned char > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a line from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Line thickness.
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, testDisplays.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint.cpp, tutorial-matching-surf-deprecated.cpp, and tutorial-matching-surf-homography-deprecated.cpp.

Definition at line 337 of file vpDisplay_uchar.cpp.

Referenced by vpTemplateTrackerZone::display(), vpFeatureSegment::display(), vpPolygon::display(), vpMbtDistanceLine::display(), vpMbtDistanceKltPoints::display(), vpMbtDistanceKltCylinder::display(), vpMbtDistanceCylinder::display(), vpPlanarObjectDetector::display(), vpMeLine::display(), vpHistogram::display(), vpMeEllipse::display(), vpWireFrameSimulator::display_scene(), vpFeatureDisplay::displayEllipse(), vpFeatureDisplay::displayLine(), vpKeyPoint::displayMatching(), vpWireFrameSimulator::displayTrajectory(), vpWireFrameSimulator::getExternalImage(), vpTemplateTrackerZone::initClick(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

void vpDisplay::displayLine ( const vpImage< unsigned char > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a line from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1Initial image point.
i2,j2Final image point.
color: Line color.
thickness: Line thickness.

Definition at line 351 of file vpDisplay_uchar.cpp.

void vpDisplay::displayLine ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a line from image point ip1 to image point ip2.

Parameters
I: The image associated to the display.
ip1,ip2: Initial and final image points.
color: Line color.
thickness: Line thickness.

Definition at line 337 of file vpDisplay_rgba.cpp.

void vpDisplay::displayLine ( const vpImage< vpRGBa > &  I,
int  i1,
int  j1,
int  i2,
int  j2,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a line from image point (i1,j1) to image point (i2,j2).

Parameters
I: The image associated to the display.
i1,j1Initial image point.
i2,j2Final image point.
color: Line color.
thickness: Line thickness.

Definition at line 351 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayPoint ( const vpImagePoint ip,
const vpColor color,
unsigned int  thickness = 1 
)
protected

Display a point at the image point ip location.

Parameters
ip: Point location.
color: Point color.
thickness: Point thickness.

Definition at line 1061 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplay::displayPoint ( const vpImage< unsigned char > &  I,
const vpImagePoint ip,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a point at the image point ip location.

Parameters
I: The image associated to the display.
ip: Point location.
color: Point color.
thickness: Thickness of the point
Examples:
servoAfma6Points2DCamVelocityEyeToHand.cpp, testDisplays.cpp, trackDot.cpp, and trackDot2.cpp.

Definition at line 364 of file vpDisplay_uchar.cpp.

Referenced by vpDot2::display(), vpDot::display(), vpWireFrameSimulator::displayTrajectory(), vpWireFrameSimulator::getExternalImage(), vpMbTracker::initClick(), vpMeNurbs::seekExtremitiesCanny(), and vpMeSite::track().

void vpDisplay::displayPoint ( const vpImage< unsigned char > &  I,
int  i,
int  j,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a point at the image point (i,j) location.

Parameters
I: The image associated to the display.
i,j: Point location.
color: Point color.
thickness: Thickness of the point

Definition at line 377 of file vpDisplay_uchar.cpp.

void vpDisplay::displayPoint ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a point at the image point ip location.

Parameters
I: The image associated to the display.
ip: Point location.
color: Point color.
thickness: Thickness of the point

Definition at line 364 of file vpDisplay_rgba.cpp.

void vpDisplay::displayPoint ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a point at the image point (i,j) location.

Parameters
I: The image associated to the display.
i,j: Point location.
color: Point color.
thickness: Thickness of the point

Definition at line 377 of file vpDisplay_rgba.cpp.

void vpDisplay::displayPolygon ( const vpImage< unsigned char > &  I,
const std::vector< vpImagePoint > &  vip,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a polygon defined by a vector of image points.

Parameters
I: The image associated to the display.
vip: Vector of image point that define the vertexes of the polygon.
color: Line color.
thickness: Line thickness.

Definition at line 392 of file vpDisplay_uchar.cpp.

void vpDisplay::displayPolygon ( const vpImage< vpRGBa > &  I,
const std::vector< vpImagePoint > &  vip,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a polygon defined by a vector of image points.

Parameters
I: The image associated to the display.
vip: Vector of image point that define the vertexes of the polygon.
color: Line color.
thickness: Line thickness.

Definition at line 392 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::displayRectangle ( const vpImagePoint topLeft,
unsigned int  w,
unsigned int  h,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protected

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
topLeft: Top-left corner of the rectangle.
w,h: Rectangle size.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 1109 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplayGTK::displayRectangle ( const vpImagePoint topLeft,
const vpImagePoint bottomRight,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protected

Display a rectangle.

Parameters
topLeft: Top-left corner of the rectangle.
bottomRight: Bottom-right corner of the rectangle.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 1166 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplayGTK::displayRectangle ( const vpRect rectangle,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protected

Display a rectangle.

Parameters
rectangle: Rectangle characteristics.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 1227 of file vpDisplayGTK.cpp.

References vpRGBa::B, vpRGBa::G, vpRect::getHeight(), vpRect::getLeft(), vpRect::getTop(), vpRect::getWidth(), vpColor::id, vpColor::id_unknown, vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpRGBa::R, and vpMath::round().

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
const vpImagePoint topLeft,
unsigned int  width,
unsigned int  height,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
topLeft: Top-left corner of the rectangle.
width,height: Rectangle size.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, fernClassifier.cpp, keyPointSurf.cpp, manDisplay.cpp, planarObjectDetector.cpp, testDisplays.cpp, testSurfKeyPoint.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, and tutorial-image-viewer.cpp.

Definition at line 413 of file vpDisplay_uchar.cpp.

Referenced by vpDot2::searchDotsInArea(), and vpMeNurbs::seekExtremitiesCanny().

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
const vpImagePoint topLeft,
const vpImagePoint bottomRight,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
topLeft: Top-left corner of the rectangle.
bottomRight: Bottom-right corner of the rectangle.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 498 of file vpDisplay_uchar.cpp.

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
const vpRect rectangle,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
rectangle: Rectangle characteristics.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 456 of file vpDisplay_uchar.cpp.

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
const vpImagePoint center,
float  angle,
unsigned int  width,
unsigned int  height,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle defined by its center, its orientation (angle) and its size.

Parameters
I: Image associated to the display.
center: Rectangle center point.
angle: Angle in radians width an horizontal axis oriented from left to right.
width,height: Rectangle size.
color: Rectangle color.
thickness: Thickness of the four lines used to display the rectangle.

Definition at line 476 of file vpDisplay_uchar.cpp.

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
int  i,
int  j,
unsigned int  width,
unsigned int  height,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with (i,j) as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
i,j: Top-left corner of the rectangle.
width,height: Rectangle size.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 435 of file vpDisplay_uchar.cpp.

void vpDisplay::displayRectangle ( const vpImage< unsigned char > &  I,
unsigned int  i,
unsigned int  j,
float  angle,
unsigned int  width,
unsigned int  height,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle defined by its center, its orientation (angle) and its size.

Parameters
I: Image associated to the display.
i,j: Rectangle center point.
angle: Angle in radians width an horizontal axis oriented from left to right.
width,height: Rectangle size.
color: Rectangle color.
thickness: Thickness of the four lines used to display the rectangle.

Definition at line 519 of file vpDisplay_uchar.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
const vpImagePoint topLeft,
unsigned int  width,
unsigned int  height,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
topLeft: Top-left corner of the rectangle.
width,height: Rectangle size.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 413 of file vpDisplay_rgba.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
const vpImagePoint topLeft,
const vpImagePoint bottomRight,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
topLeft: Top-left corner of the rectangle.
bottomRight: Bottom-right corner of the rectangle.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 498 of file vpDisplay_rgba.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
const vpRect rectangle,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with topLeft as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
rectangle: Rectangle characteristics.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 456 of file vpDisplay_rgba.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
const vpImagePoint center,
float  angle,
unsigned int  width,
unsigned int  height,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle defined by its center, its orientation (angle) and its size.

Parameters
I: Image associated to the display.
center: Rectangle center point.
angle: Angle in radians width an horizontal axis oriented from left to right.
width,height: Rectangle size.
color: Rectangle color.
thickness: Thickness of the four lines used to display the rectangle.

Definition at line 476 of file vpDisplay_rgba.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
unsigned int  width,
unsigned int  height,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle with (i,j) as the top-left corner and width and height the rectangle size.

Parameters
I: The image associated to the display.
i,j: Top-left corner of the rectangle.
width,height: Rectangle size.
color: Rectangle color.
fill: When set to true fill the rectangle.
thickness: Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false.

Definition at line 435 of file vpDisplay_rgba.cpp.

void vpDisplay::displayRectangle ( const vpImage< vpRGBa > &  I,
unsigned int  i,
unsigned int  j,
float  angle,
unsigned int  width,
unsigned int  height,
const vpColor color,
unsigned int  thickness = 1 
)
staticinherited

Display a rectangle defined by its center, its orientation (angle) and its size.

Parameters
I: Image associated to the display.
i,j: Rectangle center point.
angle: Angle in radians width an horizontal axis oriented from left to right.
width,height: Rectangle size.
color: Rectangle color.
thickness: Thickness of the four lines used to display the rectangle.

Definition at line 519 of file vpDisplay_rgba.cpp.

void vpDisplay::displayROI ( const vpImage< unsigned char > &  I,
const vpRect roi 
)
staticinherited

Update the display with the content of the image that is in the region of interest.

Parameters
I: Image.
roi: Region of interest.
Examples:
testDisplayRoi.cpp.

Definition at line 635 of file vpDisplay_uchar.cpp.

void vpDisplay::displayROI ( const vpImage< vpRGBa > &  I,
const vpRect roi 
)
staticinherited

Update the display with the content of the image that is in the region of interest.

Parameters
I: Image.
roi: Region of interest.

Definition at line 635 of file vpDisplay_rgba.cpp.

void vpDisplay::displayText ( const vpImage< unsigned char > &  I,
const vpImagePoint ip,
const std::string &  s,
const vpColor color 
)
staticinherited

Display a string at the image point ip location.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
ip: Upper left image point location of the string in the display.
s: String to display in overlay.
color: String color.
See Also
setFont()
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grabFlyCapture.cpp, grabRealSense.cpp, grabV4l2MultiCpp11Thread.cpp, manDisplay.cpp, mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, planarObjectDetector.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, templateTracker.cpp, testDisplays.cpp, testForceTorqueAti.cpp, testImageResize.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-blob-tracker-live-firewire.cpp, tutorial-blob-tracker-live-v4l2.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-grabber-flycapture.cpp, tutorial-grabber-opencv-threaded.cpp, tutorial-grabber-v4l2-threaded.cpp, tutorial-grabber-v4l2.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-image-filter.cpp, tutorial-klt-tracker-live-v4l2.cpp, tutorial-klt-tracker.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker-stereo-mono.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-mb-tracker.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, and tutorial-video-recorder.cpp.

Definition at line 539 of file vpDisplay_uchar.cpp.

Referenced by vpKltOpencv::display(), vpMbtDistanceKltPoints::displayPrimitive(), vpMbtDistanceKltCylinder::displayPrimitive(), and vpMbTracker::initClick().

void vpDisplay::displayText ( const vpImage< unsigned char > &  I,
int  i,
int  j,
const std::string &  s,
const vpColor color 
)
staticinherited

Display a string at the image point (i,j) location.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
i,j: Upper left image point location of the string in the display.
s: String to display in overlay.
color: String color.
See Also
setFont()

Definition at line 558 of file vpDisplay_uchar.cpp.

void vpDisplay::displayText ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip,
const std::string &  s,
const vpColor color 
)
staticinherited

Display a string at the image point ip location.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
ip: Upper left image point location of the string in the display.
s: String to display in overlay.
color: String color.
See Also
setFont()

Definition at line 539 of file vpDisplay_rgba.cpp.

void vpDisplay::displayText ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
const std::string &  s,
const vpColor color 
)
staticinherited

Display a string at the image point (i,j) location.

To select the font used to display the string, use setFont().

Parameters
I: Image associated to the display.
i,j: Upper left image point location of the string in the display.
s: String to display in overlay.
color: String color.
See Also
setFont()

Definition at line 558 of file vpDisplay_rgba.cpp.

void vpDisplay::flush ( const vpImage< unsigned char > &  I)
staticinherited

Flushes the output buffer associated to image I display. It's necessary to use this function to see the results of any drawing.

Warning
This function is particular and must be called to show the overlay. Because it's time spending, use it parcimoniously.
#include <visp3/core/vpDisplay.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/core/vpColor.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpImagePoint.h>
int main() {
d.init(I);
vpDisplay::display(I); // display the image
vpImagePoint center;
unsigned int radius = 100;
vpDisplay::flush(I); // Mendatory to display the requested features.
}
See Also
flushROI()
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grab1394Two.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, grabDisk.cpp, grabFlyCapture.cpp, grabOpenCV.cpp, grabRealSense.cpp, grabV4l2.cpp, grabV4l2MultiCpp11Thread.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, photometricVisualServoing.cpp, planarObjectDetector.cpp, poseVirtualVS.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityInteractionCurrent.cpp, servoAfma6FourPoints2DCamVelocityInteractionDesired.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoViper650FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, templateTracker.cpp, testClick.cpp, testDisplayRoi.cpp, testDisplays.cpp, testFeatureSegment.cpp, testForceTorqueAti.cpp, testImageResize.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint.cpp, testMouseEvent.cpp, testNurbs.cpp, testRealSense.cpp, testRobotAfma6Pose.cpp, testRobotViper850Pose.cpp, testSurfKeyPoint.cpp, testTrackDot.cpp, testVideoDevice.cpp, testVideoDeviceDual.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, trackMeNurbs.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-blob-auto-tracker.cpp, tutorial-blob-tracker-live-firewire.cpp, tutorial-blob-tracker-live-v4l2.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-grabber-1394-writer.cpp, tutorial-grabber-1394.cpp, tutorial-grabber-CMU1394.cpp, tutorial-grabber-flycapture.cpp, tutorial-grabber-opencv-threaded.cpp, tutorial-grabber-opencv.cpp, tutorial-grabber-v4l2-threaded.cpp, tutorial-grabber-v4l2.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-filter.cpp, tutorial-image-simulator.cpp, tutorial-image-viewer.cpp, tutorial-klt-tracker-live-v4l2.cpp, tutorial-klt-tracker-with-reinit.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint.cpp, tutorial-matching-surf-deprecated.cpp, tutorial-matching-surf-homography-deprecated.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker-stereo-mono.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-mb-tracker.cpp, tutorial-me-ellipse-tracker.cpp, tutorial-me-line-tracker.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-tracking.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, tutorial-template-tracker.cpp, tutorial-video-reader.cpp, tutorial-video-recorder.cpp, tutorial-viewer.cpp, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 593 of file vpDisplay_uchar.cpp.

Referenced by vpMbtDistanceCylinder::computeInteractionMatrixError(), vpDot2::defineDots(), vpMbtDistanceCircle::displayMovingEdges(), vpTemplateTrackerZone::initClick(), vpPolygon::initClick(), vpMbTracker::initClick(), vpMeEllipse::initTracking(), vpMeNurbs::initTracking(), vpMeLine::initTracking(), vpDot2::searchDotsInArea(), vpSimulatorAfma6::setPosition(), vpMeEllipse::track(), vpMeLine::track(), vpDot2::trackAndDisplay(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

void vpDisplay::flush ( const vpImage< vpRGBa > &  I)
staticinherited

Flushes the output buffer associated to image I display. It's necessary to use this function to see the results of any drawing.

Warning
This function is particular and must be called to show the overlay. Because it's time spending, use it parcimoniously.
#include <visp3/core/vpDisplay.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/core/vpColor.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpImagePoint.h>
int main() {
vpImage<vpRGBa> I(240, 380);
d.init(I);
vpDisplay::display(I); // display the image
vpImagePoint center;
unsigned int radius = 100;
vpDisplay::flush(I); // Mendatory to display the requested features.
}
See Also
flushROI()

Definition at line 593 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::flushDisplay ( )
protected

Flushes the display buffer. It's necessary to use this function to see the results of any drawing.

Definition at line 742 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, and vpDisplayException::notInitializedError.

Referenced by getClick(), getClickUp(), and getKeyboardEvent().

void vpDisplayGTK::flushDisplayROI ( const vpImagePoint iP,
const unsigned int  width,
const unsigned int  height 
)
protected

Flushes the display buffer. It's necessary to use this function to see the results of any drawing.

Definition at line 761 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, and vpDisplayException::notInitializedError.

void vpDisplay::flushROI ( const vpImage< unsigned char > &  I,
const vpRect roi 
)
staticinherited

Flushes the output buffer associated to image I display. It's necessary to use this function to see the results of any drawing.

Warning
This function is particular and must be called to show the overlay. Because it's time spending, use it parcimoniously.
See Also
flush()
Examples:
testDisplayRoi.cpp.

Definition at line 607 of file vpDisplay_uchar.cpp.

void vpDisplay::flushROI ( const vpImage< vpRGBa > &  I,
const vpRect roi 
)
staticinherited

Flushes the output buffer associated to image I display. It's necessary to use this function to see the results of any drawing.

Warning
This function is particular and must be called to show the overlay. Because it's time spending, use it parcimoniously.
See Also
flush()

Definition at line 607 of file vpDisplay_rgba.cpp.

bool vpDisplayGTK::getClick ( bool  blocking = true)
protected

Wait for a click from one of the mouse button.

Parameters
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
  • true if a button was clicked. This is always the case if blocking is set to true.
  • false if no button was clicked. This can occur if blocking is set to false.

Definition at line 1290 of file vpDisplayGTK.cpp.

References flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplayException::notInitializedError, and vpTime::wait().

bool vpDisplayGTK::getClick ( vpImagePoint ip,
bool  blocking = true 
)
protected

Wait for a click from one of the mouse button and get the position of the clicked image point.

Parameters
ip[out] : The coordinates of the clicked image point.
blocking[in] : true for a blocking behaviour waiting a mouse button click, false for a non blocking behaviour.
Returns
  • true if a button was clicked. This is always the case if blocking is set to true.
  • false if no button was clicked. This can occur if blocking is set to false.

Definition at line 1341 of file vpDisplayGTK.cpp.

References flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpImagePoint::set_u(), vpImagePoint::set_v(), and vpTime::wait().

bool vpDisplayGTK::getClick ( vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
protected

Wait for a mouse button click and get the position of the clicked pixel. The button used to click is also set.

Parameters
ip[out] : The coordinates of the clicked image point.
button[out] : The button used to click.
blocking[in] :
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise. If a button is pressed, the location of the mouse pointer is updated in ip.

Definition at line 1394 of file vpDisplayGTK.cpp.

References vpMouseButton::button1, vpMouseButton::button2, vpMouseButton::button3, flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpImagePoint::set_u(), vpImagePoint::set_v(), and vpTime::wait().

bool vpDisplay::getClick ( const vpImage< unsigned char > &  I,
bool  blocking = true 
)
staticinherited

Wait for a click from one of the mouse button.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
  • true if a button was clicked. This is always the case if blocking is set to true.
  • false if no button was clicked. This can occur if blocking is set to false.
Examples:
BSpline.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grabFlyCapture.cpp, grabOpenCV.cpp, grabRealSense.cpp, grabV4l2MultiCpp11Thread.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, mbtEdgeKltMultiTracking.cpp, mbtEdgeKltTracking.cpp, mbtEdgeMultiTracking.cpp, mbtEdgeTracking.cpp, mbtKltMultiTracking.cpp, mbtKltTracking.cpp, photometricVisualServoing.cpp, planarObjectDetector.cpp, plot2d.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, sonarPioneerReader.cpp, templateTracker.cpp, testClick.cpp, testComedi.cpp, testDisplayRoi.cpp, testDisplays.cpp, testForceTorqueAti.cpp, testImageResize.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint.cpp, testMouseEvent.cpp, testNurbs.cpp, testRealSense.cpp, testSurfKeyPoint.cpp, testTrackDot.cpp, testVideoDevice.cpp, testVideoDeviceDual.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, trackMeNurbs.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-blob-auto-tracker.cpp, tutorial-blob-tracker-live-firewire.cpp, tutorial-blob-tracker-live-v4l2.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-grabber-1394-writer.cpp, tutorial-grabber-1394.cpp, tutorial-grabber-CMU1394.cpp, tutorial-grabber-flycapture.cpp, tutorial-grabber-opencv-threaded.cpp, tutorial-grabber-opencv.cpp, tutorial-grabber-v4l2-threaded.cpp, tutorial-grabber-v4l2.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-filter.cpp, tutorial-image-simulator.cpp, tutorial-image-viewer.cpp, tutorial-klt-tracker-live-v4l2.cpp, tutorial-klt-tracker-with-reinit.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint.cpp, tutorial-matching-surf-deprecated.cpp, tutorial-matching-surf-homography-deprecated.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker-stereo-mono.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-mb-tracker.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-tracking.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, tutorial-template-tracker.cpp, tutorial-video-reader.cpp, tutorial-video-recorder.cpp, tutorial-viewer.cpp, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 657 of file vpDisplay_uchar.cpp.

Referenced by vpDot2::defineDots(), vpDisplay::getClick(), vpPlot::getPixelValue(), vpTemplateTrackerZone::initClick(), vpPolygon::initClick(), vpMbTracker::initClick(), vpMeEllipse::initTracking(), vpMeNurbs::initTracking(), vpMeLine::initTracking(), vpDot2::initTracking(), vpDot::initTracking(), and vpWireFrameSimulator::navigation().

bool vpDisplay::getClick ( const vpImage< unsigned char > &  I,
vpImagePoint ip,
bool  blocking = true 
)
staticinherited

Wait for a click from one of the mouse button and get the position of the clicked image point.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise. If a button is pressed, the location of the mouse pointer is updated in ip.

Definition at line 680 of file vpDisplay_uchar.cpp.

bool vpDisplay::getClick ( const vpImage< unsigned char > &  I,
vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
button[out] : The button used to click.
blocking[in] :
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise. If a button is pressed, the location of the mouse pointer is updated in ip.

Definition at line 705 of file vpDisplay_uchar.cpp.

bool vpDisplay::getClick ( const vpImage< unsigned char > &  I,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
button[out] : The button used to click.
blocking[in] :
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise.

Definition at line 727 of file vpDisplay_uchar.cpp.

References vpDisplay::getClick().

bool vpDisplay::getClick ( const vpImage< vpRGBa > &  I,
bool  blocking = true 
)
staticinherited

Wait for a click from one of the mouse button.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
  • true if a button was clicked. This is always the case if blocking is set to true.
  • false if no button was clicked. This can occur if blocking is set to false.

Definition at line 657 of file vpDisplay_rgba.cpp.

bool vpDisplay::getClick ( const vpImage< vpRGBa > &  I,
vpImagePoint ip,
bool  blocking = true 
)
staticinherited

Wait for a click from one of the mouse button and get the position of the clicked image point.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise. If a button is pressed, the location of the mouse pointer is updated in ip.

Definition at line 680 of file vpDisplay_rgba.cpp.

bool vpDisplay::getClick ( const vpImage< vpRGBa > &  I,
vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
button[out] : The button used to click.
blocking[in] :
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise. If a button is pressed, the location of the mouse pointer is updated in ip.

Definition at line 705 of file vpDisplay_rgba.cpp.

bool vpDisplay::getClick ( const vpImage< vpRGBa > &  I,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
button[out] : The button used to click.
blocking[in] :
  • When set to true, this method waits until a mouse button is pressed and then returns always true.
  • When set to false, returns true only if a mouse button is pressed, otherwise returns false.
Returns
true if a mouse button is pressed, false otherwise.

Definition at line 727 of file vpDisplay_rgba.cpp.

References vpDisplay::getClick().

bool vpDisplayGTK::getClickUp ( vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
protected

Wait for a mouse button click release and get the position of the image point were the click release occurs. The button used to click is also set. Same method as getClick(unsigned int&, unsigned int&, vpMouseButton::vpMouseButtonType &, bool).

Parameters
ip[out] : Position of the clicked image point.
button[in] : Button used to click.
blocking[in] : true for a blocking behaviour waiting a mouse button click, false for a non blocking behaviour.
Returns
  • true if a button was clicked. This is always the case if blocking is set to true.
  • false if no button was clicked. This can occur if blocking is set to false.
See Also
getClick(vpImagePoint &, vpMouseButton::vpMouseButtonType &, bool)

Definition at line 1461 of file vpDisplayGTK.cpp.

References vpMouseButton::button1, vpMouseButton::button2, vpMouseButton::button3, flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpImagePoint::set_u(), vpImagePoint::set_v(), and vpTime::wait().

bool vpDisplay::getClickUp ( const vpImage< unsigned char > &  I,
vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click release and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
button[out] : The clicked button.
blocking[in] :
  • When set to true, this method waits until a mouse button is released and then returns always true.
  • When set to false, returns true only if a mouse button is released, otherwise returns false.
Returns
true if a mouse button is released, false otherwise. If a button is released, the location of the mouse pointer is updated in ip.
Examples:
testClick.cpp.

Definition at line 756 of file vpDisplay_uchar.cpp.

Referenced by vpDisplay::getClickUp(), and vpWireFrameSimulator::navigation().

bool vpDisplay::getClickUp ( const vpImage< unsigned char > &  I,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click release and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
button[out] : The clicked button.
blocking[in] :
  • When set to true, this method waits until a mouse button is released and then returns always true.
  • When set to false, returns true only if a mouse button is released, otherwise returns false.
Returns
true if a mouse button is released, false otherwise.

Definition at line 778 of file vpDisplay_uchar.cpp.

References vpDisplay::getClickUp().

bool vpDisplay::getClickUp ( const vpImage< vpRGBa > &  I,
vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click release and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
button[out] : The clicked button.
blocking[in] :
  • When set to true, this method waits until a mouse button is released and then returns always true.
  • When set to false, returns true only if a mouse button is released, otherwise returns false.
Returns
true if a mouse button is released, false otherwise. If a button is released, the location of the mouse pointer is updated in ip.

Definition at line 756 of file vpDisplay_rgba.cpp.

bool vpDisplay::getClickUp ( const vpImage< vpRGBa > &  I,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
staticinherited

Wait for a mouse button click release and get the position of the clicked image point. The button used to click is also set.

Parameters
I[in] : The displayed image.
button[out] : The clicked button.
blocking[in] :
  • When set to true, this method waits until a mouse button is released and then returns always true.
  • When set to false, returns true only if a mouse button is released, otherwise returns false.
Returns
true if a mouse button is released, false otherwise.

Definition at line 778 of file vpDisplay_rgba.cpp.

References vpDisplay::getClickUp().

unsigned int vpDisplay::getDownScalingFactor ( )
inlineinherited

Return the value of the down scale factor applied to the image in order to reduce the size of the window used to display the image.

Examples:
mbtEdgeKltMultiTracking.cpp, mbtEdgeMultiTracking.cpp, mbtKltMultiTracking.cpp, testKeyPoint-2.cpp, and testKeyPoint-4.cpp.

Definition at line 214 of file vpDisplay.h.

unsigned int vpDisplay::getDownScalingFactor ( const vpImage< unsigned char > &  I)
staticinherited

Return the value of the down scale factor applied to the image in order to reduce the size of the window used to display the image.

Parameters
I: Image associated to the display window.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 1160 of file vpDisplay_uchar.cpp.

unsigned int vpDisplay::getDownScalingFactor ( const vpImage< vpRGBa > &  I)
staticinherited

Return the value of the down scale factor applied to the image in order to reduce the size of the window used to display the image.

Parameters
I: Image associated to the display window.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 1160 of file vpDisplay_rgba.cpp.

unsigned int vpDisplay::getHeight ( ) const
inlineinherited

Return the display height.

See Also
getWidth()

Definition at line 219 of file vpDisplay.h.

void vpDisplayGTK::getImage ( vpImage< vpRGBa > &  I)
virtual
void vpDisplay::getImage ( const vpImage< unsigned char > &  Isrc,
vpImage< vpRGBa > &  Idest 
)
staticinherited

Get the window pixmap and put it in vpRGBa image.

The code below shows how to use this method.

#include <visp3/core/vpConfig.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
#include <visp3/gui/vpDisplayOpenCV.h>
int main()
{
vpImage<unsigned char> I(240, 320); // Create a black grey level image
vpImage<vpRGBa> Ioverlay;
// Depending on the detected third party libraries, we instantiate here the
// first video device which is available
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Draw a red rectangle in the display overlay (foreground)
vpDisplay::displayRectangle(I, 10, 10, 100, 20, vpColor::red, true);
// Flush the foreground and background display
// Updates the color image with the original loaded image and the overlay
vpDisplay::getImage(I, Ioverlay) ;
// Write the color image on the disk
std::string ofilename("overlay.ppm");
vpImageIo::write(Ioverlay, ofilename) ;
// Wait for a click in the display window
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}
Examples:
displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, manGeometricFeatures.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, sonarPioneerReader.cpp, and tutorial-image-viewer.cpp.

Definition at line 155 of file vpDisplay.cpp.

References vpImageConvert::convert(), and vpImage< Type >::display.

Referenced by vpDisplay::getImage().

void vpDisplay::getImage ( const vpImage< vpRGBa > &  Isrc,
vpImage< vpRGBa > &  Idest 
)
staticinherited

Get the window pixmap and put it in vpRGBa image.

The code below shows how to use this method.

#include <visp3/core/vpConfig.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
#include <visp3/gui/vpDisplayOpenCV.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black RGB color image
vpImage<vpRGBa> Ioverlay;
// Depending on the detected third party libraries, we instantiate here the
// first video device which is available
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Draw a red rectangle in the display overlay (foreground)
vpDisplay::displayRectangle(I, 10, 10, 100, 20, vpColor::red, true);
// Flush the foreground and background display
// Updates the color image with the original loaded image and the overlay
vpDisplay::getImage(I, Ioverlay) ;
// Write the color image on the disk
std::string ofilename("overlay.ppm");
vpImageIo::write(Ioverlay, ofilename) ;
// Wait for a click in the display window
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 233 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpDisplay::getImage().

bool vpDisplayGTK::getKeyboardEvent ( bool  blocking = true)
protected

Get a keyboard event.

Parameters
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Definition at line 1583 of file vpDisplayGTK.cpp.

References flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplayException::notInitializedError, and vpTime::wait().

bool vpDisplayGTK::getKeyboardEvent ( std::string &  key,
bool  blocking = true 
)
protected

Get a keyboard event.

Parameters
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
key[out]: If possible, an ISO Latin-1 character corresponding to the keyboard key.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Definition at line 1636 of file vpDisplayGTK.cpp.

References flushDisplay(), vpDisplay::m_displayHasBeenInitialized, vpDisplayException::notInitializedError, and vpTime::wait().

bool vpDisplay::getKeyboardEvent ( const vpImage< unsigned char > &  I,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/core/vpConfig.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<unsigned char> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, false);
if (event) {
std::cout << "A keyboard event was detected" << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 869 of file vpDisplay_uchar.cpp.

bool vpDisplay::getKeyboardEvent ( const vpImage< unsigned char > &  I,
std::string &  key,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
key[out]: If possible, an ISO Latin-1 character corresponding to the keyboard key.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<unsigned char> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
std::string key;
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, key, false);
if (event) {
std::cout << "Key detected: " << key << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 961 of file vpDisplay_uchar.cpp.

bool vpDisplay::getKeyboardEvent ( const vpImage< unsigned char > &  I,
char *  key,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
key[out]: If possible, an ISO Latin-1 character corresponding to the keyboard key.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<unsigned char> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, &key[0], false);
if (event) {
std::cout << "Key detected: " << key << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 1053 of file vpDisplay_uchar.cpp.

bool vpDisplay::getKeyboardEvent ( const vpImage< vpRGBa > &  I,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/core/vpConfig.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, false);
if (event) {
std::cout << "A keyboard event was detected" << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 869 of file vpDisplay_rgba.cpp.

bool vpDisplay::getKeyboardEvent ( const vpImage< vpRGBa > &  I,
std::string &  key,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
key[out]: If possible, an ISO Latin-1 character corresponding to the keyboard key.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
std::string key;
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, key, false);
if (event) {
std::cout << "Key detected: " << key << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 961 of file vpDisplay_rgba.cpp.

bool vpDisplay::getKeyboardEvent ( const vpImage< vpRGBa > &  I,
char *  key,
bool  blocking = true 
)
staticinherited

Get a keyboard event.

Parameters
I[in] : The displayed image.
blocking[in] : Blocking behavior.
  • When set to true, this method waits until a key is pressed and then returns always true.
  • When set to false, returns true only if a key is pressed, otherwise returns false.
key[out]: If possible, an ISO Latin-1 character corresponding to the keyboard key.
Returns
  • true if a key was pressed. This is always the case if blocking is set to true.
  • false if no key was pressed. This can occur if blocking is set to false.

Below you will find an example showing how to use this method.

#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayD3D.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black image
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(VISP_HAVE_OPENCV)
d = new vpDisplayOpenCV;
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Flush the foreground and background display
// Wait for keyboard event
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
// Non blocking keyboard event loop
int cpt_event = 0;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
bool event = vpDisplay::getKeyboardEvent(I, &key[Ø], false);
if (event) {
std::cout << "Key detected: " << key << std::endl;
cpt_event ++;
}
vpTime::wait(5); // wait 5 ms
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}

Definition at line 1053 of file vpDisplay_rgba.cpp.

bool vpDisplayGTK::getPointerMotionEvent ( vpImagePoint ip)
protected

Get the coordinates of the mouse pointer.

Parameters
ip[out] : The coordinates of the mouse pointer.
Returns
true if a pointer motion event was received, false otherwise.
Exceptions
vpDisplayException::notInitializedError: If the display was not initialized.

Definition at line 1684 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpImagePoint::set_u(), and vpImagePoint::set_v().

bool vpDisplay::getPointerMotionEvent ( const vpImage< unsigned char > &  I,
vpImagePoint ip 
)
staticinherited

Get the coordinates of the mouse pointer.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the mouse pointer.
Returns
true if a pointer motion event was received, false otherwise.

Definition at line 1068 of file vpDisplay_uchar.cpp.

bool vpDisplay::getPointerMotionEvent ( const vpImage< vpRGBa > &  I,
vpImagePoint ip 
)
staticinherited

Get the coordinates of the mouse pointer.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the mouse pointer.
Returns
true if a pointer motion event was received, false otherwise.

Definition at line 1068 of file vpDisplay_rgba.cpp.

bool vpDisplayGTK::getPointerPosition ( vpImagePoint ip)
protected

Get the coordinates of the mouse pointer.

Parameters
ip[out] : The coordinates of the mouse pointer.
Returns
true.
Exceptions
vpDisplayException::notInitializedError: If the display was not initialized.

Definition at line 1720 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scale, vpDisplayException::notInitializedError, vpImagePoint::set_u(), and vpImagePoint::set_v().

bool vpDisplay::getPointerPosition ( const vpImage< unsigned char > &  I,
vpImagePoint ip 
)
staticinherited

Get the coordinates of the mouse pointer.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the mouse pointer.
Returns
true.
Examples:
testClick.cpp.

Definition at line 1083 of file vpDisplay_uchar.cpp.

Referenced by vpPlot::getPixelValue(), vpPlot::navigate(), and vpWireFrameSimulator::navigation().

bool vpDisplay::getPointerPosition ( const vpImage< vpRGBa > &  I,
vpImagePoint ip 
)
staticinherited

Get the coordinates of the mouse pointer.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the mouse pointer.
Returns
true.

Definition at line 1083 of file vpDisplay_rgba.cpp.

unsigned int vpDisplayGTK::getScreenDepth ( )

get the window depth (8,16,24,32)

usualy it 24 bits now...

Definition at line 1557 of file vpDisplayGTK.cpp.

unsigned int vpDisplayGTK::getScreenHeight ( )

Gets the screen vertical resolution.

Definition at line 1781 of file vpDisplayGTK.cpp.

References getScreenSize().

void vpDisplayGTK::getScreenSize ( unsigned int &  w,
unsigned int &  h 
)

Gets screen resolution.

Parameters
w,h: Horizontal and vertical screen resolution.

Definition at line 1741 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized.

Referenced by getScreenHeight(), and getScreenWidth().

unsigned int vpDisplayGTK::getScreenWidth ( )

Gets the screen horizontal resolution in pixel.

Definition at line 1771 of file vpDisplayGTK.cpp.

References getScreenSize().

unsigned int vpDisplay::getWidth ( ) const
inlineinherited

Return the display width.

See Also
getHeight()
Examples:
testVideoDeviceDual.cpp.

Definition at line 224 of file vpDisplay.h.

int vpDisplay::getWindowXPosition ( ) const
inlineinherited

Return the position (along the horizontal axis) on the screen of the display window.

See Also
getWindowYPosition()

Definition at line 230 of file vpDisplay.h.

Referenced by vpMbTracker::initClick().

int vpDisplay::getWindowYPosition ( ) const
inlineinherited

Return the position (along the vertical axis) on the screen of the display window.

See Also
getWindowXPosition()

Definition at line 235 of file vpDisplay.h.

Referenced by vpMbTracker::initClick().

void vpDisplayGTK::init ( vpImage< vpRGBa > &  I,
int  x = -1,
int  y = -1,
const std::string &  title = "" 
)

Initialize the display (size, position and title) of a color image in RGBa format.

Parameters
I: Image to be displayed (not that image has to be initialized)
x,y: The window is set at position x,y (column index, row index).
title: Window title.

Definition at line 296 of file vpDisplayGTK.cpp.

References vpImage< Type >::display, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), init(), vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_scaleType, vpDisplay::m_title, vpDisplay::m_windowXPosition, vpDisplay::m_windowYPosition, vpDisplayException::notInitializedError, and vpDisplay::setScale().

void vpDisplayGTK::init ( unsigned int  w,
unsigned int  h,
int  x = -1,
int  y = -1,
const std::string &  title = "" 
)
bool vpDisplay::isInitialised ( )
inlineinherited

Check if the display has been initialised

Returns
True if the display has been initialised, otherwise False

Definition at line 242 of file vpDisplay.h.

void vpDisplay::setBackground ( const vpImage< unsigned char > &  I,
const vpColor color 
)
staticinherited

Set the window background.

Parameters
I: Image associated to the display window.
colorBackground color.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 1098 of file vpDisplay_uchar.cpp.

void vpDisplay::setBackground ( const vpImage< vpRGBa > &  I,
const vpColor color 
)
staticinherited

Set the window background.

Parameters
I: Image associated to the display window.
colorBackground color.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 1098 of file vpDisplay_rgba.cpp.

void vpDisplay::setDownScalingFactor ( unsigned int  scale)
virtualinherited

Set the down scale factor applied to the image in order to reduce the display size.

Parameters
scale: Scale factor applied to display a rescaled image.

Reimplemented in vpDisplayWin32.

Examples:
mbtEdgeKltMultiTracking.cpp, mbtEdgeMultiTracking.cpp, mbtKltMultiTracking.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint.cpp, and tutorial-mb-tracker-stereo.cpp.

Definition at line 248 of file vpDisplay.cpp.

References vpDisplay::m_displayHasBeenInitialized, and vpDisplay::m_scale.

Referenced by vpDisplay::setScale().

void vpDisplay::setDownScalingFactor ( vpScaleType  scaleType)
inherited

Set the down scaling factor either in auto mode or set manually.

This method has to be called before display initialization.

#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGDI.h>
int main()
{
vpImage<unsigned char> I(480, 640); // Black 640 by 480 image
#ifdef VISP_HAVE_X11
#elif defined VISP_HAVE_GDI
#endif
d.setDownScalingFactor(vpDisplay::SCALE_4); // Display in a 160 by 120 windows size
d.init(I);
vpDisplay::getClick(I); // wait for a click to quit
}

Definition at line 340 of file vpDisplay.cpp.

References vpDisplay::m_displayHasBeenInitialized, and vpDisplay::m_scaleType.

void vpDisplayGTK::setFont ( const std::string &  fontname)
protected
Warning
Not implemented yet.

Set the font used to display a text in overlay. The display is performed using displayCharString().

Parameters
fontname: The expected font name.
Note
Under UNIX, to know all the available fonts, use the "xlsfonts" binary in a terminal. You can also use the "xfontsel" binary.
See Also
displayCharString()

Definition at line 478 of file vpDisplayGTK.cpp.

void vpDisplay::setFont ( const vpImage< unsigned char > &  I,
const std::string &  fontname 
)
staticinherited

Set the font of a text printed in the display overlay. To print a text you may use displayCharString().

Parameters
I: Image associated to the display window.
fontname: The expected font name.
Note
Under UNIX, the available fonts are given by the "xlsfonts" binary. To choose a font you can also use the "xfontsel" binary.
See Also
displayText()

Definition at line 1117 of file vpDisplay_uchar.cpp.

Referenced by vpPlot::setFont().

void vpDisplay::setFont ( const vpImage< vpRGBa > &  I,
const std::string &  fontname 
)
staticinherited

Set the font of a text printed in the display overlay. To print a text you may use displayCharString().

Parameters
I: Image associated to the display window.
fontname: The expected font name.
Note
Under UNIX, the available fonts are given by the "xlsfonts" binary. To choose a font you can also use the "xfontsel" binary.
See Also
displayText()

Definition at line 1117 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::setTitle ( const std::string &  title)
protected

Set the window title.

Parameters
title: Window title.

Definition at line 488 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, vpDisplay::m_title, and vpDisplayException::notInitializedError.

void vpDisplay::setTitle ( const vpImage< unsigned char > &  I,
const std::string &  windowtitle 
)
staticinherited
void vpDisplay::setTitle ( const vpImage< vpRGBa > &  I,
const std::string &  windowtitle 
)
staticinherited

Set the windows title.

Note
This functionality is not implemented when vpDisplayOpenCV is used.
Parameters
I: Image associated to the display window.
windowtitle: Window title.

Definition at line 1130 of file vpDisplay_rgba.cpp.

void vpDisplayGTK::setWindowPosition ( int  winx,
int  winy 
)
protected

Set the window position in the screen.

Parameters
winx,winy: Position of the upper-left window's border in the screen.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 511 of file vpDisplayGTK.cpp.

References vpDisplay::m_displayHasBeenInitialized, and vpDisplayException::notInitializedError.

void vpDisplay::setWindowPosition ( const vpImage< unsigned char > &  I,
int  winx,
int  winy 
)
staticinherited

Set the window position in the screen.

Parameters
I: Image associated to the display window.
winx,winy: Position of the upper-left window's border in the screen.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.
Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Definition at line 1145 of file vpDisplay_uchar.cpp.

void vpDisplay::setWindowPosition ( const vpImage< vpRGBa > &  I,
int  winx,
int  winy 
)
staticinherited

Set the window position in the screen.

Parameters
I: Image associated to the display window.
winx,winy: Position of the upper-left window's border in the screen.
Exceptions
vpDisplayException::notInitializedError: If the video device is not initialized.

Definition at line 1145 of file vpDisplay_rgba.cpp.

Member Data Documentation

bool vpDisplay::m_displayHasBeenInitialized
protectedinherited

display has been initialized

Definition at line 190 of file vpDisplay.h.

Referenced by vpDisplayX::clearDisplay(), vpDisplayWin32::closeDisplay(), closeDisplay(), vpDisplayX::closeDisplay(), vpDisplayOpenCV::closeDisplay(), displayArrow(), vpDisplayX::displayArrow(), vpDisplayOpenCV::displayArrow(), displayCharString(), vpDisplayX::displayCharString(), vpDisplayOpenCV::displayCharString(), displayCircle(), vpDisplayX::displayCircle(), vpDisplayOpenCV::displayCircle(), displayCross(), vpDisplayX::displayCross(), vpDisplayOpenCV::displayCross(), displayDotLine(), vpDisplayX::displayDotLine(), vpDisplayOpenCV::displayDotLine(), displayImage(), vpDisplayX::displayImage(), vpDisplayOpenCV::displayImage(), displayImageROI(), vpDisplayX::displayImageROI(), vpDisplayOpenCV::displayImageROI(), displayLine(), vpDisplayX::displayLine(), vpDisplayOpenCV::displayLine(), displayPoint(), vpDisplayX::displayPoint(), vpDisplayOpenCV::displayPoint(), displayRectangle(), vpDisplayX::displayRectangle(), vpDisplayOpenCV::displayRectangle(), flushDisplay(), vpDisplayX::flushDisplay(), vpDisplayOpenCV::flushDisplay(), flushDisplayROI(), vpDisplayX::flushDisplayROI(), vpDisplayOpenCV::flushDisplayROI(), getClick(), vpDisplayX::getClick(), vpDisplayOpenCV::getClick(), getClickUp(), vpDisplayX::getClickUp(), vpDisplayOpenCV::getClickUp(), getImage(), vpDisplayX::getImage(), getKeyboardEvent(), vpDisplayX::getKeyboardEvent(), vpDisplayOpenCV::getKeyboardEvent(), getPointerMotionEvent(), vpDisplayX::getPointerMotionEvent(), vpDisplayOpenCV::getPointerMotionEvent(), getPointerPosition(), vpDisplayX::getPointerPosition(), vpDisplayOpenCV::getPointerPosition(), getScreenSize(), vpDisplayWin32::init(), init(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpDisplay::setDownScalingFactor(), vpDisplayX::setFont(), setTitle(), vpDisplayX::setTitle(), setWindowPosition(), vpDisplayOpenCV::setWindowPosition(), vpDisplayX::setWindowPosition(), vpDisplay::vpDisplay(), and vpDisplay::~vpDisplay().

vpScaleType vpDisplay::m_scaleType
protectedinherited