ViSP  2.6.2
vpDisplay Class Referenceabstract

#include <vpDisplay.h>

+ Inheritance diagram for vpDisplay:

Public Member Functions

virtual ~vpDisplay ()
 
virtual void setFont (const char *font)=0
 
virtual void setTitle (const char *title)=0
 
virtual void setWindowPosition (int winx, int winy)=0
 
virtual void clearDisplay (const vpColor &color=vpColor::white)=0
 
virtual void closeDisplay ()=0
 
virtual void init (vpImage< unsigned char > &I, int x=-1, int y=-1, const char *title=NULL)=0
 
virtual void init (vpImage< vpRGBa > &I, int x=-1, int y=-1, const char *title=NULL)=0
 
virtual void init (unsigned int width, unsigned int height, int x=-1, int y=-1, const char *title=NULL)=0
 
virtual void displayImage (const vpImage< unsigned char > &I)=0
 
virtual void displayImage (const vpImage< vpRGBa > &I)=0
 
virtual void displayImageROI (const vpImage< unsigned char > &I, const vpImagePoint &iP, const unsigned int width, const unsigned int height)=0
 
virtual void displayImageROI (const vpImage< vpRGBa > &I, const vpImagePoint &iP, const unsigned int width, const unsigned int height)=0
 
virtual void flushDisplay ()=0
 
virtual void flushDisplayROI (const vpImagePoint &iP, const unsigned int width, const unsigned int height)=0
 
bool isInitialised ()
 
virtual bool getClick (bool blocking=true)=0
 
virtual bool getClick (vpImagePoint &ip, bool blocking=true)=0
 
virtual bool getClick (vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)=0
 
virtual bool getClickUp (vpImagePoint &ip, vpMouseButton::vpMouseButtonType &button, bool blocking=true)=0
 
virtual bool getKeyboardEvent (bool blocking=true)=0
 
virtual bool getKeyboardEvent (char *string, bool blocking=true)=0
 
virtual bool getPointerMotionEvent (vpImagePoint &ip)=0
 
virtual bool getPointerPosition (vpImagePoint &ip)=0
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 

Static Public Member Functions

Display functionalities on gray level images.
static void setFont (const vpImage< unsigned char > &I, const char *font)
 
static void setTitle (const vpImage< unsigned char > &I, const char *windowtitle)
 
static void setWindowPosition (const vpImage< unsigned char > &I, int winx, int winy)
 
static void setBackground (const vpImage< unsigned char > &I, const vpColor &color)
 
static void close (const vpImage< unsigned char > &I)
 
static void display (const vpImage< unsigned char > &I)
 
static void displayROI (const vpImage< unsigned char > &I, const vpRect &roi)
 
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 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 displayFrame (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness=1)
 
static void displayCamera (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color)
 
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)
 
static void displayPoint (const vpImage< unsigned char > &I, int i, int j, const vpColor &color)
 
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 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 getClickUp (const vpImage< unsigned char > &I, vpImagePoint &ip, 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, char *string, bool blocking=true)
 
static bool getPointerMotionEvent (const vpImage< unsigned char > &I, vpImagePoint &ip)
 
static bool getPointerPosition (const vpImage< unsigned char > &I, vpImagePoint &ip)
 

Protected Member Functions

 vpDisplay ()
 
virtual 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)=0
 
virtual void displayCharString (const vpImagePoint &ip, const char *text, const vpColor &color=vpColor::green)=0
 
virtual void displayCircle (const vpImagePoint &center, unsigned int radius, const vpColor &color, bool fill=false, unsigned int thickness=1)=0
 
virtual void displayCross (const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)=0
 
virtual void displayDotLine (const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)=0
 
virtual void displayLine (const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)=0
 
virtual void displayPoint (const vpImagePoint &ip, const vpColor &color)=0
 
virtual void displayRectangle (const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)=0
 
