licornea_tools
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tlz::viewer Class Reference

#include <viewer.h>

Classes

class  int_slider
 
class  real_slider
 
class  slider_base
 

Public Types

enum  text_alignment { left, center, right }
 

Public Member Functions

 viewer (const std::string &title, int width, int height, bool resizeable=false)
 
 viewer (const std::string &title, cv::Size sz, bool resizeable=false)
 
 viewer (int width, int height, bool resizeable=false)
 
 viewer (cv::Size sz, bool resizeable=false)
 
 viewer (const std::string &title, bool resizeable=false)
 
 viewer (const viewer &)=delete
 
 ~viewer ()
 
vieweroperator= (const viewer &)=delete
 
int_slideradd_int_slider (const std::string &caption, int default_val, int min_val, int max_val, int step=1)
 
real_slideradd_real_slider (const std::string &caption, real default_val, real min_val, real max_val, int steps=100)
 
int width () const
 
int height () const
 
void clear (int width, int height)
 
void clear (cv::Size)
 
void clear ()
 
void draw (const cv::Mat_< cv::Vec3b > &, real blend=1.0)
 
void draw (const cv::Mat_< uchar > &, real blend=1.0)
 
void draw (cv::Rect rect, const cv::Mat_< cv::Vec3b > &img, real blend=1.0)
 
void draw (cv::Point pt, const cv::Mat_< cv::Vec3b > &img, real blend=1.0)
 
void draw (cv::Rect rect, const cv::Mat_< uchar > &img, real blend=1.0)
 
void draw (cv::Point pt, const cv::Mat_< uchar > &img, real blend=1.0)
 
void draw_depth (cv::Rect rect, const cv::Mat_< float > &depth_img, float min_d, float max_d, real blend=1.0)
 
void draw_depth (cv::Point pt, const cv::Mat_< float > &depth_img, float min_d, float max_d, real blend=1.0)
 
void draw_text (cv::Rect rect, const std::string &text, text_alignment=left)
 
void draw_text (cv::Rect rect, const std::string &text, text_alignment, cv::Vec3b color)
 
void draw_2d_cross_indicator (cv::Rect rect, real value_x, real value_y, real max_abs_value)
 
void draw_2d_arrow_indicator (cv::Rect rect, real value_x, real value_y, real max_value)
 
bool show (int &keycode)
 
bool show ()
 
void show_modal ()
 
void update_modal ()
 
void close_modal ()
 

Static Public Member Functions

static cv::Mat_< uchar > visualize_depth (const cv::Mat &, float min_d, float max_d)
 
static cv::Mat_< uchar > visualize_ir (const cv::Mat &, float min_ir, float max_ir)
 

Public Attributes

cv::Vec3b black = cv::Vec3b(0, 0, 0)
 
cv::Vec3b white = cv::Vec3b(255, 255, 255)
 
cv::Vec3b indicator_color = cv::Vec3b(255, 100, 100)
 
cv::Vec3b background_color = cv::Vec3b(0, 0, 0)
 
cv::Vec3b text_color = cv::Vec3b(255, 255, 255)
 
std::function< void()> update_callback
 
std::function< void(int keycode)> key_callback
 
std::function< void(int event, int x, int y)> mouse_callback
 

Detailed Description

Definition at line 13 of file viewer.h.

Member Enumeration Documentation

Enumerator
left 
center 
right 

Definition at line 19 of file viewer.h.

Constructor & Destructor Documentation

tlz::viewer::viewer ( const std::string &  title,
int  width,
int  height,
bool  resizeable = false 
)

Definition at line 30 of file viewer.cc.

tlz::viewer::viewer ( const std::string &  title,
cv::Size  sz,
bool  resizeable = false 
)
inline

Definition at line 45 of file viewer.h.

Here is the call graph for this function:

tlz::viewer::viewer ( int  width,
int  height,
bool  resizeable = false 
)

Definition at line 45 of file viewer.cc.

tlz::viewer::viewer ( cv::Size  sz,
bool  resizeable = false 
)
inline

Definition at line 48 of file viewer.h.

Here is the call graph for this function:

tlz::viewer::viewer ( const std::string &  title,
bool  resizeable = false 
)
explicit

Definition at line 49 of file viewer.cc.

tlz::viewer::viewer ( const viewer )
delete
tlz::viewer::~viewer ( )

Definition at line 61 of file viewer.cc.

Member Function Documentation

viewer::int_slider & tlz::viewer::add_int_slider ( const std::string &  caption,
int  default_val,
int  min_val,
int  max_val,
int  step = 1 
)

Definition at line 263 of file viewer.cc.

viewer::real_slider & tlz::viewer::add_real_slider ( const std::string &  caption,
real  default_val,
real  min_val,
real  max_val,
int  steps = 100 
)

