Visual Servoing Platform  version 3.6.1 under development (2024-04-27)
drawingHelpers Namespace Reference

Functions

void init (vpImage< unsigned char > &Iinput, vpImage< unsigned char > &IcannyVisp, vpImage< unsigned char > *p_dIx, vpImage< unsigned char > *p_dIy, vpImage< unsigned char > *p_IcannyimgFilter)
 
void display (vpImage< unsigned char > &I, const std::string &title)
 
bool waitForClick (const vpImage< unsigned char > &I, const bool &blockingMode)
 
bool display (vpImage< vpRGBa > &I, const std::string &title, const bool &blockingMode)
 
bool display (vpImage< unsigned char > &I, const std::string &title, const bool &blockingMode)
 
bool display (vpImage< double > &D, const std::string &title, const bool &blockingMode)
 

Variables

vpDisplayX d_Iinput
 
vpDisplayX d_dIx
 
vpDisplayX d_dIy
 
vpDisplayX d_IcannyVisp
 
vpDisplayX d_IcannyImgFilter
 
vpDisplayX d
 
vpImage< vpRGBaI_disp
 

Function Documentation

◆ display() [1/4]

bool drawingHelpers::display ( vpImage< double > &  D,
const std::string &  title,
const bool &  blockingMode 
)

Definition at line 53 of file drawingHelpers.cpp.

References vpImageConvert::convert(), and display().

◆ display() [2/4]

void drawingHelpers::display ( vpImage< unsigned char > &  I,
const std::string &  title 
)

Display a gray-scale image.

Parameters
[out]IThe gray-scale image to display.
[in]titleThe title of the window.
Examples
tutorial-circle-hough.cpp.

Definition at line 91 of file drawingHelpers.cpp.

References vpDisplay::display(), vpDisplay::flush(), and vpDisplay::setTitle().

Referenced by display().

◆ display() [3/4]

bool drawingHelpers::display ( vpImage< unsigned char > &  I,
const std::string &  title,
const bool &  blockingMode 
)

Definition at line 46 of file drawingHelpers.cpp.

References vpImageConvert::convert(), and display().

◆ display() [4/4]

bool drawingHelpers::display ( vpImage< vpRGBa > &  I,
const std::string &  title,
const bool &  blockingMode 
)

◆ init()

void drawingHelpers::init ( vpImage< unsigned char > &  Iinput,
vpImage< unsigned char > &  IcannyVisp,
vpImage< unsigned char > *  p_dIx,
vpImage< unsigned char > *  p_dIy,
vpImage< unsigned char > *  p_IcannyimgFilter 
)

Initialize the different displays.

Parameters
[out]IinputInput image of the program.
[out]IcannyVispImage resulting from the vpCannyEdgeDetection method.
[out]p_dIxIf different from nullptr, pointer towards the gradient along the horizontal axis.
[out]p_dIyIf different from nullptr, pointer towards the gradient along the vertical axis.
[out]p_IcannyimgFilterIf different from nullptr, pointer towards the result of the vpImageFilter::canny method.

Definition at line 67 of file drawingHelpers.cpp.

References d_dIx, d_dIy, d_IcannyImgFilter, d_IcannyVisp, d_Iinput, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpDisplayX::init().

◆ waitForClick()

bool drawingHelpers::waitForClick ( const vpImage< unsigned char > &  I,
const bool &  blockingMode 
)

Catch the user clicks to know if the user wants to stop the program.

Parameters
[in]IThe gray-scale image to display.
[in]blockingModeIf true, wait for a click to switch to the next image.
Returns
true The user wants to continue the application.
false The user wants to stop the application.

Definition at line 98 of file drawingHelpers.cpp.

References vpMouseButton::button3, vpDisplay::displayText(), vpDisplay::flush(), vpDisplay::getClick(), and vpColor::red.

Variable Documentation

◆ d

vpDisplayX drawingHelpers::d
extern

Definition at line 6 of file drawingHelpers.cpp.

◆ d_dIx

vpDisplayX drawingHelpers::d_dIx
extern

Definition at line 37 of file drawingHelpers.cpp.

Referenced by init().

◆ d_dIy

vpDisplayX drawingHelpers::d_dIy
extern

Definition at line 38 of file drawingHelpers.cpp.

Referenced by init().

◆ d_IcannyImgFilter

vpDisplayX drawingHelpers::d_IcannyImgFilter
extern

Definition at line 40 of file drawingHelpers.cpp.

Referenced by init().

◆ d_IcannyVisp

vpDisplayX drawingHelpers::d_IcannyVisp
extern

Definition at line 39 of file drawingHelpers.cpp.

Referenced by init().

◆ d_Iinput

vpDisplayX drawingHelpers::d_Iinput
extern

Definition at line 36 of file drawingHelpers.cpp.

Referenced by init().

◆ I_disp

vpImage< vpRGBa > drawingHelpers::I_disp
extern

Definition at line 17 of file drawingHelpers.cpp.

Referenced by display().