virtual void displayRectangle (const vpImagePoint &topLeft, const vpImagePoint &bottomRight, const vpColor &color, bool fill=false, unsigned int thickness=1)=0
 
virtual void displayRectangle (const vpRect &rectangle, const vpColor &color, bool fill=false, unsigned int thickness=1)=0
 

Protected Attributes

bool displayHasBeenInitialized
 
int windowXPosition
 
int windowYPosition
 
char * title
 
char * font
 
unsigned int width
 
unsigned int height
 

Display functionalities on color images.

static void setFont (const vpImage< vpRGBa > &I, const char *font)
 
static void setTitle (const vpImage< vpRGBa > &I, const char *windowtitle)
 
static void setWindowPosition (const vpImage< vpRGBa > &I, int winx, int winy)
 
static void setBackground (const vpImage< vpRGBa > &I, const vpColor &color)
 
static void close (const vpImage< vpRGBa > &I)
 
static void display (const vpImage< vpRGBa > &I)
 
static void displayROI (const vpImage< vpRGBa > &I, const vpRect &roi)
 
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 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 displayFrame (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness=1)
 
static void displayCamera (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color)
 
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)
 
static void displayPoint (const vpImage< vpRGBa > &I, int i, int j, const vpColor &color)
 
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 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 getClickUp (const vpImage< vpRGBa > &I, vpImagePoint &ip, 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, char *string, bool blocking=true)
 
static bool getPointerMotionEvent (const vpImage< vpRGBa > &I, vpImagePoint &ip)
 
static bool getPointerPosition (const vpImage< vpRGBa > &I, vpImagePoint &ip)
 

Detailed Description

Class that defines generic functionnalities for display.

The example below shows how to use this class.

#include <visp/vpConfig.h>
#include <visp/vpImageIo.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
#include <visp/vpDisplayOpenCV.h>
int main()
{
vpImage<unsigned char> I; // Grey level image
// Read an image in PGM P5 format
#ifdef UNIX
//vpImageIo::readPGM(I, "/local/soft/ViSP/ViSP-images/Klimt/Klimt.pgm");
vpImageIo::readPGM(I, "/tmp/Klimt.pgm");
#elif WIN32
vpImageIo::readPGM(I, "C:/temp/ViSP-images/Klimt/Klimt.pgm");
#endif
// 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.
d->init(I);
// Specify the window location
// Set the display window title
vpDisplay::setTitle(I, "My image");
// To initialize the video device, it is also possible to replace
// the 3 previous lines by:
// d->init(I, 400, 100, "My image");
// 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]; sprintf(key, "\0");
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;
delete d;
}
Examples:
SickLDMRS-Process.cpp, testClick.cpp, testFeatureSegment.cpp, testMouseEvent.cpp, testVideoDevice.cpp, and testVideoDeviceDual.cpp.

Definition at line 167 of file vpDisplay.h.

Constructor & Destructor Documentation

vpDisplay::vpDisplay ( )
protected

Default constructor.

Definition at line 59 of file vpDisplay.cpp.

References displayHasBeenInitialized, and title.

virtual vpDisplay::~vpDisplay ( )
inlinevirtual

Destructor.

Definition at line 314 of file vpDisplay.h.

Member Function Documentation

virtual void vpDisplay::clearDisplay ( const vpColor color = vpColor::white)
pure virtual

Set the window backgroud to color.

Parameters
color: Background color.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by setBackground().

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

Close the display attached to I.

Definition at line 2346 of file vpDisplay.cpp.

References closeDisplay(), vpImage< Type >::display, and vpERROR_TRACE.

virtual void vpDisplay::closeDisplay ( )
pure virtual

Close the window.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by close().

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

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(), close()
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, calibrate2dGrid.cpp, displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grab1394Two.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, grabDisk.cpp, grabOpenCV-2.cpp, grabOpenCV.cpp, grabV4l2.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, mbtTracking.cpp, Nurbs.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, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, testClick.cpp, testDisplays.cpp, testFeatureSegment.cpp, testMouseEvent.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, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 186 of file vpDisplay.cpp.

References vpImage< Type >::display, displayImage(), and vpERROR_TRACE.

Referenced by vpDot2::defineDots(), vpWireFrameSimulator::getExternalImage(), vpWireFrameSimulator::getInternalImage(), vpPlot::init(), vpMbTracker::initClick(), vpSimulatorAfma6::setPosition(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

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

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(), close()

Definition at line 2138 of file vpDisplay.cpp.

References vpImage< Type >::display, displayImage(), vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

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

Parameters
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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, and testDisplays.cpp.

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

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 
)
static

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 570 of file vpDisplay.cpp.

References vpImage< Type >::display, displayArrow(), and vpERROR_TRACE.

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 
)
static

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 631 of file vpDisplay.cpp.

References vpImage< Type >::display, displayArrow(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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 
)
static

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 600 of file vpDisplay.cpp.

References vpImage< Type >::display, displayArrow(), and vpERROR_TRACE.

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 
)
static

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 669 of file vpDisplay.cpp.

References vpImage< Type >::display, displayArrow(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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.

Definition at line 482 of file vpDisplay.cpp.

References vpMeterPixelConversion::convertPoint(), displayLine(), and vpPoint::setWorldCoordinates().

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 
)
static

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.

Definition at line 532 of file vpDisplay.cpp.

References vpMeterPixelConversion::convertPoint(), displayLine(), and vpPoint::setWorldCoordinates().

virtual void vpDisplay::displayCharString ( const vpImagePoint ip,
const char *  text,
const vpColor color = vpColor::green 
)
protectedpure virtual

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()

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
calibrate2dGrid.cpp, displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, manDisplay.cpp, mbtTracking.cpp, planarObjectDetector.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, sonarPioneerReader.cpp, and testDisplays.cpp.

Referenced by vpKltOpencv::display(), displayCharString(), and vpMbTracker::initClick().

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

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.
string: String to display in overlay.
color: String color.
See also
setFont()

Definition at line 710 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCharString(), and vpERROR_TRACE.

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

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.
string: String to display in overlay.
color: String color.
See also
setFont()

Definition at line 776 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCharString(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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.
string: String to display in overlay.
color: String color.
See also
setFont()

Definition at line 743 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCharString(), and vpERROR_TRACE.

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

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.
string: String to display in overlay.
color: String color.
See also
setFont()

Definition at line 813 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCharString(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

Display a circle.

Parameters
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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, and testDisplays.cpp.

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

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

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 845 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCircle(), and vpERROR_TRACE.

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 
)
static

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 907 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCircle(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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 875 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCircle(), and vpERROR_TRACE.

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

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 945 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCircle(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

virtual void vpDisplay::displayCross ( const vpImagePoint ip,
unsigned int  size,
const vpColor color,
unsigned int  thickness = 1 
)
protectedpure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, Nurbs.cpp, poseVirtualVS.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityInteractionCurrent.cpp, servoAfma6FourPoints2DCamVelocityInteractionDesired.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Segment2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, sonarPioneerReader.cpp, testDisplays.cpp, trackDot.cpp, trackDot2.cpp, and trackDot2WithAutoDetection.cpp.

Referenced by vpDot2::defineDots(), vpDot::display(), vpPlanarObjectDetector::display(), vpKeyPointSurf::display(), vpDot2::display(), vpMeNurbs::display(), vpMeLine::display(), vpMeSite::display(), vpFernClassifier::display(), vpKltOpencv::display(), vpMeEllipse::display(), displayCross(), vpCalibration::displayData(), vpCalibration::displayGrid(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpMeSite::getQueryList(), vpMbTracker::initClick(), vpPolygon::initClick(), vpMeNurbs::initTracking(), vpMeLine::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), and vpDot2::track().

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

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 976 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCross(), and vpERROR_TRACE.

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

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 1029 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCross(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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 1003 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCross(), and vpERROR_TRACE.

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

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 1060 of file vpDisplay.cpp.

References vpImage< Type >::display, displayCross(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

virtual void vpDisplay::displayDotLine ( const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
protectedpure virtual

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

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

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, and testDisplays.cpp.

Referenced by displayDotLine(), and vpDot2::trackAndDisplay().

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

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 1089 of file vpDisplay.cpp.

References vpImage< Type >::display, displayDotLine(), and vpERROR_TRACE.

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

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 1144 of file vpDisplay.cpp.

References vpImage< Type >::display, displayDotLine(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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 1116 of file vpDisplay.cpp.

References vpImage< Type >::display, displayDotLine(), and vpERROR_TRACE.

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

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 1176 of file vpDisplay.cpp.

References vpImage< Type >::display, displayDotLine(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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
Examples:
mbtTracking.cpp, servoSimu4Points.cpp, servoSimuCylinder.cpp, and servoSimuSphere.cpp.

Definition at line 346 of file vpDisplay.cpp.

References vpColor::blue, vpMeterPixelConversion::convertPoint(), displayArrow(), vpColor::green, vpColor::none, vpTracker::p, vpColor::red, vpPoint::setWorldCoordinates(), and vpForwardProjection::track().

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,
unsigned int  thickness = 1 
)
static

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

Definition at line 416 of file vpDisplay.cpp.

References vpColor::blue, vpMeterPixelConversion::convertPoint(), displayArrow(), vpColor::green, vpColor::none, vpTracker::p, vpColor::red, vpPoint::setWorldCoordinates(), and vpForwardProjection::track().

virtual void vpDisplay::displayImage ( const vpImage< unsigned char > &  I)
pure virtual

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()

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by display().

virtual void vpDisplay::displayImage ( const vpImage< vpRGBa > &  I)
pure virtual

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()

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

virtual void vpDisplay::displayImageROI ( const vpImage< unsigned char > &  I,
const vpImagePoint iP,
const unsigned int  width,
const unsigned int  height 
)
pure virtual

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by displayROI().

virtual void vpDisplay::displayImageROI ( const vpImage< vpRGBa > &  I,
const vpImagePoint iP,
const unsigned int  width,
const unsigned int  height 
)
pure virtual
void vpDisplay::displayLine ( const vpImage< unsigned char > &  I,
const vpImagePoint ip1,
const vpImagePoint ip2,
const vpColor color,
unsigned int  thickness = 1 
)
static

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 1208 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), and vpERROR_TRACE.

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

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 1238 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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

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 1306 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), and vpERROR_TRACE.

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

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 1273 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

virtual void vpDisplay::displayPoint ( const vpImagePoint ip,
const vpColor color 
)
protectedpure virtual
void vpDisplay::displayPoint ( const vpImage< unsigned char > &  I,
const vpImagePoint ip,
const vpColor color 
)
static

Display a point at the image point ip location.

Parameters
I: The image associated to the display.
ip: Point location.
color: Point color.

Definition at line 1333 of file vpDisplay.cpp.

References vpImage< Type >::display, displayPoint(), and vpERROR_TRACE.

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

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.

Definition at line 1380 of file vpDisplay.cpp.

References vpImage< Type >::display, displayPoint(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

void vpDisplay::displayPoint ( const vpImage< vpRGBa > &  I,
const vpImagePoint ip,
const vpColor color 
)
static

Display a point at the image point ip location.

Parameters
I: The image associated to the display.
ip: Point location.
color: Point color.

Definition at line 1356 of file vpDisplay.cpp.

References vpImage< Type >::display, displayPoint(), and vpERROR_TRACE.

void vpDisplay::displayPoint ( const vpImage< vpRGBa > &  I,
int  i,
int  j,
const vpColor color 
)
static

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.

Definition at line 1408 of file vpDisplay.cpp.

References vpImage< Type >::display, displayPoint(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

virtual void vpDisplay::displayRectangle ( const vpImagePoint topLeft,
unsigned int  width,
unsigned int  height,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protectedpure virtual

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.
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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, fernClassifier.cpp, keyPointSurf.cpp, manDisplay.cpp, planarObjectDetector.cpp, testDisplays.cpp, and testSurfKeyPoint.cpp.

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

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

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.
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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

virtual void vpDisplay::displayRectangle ( const vpRect rectangle,
const vpColor color,
bool  fill = false,
unsigned int  thickness = 1 
)
protectedpure virtual

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

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

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 
)
static

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 1444 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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

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 1481 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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

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 1516 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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 
)
static

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 1552 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_u(), vpImagePoint::set_v(), and vpERROR_TRACE.

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 
)
static

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 1770 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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 
)
static

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 1810 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::set_u(), vpImagePoint::set_v(), and vpERROR_TRACE.

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 
)
static

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 1607 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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

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 1642 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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

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 1677 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), and vpERROR_TRACE.

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 
)
static

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 1713 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_u(), vpImagePoint::set_v(), and vpERROR_TRACE.

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 
)
static

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 1862 of file vpDisplay.cpp.