Definition at line 273 of file viewer.cc.

void tlz::viewer::clear ( int  width,
int  height 
)

Definition at line 76 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::clear ( cv::Size  sz)

Definition at line 85 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::clear ( )

Definition at line 90 of file viewer.cc.

void tlz::viewer::close_modal ( )

Definition at line 258 of file viewer.cc.

void tlz::viewer::draw ( const cv::Mat_< cv::Vec3b > &  img,
real  blend = 1.0 
)

Definition at line 119 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::draw ( const cv::Mat_< uchar > &  img,
real  blend = 1.0 
)

Definition at line 124 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::draw ( cv::Rect  rect,
const cv::Mat_< cv::Vec3b > &  img,
real  blend = 1.0 
)

Definition at line 130 of file viewer.cc.

void tlz::viewer::draw ( cv::Point  pt,
const cv::Mat_< cv::Vec3b > &  img,
real  blend = 1.0 
)
inline

Definition at line 71 of file viewer.h.

Here is the call graph for this function:

void tlz::viewer::draw ( cv::Rect  rect,
const cv::Mat_< uchar > &  img,
real  blend = 1.0 
)

Definition at line 154 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::draw ( cv::Point  pt,
const cv::Mat_< uchar > &  img,
real  blend = 1.0 
)
inline

Definition at line 75 of file viewer.h.

Here is the call graph for this function:

void tlz::viewer::draw_2d_arrow_indicator ( cv::Rect  rect,
real  value_x,
real  value_y,
real  max_value 
)

Definition at line 206 of file viewer.cc.

void tlz::viewer::draw_2d_cross_indicator ( cv::Rect  rect,
real  value_x,
real  value_y,
real  max_abs_value 
)

Definition at line 186 of file viewer.cc.

void tlz::viewer::draw_depth ( cv::Rect  rect,
const cv::Mat_< float > &  depth_img,
float  min_d,
float  max_d,
real  blend = 1.0 
)

Definition at line 161 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::draw_depth ( cv::Point  pt,
const cv::Mat_< float > &  depth_img,
float  min_d,
float  max_d,
real  blend = 1.0 
)
inline

Definition at line 79 of file viewer.h.

Here is the call graph for this function:

void tlz::viewer::draw_text ( cv::Rect  rect,
const std::string &  text,
text_alignment  align = left 
)

Definition at line 182 of file viewer.cc.

void tlz::viewer::draw_text ( cv::Rect  rect,
const std::string &  text,
text_alignment  align,
cv::Vec3b  color 
)

Definition at line 167 of file viewer.cc.

int tlz::viewer::height ( ) const

Definition at line 71 of file viewer.cc.

viewer& tlz::viewer::operator= ( const viewer )
delete
bool tlz::viewer::show ( int &  keycode)

Definition at line 218 of file viewer.cc.

bool tlz::viewer::show ( )

Definition at line 224 of file viewer.cc.

void tlz::viewer::show_modal ( )

Definition at line 230 of file viewer.cc.

Here is the call graph for this function:

void tlz::viewer::update_modal ( )

Definition at line 251 of file viewer.cc.

cv::Mat_< uchar > tlz::viewer::visualize_depth ( const cv::Mat &  depth_img,
float  min_d,
float  max_d 
)
static

Definition at line 95 of file viewer.cc.

cv::Mat_< uchar > tlz::viewer::visualize_ir ( const cv::Mat &  ir_orig,
float  min_ir,
float  max_ir 
)
static

Definition at line 107 of file viewer.cc.

int tlz::viewer::width ( ) const

Definition at line 66 of file viewer.cc.

Member Data Documentation

cv::Vec3b tlz::viewer::background_color = cv::Vec3b(0, 0, 0)

Definition at line 37 of file viewer.h.

cv::Vec3b tlz::viewer::black = cv::Vec3b(0, 0, 0)

Definition at line 34 of file viewer.h.

cv::Vec3b tlz::viewer::indicator_color = cv::Vec3b(255, 100, 100)

Definition at line 36 of file viewer.h.

std::function<void(int keycode)> tlz::viewer::key_callback

Definition at line 41 of file viewer.h.

std::function<void(int event, int x, int y)> tlz::viewer::mouse_callback

Definition at line 42 of file viewer.h.

cv::Vec3b tlz::viewer::text_color = cv::Vec3b(255, 255, 255)

Definition at line 38 of file viewer.h.

std::function<void()> tlz::viewer::update_callback

Definition at line 40 of file viewer.h.

cv::Vec3b tlz::viewer::white = cv::Vec3b(255, 255, 255)

Definition at line 35 of file viewer.h.


The documentation for this class was generated from the following files: