Fawkes API
Fawkes Development Version
|
22 #ifndef _FVUTILS_DRAWER_FIELD_DRAWER_H__
23 #define _FVUTILS_DRAWER_FIELD_DRAWER_H__
25 #include <fvutils/color/yuv.h>
26 #include <fvutils/draw/field.h>
27 #include <utils/math/types.h>
29 namespace firevision {
31 class SharedMemoryImageBuffer;
54 virtual void draw_field(
unsigned char *yuv422_planar,
55 unsigned int img_width,
56 unsigned int img_height,
57 bool draw_background =
true,
58 bool draw_landscape =
true);
63 get_scale(
unsigned int img_width,
unsigned int img_height,
bool draw_landscape =
true)
const;
64 virtual void draw_line_points(
bool draw_landscape =
true,
float scale = 0)
const;
65 virtual void draw_lines(
YUV_t color,
bool draw_landscape =
true,
float scale = 0)
const;
76 const fld_line_points_t *points_;
77 const fld_line_points_t *points_est_;
83 YUV_t c_line_points_est_;
float get_scale(unsigned int img_width, unsigned int img_height, bool draw_landscape=true) const
Calculates the conversion factor between field size and image size.
void set_head_yaw(float head_yaw)
Sets the angular offset between body and head (along the body axis)
void set_line_points_est(const fld_line_points_t *points_est)
Setter for detected line points.
void set_color_line_points(YUV_t color)
Sets the line points color.
void set_color_line_points_est(YUV_t color)
Sets the line points color.
unsigned int _img_width
The width of the target image buffer.
FieldDrawer(const FieldLines &lines)
Created a new field object.
unsigned int _img_height
The height of the target image buffer.
virtual ~FieldDrawer()
Destructor.
void set_own_pos_est(fawkes::field_pos_t own_position_estimate)
Own position estimate setter.
virtual void draw_line_points(bool draw_landscape=true, float scale=0) const
Draws the line points.
virtual void draw_field(unsigned char *yuv422_planar, unsigned int img_width, unsigned int img_height, bool draw_background=true, bool draw_landscape=true)
Draws the field (including the own position [est]).
void set_own_pos(fawkes::field_pos_t own_position)
Own position setter.
This class acts as a container for lines on a soccer field.
This class is used to draw a soccer field.
virtual void draw_lines(YUV_t color, bool draw_landscape=true, float scale=0) const
Draws the field lines to a SharedMemoryImageBuffer.
void set_color_own_pos(YUV_t color)
Sets the own position color.
unsigned char * _img_buffer
The pointer to the target image buffer.
void set_line_points(const fld_line_points_t *points)
Setter for detected line points.
void set_color_lines(YUV_t color)
Sets the lines color.
void clear_own_pos()
Clears the own position.
void set_color_field(YUV_t color)
Sets the field color.
void set_color_background(YUV_t color)
Sets the background color (outside the field)
void set_color_own_pos_est(YUV_t color)
Sets the own position estimates color.