References vpImage< Type >::display, displayRectangle(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpERROR_TRACE.

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 
)
static

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 1901 of file vpDisplay.cpp.

References vpImage< Type >::display, displayLine(), vpImagePoint::set_u(), vpImagePoint::set_v(), and vpERROR_TRACE.

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

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 <visp/vpDisplay.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpColor.h>
#include <visp/vpImage.h>
#include <visp/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.
}
Examples:
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, calibrate2dGrid.cpp, displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grab1394Two.cpp, grabDirectShow.cpp, grabDirectShowMulti.cpp, grabDisk.cpp, grabOpenCV-2.cpp, grabOpenCV.cpp, grabV4l2.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, mbtTracking.cpp, Nurbs.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, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, SickLDMRS-Process.cpp, sonarPioneerReader.cpp, testClick.cpp, testDisplays.cpp, testFeatureSegment.cpp, testMouseEvent.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, videoReader.cpp, and wireframeSimulator.cpp.

Definition at line 1964 of file vpDisplay.cpp.

References vpImage< Type >::display, flushDisplay(), and vpERROR_TRACE.

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

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

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 <visp/vpDisplay.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpColor.h>
#include <visp/vpImage.h>
#include <visp/vpImagePoint.h>
#include <visp/vpRGBa.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.
}

Definition at line 2309 of file vpDisplay.cpp.

References vpImage< Type >::display, flushDisplay(), and vpERROR_TRACE.

virtual void vpDisplay::flushDisplay ( )
pure virtual

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

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by flush().

virtual void vpDisplay::flushDisplayROI ( const vpImagePoint iP,
const unsigned int  width,
const unsigned int  height 
)
pure virtual

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

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by flushROI().

void vpDisplay::flushROI ( const vpImage< unsigned char > &  I,
const vpRect roi 
)
static
void vpDisplay::flushROI ( const vpImage< vpRGBa > &  I,
const vpRect roi 
)
static
virtual bool vpDisplay::getClick ( bool  blocking = true)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
BSpline.cpp, calibrate2dGrid.cpp, displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displaySequence.cpp, displayX.cpp, displayXMulti.cpp, fernClassifier.cpp, grab1394CMU.cpp, grabOpenCV-2.cpp, imageSequenceReader.cpp, keyPointSurf.cpp, kinectAcquisition.cpp, manDisplay.cpp, manGeometricFeatures.cpp, mbtTracking.cpp, Nurbs.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, testClick.cpp, testDisplays.cpp, testMouseEvent.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, videoReader.cpp, and wireframeSimulator.cpp.

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

virtual bool vpDisplay::getClick ( vpImagePoint ip,
bool  blocking = true 
)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

