4 #include <boost/lexical_cast.hpp> 5 #include <opencv2/highgui/highgui.hpp> 6 #include <opencv2/imgproc/imgproc.hpp> 16 min_x_(0), max_x_(0), min_y_(0), max_y_(0) {
35 cv::Matx<double, 3, 3 > Tw ( 1, 0, -
mx_, 0, 1, -
my_, 0, 0, 1 );
36 cv::Matx<double, 3, 3 > Sc (
sx_, 0, 0, 0,
sy_, 0, 0, 0, 1 );
37 cv::Matx<double, 3, 3 > Sp ( -1, 0, 0, 0, 1, 0, 0, 0, 1 );
38 cv::Matx<double, 3, 3 > R ( ca, -sa, 0, sa, ca, 0, 0, 0, 1 );
39 cv::Matx<double, 3, 3 > Tm ( 1, 0,
ox_, 0, 1,
oy_, 0, 0, 1 );
40 Mw2m_ = Tm * R * Sp * Sc * Tw;
46 min_y_ = std::min ( min_y, max_y );
47 max_y_ = std::max ( min_y, max_y );
48 min_x_ = std::min ( min_x, max_x );
49 max_x_ = std::max ( min_x, max_x );
113 sprintf(buffer,
"%4i,%4i [px]; %6.2f, %6.2f [m] => %6.2f, %6.2f [px/m]; 0, 0 [px] = %6.2f, %6.2f [m] @ %3.2f [rad]; %4i, %4i [px] = %6.2f, %6.2f [m] @ %3.2f [rad]",
114 width_pixel_,
height_pixel_,
dx_,
dy_,
sx_,
sy_, p0.
x(), p0.
y(),
rotation_,
width_pixel_/2,
height_pixel_/2, p1.
x(), p1.
y(),
rotation_);
115 return std::string(buffer);
std::string infoHeader() const
cv::Matx33d Mm2w_
transformation map to world
int height_pixel_
dimensions of the canvas in pixel
double dy_
dimension of the visualized space
void init()
initializes the transformation matrices
Point2D w2m(const Point2D &src) const
double scale_w2m(double v) const
cv::Matx33d Mw2m_
transformation world to map
const cv::Matx33d & Mw2m() const
const cv::Matx33d & Mm2w() const
double my_
offset of the visualized space
Point2D m2w(const Point2D &src) const
double rotation_
area and rotation of the visualized space