Fawkes API
Fawkes Development Version
|
24 #include <fvfilters/roidraw.h>
25 #include <fvutils/color/color_object_map.h>
26 #include <fvutils/draw/drawer.h>
30 namespace firevision {
43 : Filter(
"FilterROIDraw"), rois_(rois), border_style_(style)
55 FilterROIDraw::draw_roi(
const ROI *roi)
60 bool draw_black =
false;
66 for (
unsigned int x = roi->
start.
x; x <= end.
x; ++x) {
68 drawer_->
set_color(draw_black ? YUV_t::black() : hint_color);
69 draw_black = !draw_black;
77 for (
unsigned int y = roi->
start.
y; y <= end.
y; ++y) {
79 drawer_->
set_color(draw_black ? YUV_t::black() : hint_color);
80 draw_black = !draw_black;
91 unsigned char *ldyp = dyp;
125 for (std::list<ROI>::const_iterator r = rois_->begin(); r != rois_->end(); ++r) {
148 border_style_ = style;
static YUV_t get_color(color_t color)
YUV_t getter.
unsigned int width
ROI width.
unsigned int image_width
width of image that contains this ROI
unsigned int image_height
height of image that contains this ROI
Point with cartesian coordinates as unsigned integers.
void set_color(unsigned char y, unsigned char u, unsigned char v)
Set drawing color.
border_style_t
Defines the possible border styles to display a ROI.
void color_point(unsigned int x, unsigned int y)
Color the given point.
FilterROIDraw(const std::list< ROI > *rois=0, border_style_t style=INVERTED)
Constructor.
virtual ~FilterROIDraw()
Destructor.
void set_style(border_style_t style)
Sets the preferred style.
unsigned int height
ROI height.
void set_rois(const std::list< ROI > *rois)
Set ROIs.
unsigned int y
y coordinate
unsigned int pixel_step
pixel step
ROI * dst_roi
Destination ROI.
@ DASHED_HINT
Displays border dashed black and color of hint.
fawkes::upoint_t start
ROI start.
unsigned int line_step
line step
unsigned int x
x coordinate
unsigned char * dst
Destination buffer.
void set_buffer(unsigned char *buffer, unsigned int width, unsigned int height)
Set the buffer to draw to.
color_t color
ROI primary color.