virtual bool vpDisplay::getClick ( vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

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

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 2380 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

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 2422 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

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 2466 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

Wait for a click.

Parameters
I[in] : The displayed image.
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 2810 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

Return true when a mouse button is pressed.

Parameters
I[in] : The displayed image.
ip[out] : The coordinates of the clicked image point.
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 2851 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

Return true when a mouse button is pressed.

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 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 2894 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

virtual bool vpDisplay::getClickUp ( vpImagePoint ip,
vpMouseButton::vpMouseButtonType button,
bool  blocking = true 
)
pure virtual

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)

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
testClick.cpp.

Referenced by vpWireFrameSimulator::navigation().

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

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 2513 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

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

Return true when a mouse button is released.

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 2940 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

unsigned int vpDisplay::getHeight ( ) const
inline

Return the display height.

See also
getWidth()

Definition at line 588 of file vpDisplay.h.

void vpDisplay::getImage ( const vpImage< unsigned char > &  Isrc,
vpImage< vpRGBa > &  Idest 
)
static

Get the window pixmap and put it in vpRGBa image.

The code below shows how to use this method.

#include <visp/vpConfig.h>
#include <visp/vpImageIo.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
#include <visp/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.
d->init(I);
// 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::writePPM(Ioverlay, ofilename) ;
// Wait for a click in the display window
delete d;
}
Examples:
displayD3D.cpp, displayGDI.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, manGeometricFeatures.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, and sonarPioneerReader.cpp.

Definition at line 300 of file vpDisplay.cpp.

References vpImage< Type >::display, vpDisplayException::notInitializedError, and vpERROR_TRACE.

Referenced by getImage().

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

Get the window pixmap and put it in vpRGBa image.

The code below shows how to use this method.

#include <visp/vpConfig.h>
#include <visp/vpImageIo.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
#include <visp/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.
d->init(I);
// 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::writePPM(Ioverlay, ofilename) ;
// Wait for a click in the display window
delete d;
}

Definition at line 2257 of file vpDisplay.cpp.

References vpImage< Type >::display, getImage(), vpDisplayException::notInitializedError, and vpERROR_TRACE.

virtual bool vpDisplay::getKeyboardEvent ( bool  blocking = true)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

virtual bool vpDisplay::getKeyboardEvent ( char *  string,
bool  blocking = true 
)
pure virtual

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.
string[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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

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

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 <visp/vpConfig.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/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.
d->init(I);
// 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;
bool event;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
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);
delete d;
}

Definition at line 2619 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

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

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.
string[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 <visp/vpConfig.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/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.
d->init(I);
// 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;
bool event;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
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);
delete d;
}

Definition at line 2722 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

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

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 <visp/vpConfig.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black RGB color 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.
d->init(I);
// 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;
bool event;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
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);
delete d;
}

Definition at line 3046 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

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

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.
string[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 <visp/vpConfig.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
int main()
{
vpImage<vpRGBa> I(240, 320); // Create a black RGB color 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.
d->init(I);
// 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;
bool event;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
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);
delete d;
}

Definition at line 3149 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

virtual bool vpDisplay::getPointerMotionEvent ( vpImagePoint ip)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

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

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 2750 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

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

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 3177 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

virtual bool vpDisplay::getPointerPosition ( vpImagePoint ip)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
testClick.cpp.

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

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

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 2779 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

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

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 3204 of file vpDisplay.cpp.

References vpImage< Type >::display, and vpERROR_TRACE.

unsigned int vpDisplay::getWidth ( ) const
inline

Return the display width.

See also
getHeight()

Definition at line 583 of file vpDisplay.h.

virtual void vpDisplay::init ( vpImage< unsigned char > &  I,
int  x = -1,
int  y = -1,
const char *  title = NULL 
)
pure virtual

Initialize the display (size, position and title) of a gray level image.

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
SickLDMRS-Process.cpp, testClick.cpp, testFeatureSegment.cpp, testMouseEvent.cpp, testVideoDevice.cpp, and testVideoDeviceDual.cpp.

Referenced by vpPlot::init().

