22 #ifndef __FVUTILS_DRAWER_FIELD_DRAWER_H__ 23 #define __FVUTILS_DRAWER_FIELD_DRAWER_H__ 25 #include <fvutils/draw/field.h> 27 #include <utils/math/types.h> 28 #include <fvutils/color/yuv.h> 36 class SharedMemoryImageBuffer;
59 virtual void draw_field(
unsigned char *yuv422_planar,
unsigned int img_width,
unsigned int img_height,
60 bool draw_background =
true,
bool draw_landscape =
true);
64 inline float get_scale(
unsigned int img_width,
unsigned int img_height,
bool draw_landscape =
true)
const;
65 virtual void draw_line_points(
bool draw_landscape =
true,
float scale = 0)
const;
66 virtual void draw_lines(
YUV_t color,
bool draw_landscape =
true,
float scale = 0)
const;
77 const fld_line_points_t *__points;
78 const fld_line_points_t *__points_est;
83 YUV_t __c_line_points;
84 YUV_t __c_line_points_est;
86 YUV_t __c_own_pos_est;
void set_color_lines(YUV_t color)
Sets the lines color.
void set_color_own_pos_est(YUV_t color)
Sets the own position estimates color.
virtual void draw_lines(YUV_t color, bool draw_landscape=true, float scale=0) const
Draws the field lines to a SharedMemoryImageBuffer.
void clear_own_pos()
Clears the own position.
unsigned int _img_width
The width of the target image buffer.
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.
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]).
virtual ~FieldDrawer()
Destructor.
FieldDrawer(const FieldLines &lines)
Created a new field object.
This class is used to draw a soccer field.
void set_color_background(YUV_t color)
Sets the background color (outside the field)
void set_line_points(const fld_line_points_t *points)
Setter for detected line points.
unsigned char * _img_buffer
The pointer to the target image buffer.
void set_color_line_points(YUV_t color)
Sets the line points color.
void set_head_yaw(float head_yaw)
Sets the angular offset between body and head (along the body axis)
void set_color_own_pos(YUV_t color)
Sets the own position color.
unsigned int _img_height
The height of the target image buffer.
This class acts as a container for lines on a soccer field.
void set_own_pos(fawkes::field_pos_t own_position)
Own position setter.
void set_color_field(YUV_t color)
Sets the field color.
virtual void draw_line_points(bool draw_landscape=true, float scale=0) const
Draws the line points.
void set_color_line_points_est(YUV_t color)
Sets the line points color.
void set_own_pos_est(fawkes::field_pos_t own_position_estimate)
Own position estimate setter.
void set_line_points_est(const fld_line_points_t *points_est)
Setter for detected line points.