virtual void vpDisplay::init ( vpImage< vpRGBa > &  I,
int  x = -1,
int  y = -1,
const char *  title = NULL 
)
pure virtual

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.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

virtual void vpDisplay::init ( unsigned int  width,
unsigned int  height,
int  x = -1,
int  y = -1,
const char *  title = NULL 
)
pure virtual

Initialize the display size, position and title.

Parameters
width,height: Width and height of the window.
x,y: The window is set at position x,y (column index, row index).
title: Window title.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

bool vpDisplay::isInitialised ( )
inline

Check if the display has been initialised

Returns
True if the display has been initialised, otherwise False

Definition at line 434 of file vpDisplay.h.

Referenced by vpPlot::setFont().

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

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 158 of file vpDisplay.cpp.

References clearDisplay(), vpImage< Type >::display, and vpERROR_TRACE.

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

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 2110 of file vpDisplay.cpp.

References clearDisplay(), vpImage< Type >::display, and vpERROR_TRACE.

virtual void vpDisplay::setFont ( const char *  font)
pure virtual

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

Parameters
font: The expected font name. The available fonts are given by the "xlsfonts" binary. To choose a font you can also use the "xfontsel" binary.
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()

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Referenced by vpPlot::setFont(), and setFont().

void vpDisplay::setFont ( const vpImage< unsigned char > &  I,
const char *  fontname 
)
static

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
displayCharString()

Definition at line 79 of file vpDisplay.cpp.

References vpImage< Type >::display, setFont(), and vpERROR_TRACE.

void vpDisplay::setFont ( const vpImage< vpRGBa > &  I,
const char *  fontname 
)
static

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
displayCharString()

Definition at line 2083 of file vpDisplay.cpp.

References vpImage< Type >::display, setFont(), and vpERROR_TRACE.

virtual void vpDisplay::setTitle ( const char *  title)
pure virtual

Set the window title.

Parameters
title: Window title.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
calibrate2dGrid.cpp.

Referenced by setTitle().

void vpDisplay::setTitle ( const vpImage< unsigned char > &  I,
const char *  windowtitle 
)
static

Set the windows title.

Parameters
I: Image associated to the display window.
windowtitle: Window title.

Definition at line 102 of file vpDisplay.cpp.

References vpImage< Type >::display, setTitle(), and vpERROR_TRACE.

void vpDisplay::setTitle ( const vpImage< vpRGBa > &  I,
const char *  windowtitle 
)
static

Set the windows title.

Parameters
I: Image associated to the display window.
windowtitle: Window title.

Definition at line 2025 of file vpDisplay.cpp.

References vpImage< Type >::display, setTitle(), and vpERROR_TRACE.

virtual void vpDisplay::setWindowPosition ( int  winx,
int  winy 
)
pure virtual

Set the window position in the screen.

Parameters
winx,winy: Position of the upper-left window's border in the screen.

Implemented in vpDisplayGTK, vpDisplayOpenCV, vpDisplayX, and vpDisplayWin32.

Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Referenced by setWindowPosition().

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

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 130 of file vpDisplay.cpp.

References vpImage< Type >::display, setWindowPosition(), and vpERROR_TRACE.

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

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 2052 of file vpDisplay.cpp.

References vpImage< Type >::display, setWindowPosition(), and vpERROR_TRACE.

Member Data Documentation

bool vpDisplay::displayHasBeenInitialized
protected

display has been initialized

Definition at line 171 of file vpDisplay.h.

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

char* vpDisplay::font
protected

Definition at line 178 of file vpDisplay.h.

int vpDisplay::windowXPosition
protected

display position

Definition at line 173 of file vpDisplay.h.

Referenced by vpDisplayX::init(), and vpDisplayX::vpDisplayX().

int vpDisplay::windowYPosition
protected

display position

Definition at line 175 of file vpDisplay.h.

Referenced by vpDisplayX::init(), and vpDisplayX::vpDisplayX().