Fawkes API
Fawkes Development Version
|
24 #ifndef _FIREVISION_FVUTILS_ROI_H_
25 #define _FIREVISION_FVUTILS_ROI_H_
27 #include <fvutils/base/types.h>
29 namespace firevision {
60 ROI(
unsigned int start_x,
68 void set_start(
unsigned int x,
unsigned int y);
91 bool contains(
unsigned int x,
unsigned int y);
94 bool neighbours(
unsigned int x,
unsigned int y,
unsigned int margin)
const;
97 void extend(
unsigned int x,
unsigned int y);
99 void grow(
unsigned int margin);
138 static ROI *roi_full_image;
unsigned int get_image_height() const
Get full image height.
void set_width(unsigned int width)
Set width of ROI.
void set_image_height(unsigned int image_height)
Set full image height Set the height of the image that contains this ROI.
unsigned int width
ROI width.
bool operator>(const ROI &roi) const
Check if this ROI contains more hint points than the given ROI.
unsigned int get_pixel_step() const
Get pixel step.
void grow(unsigned int margin)
Grow this ROI by a given margin.
void set_height(unsigned int height)
Set height of ROI.
unsigned int image_width
width of image that contains this ROI
void extend(unsigned int x, unsigned int y)
Extend ROI to include given pixel.
unsigned int image_height
height of image that contains this ROI
Point with cartesian coordinates as unsigned integers.
bool operator!=(const ROI &roi) const
Check if this ROI does not mark the same region for the same object and an image of the same base siz...
bool operator==(const ROI &roi) const
Check if this ROI marks the same region for the same object and an image of the same base size and st...
bool contains(unsigned int x, unsigned int y)
Check if this ROI contains the given coordinates.
ROI & operator=(const ROI &roi)
Assign the given ROI data to this ROI.
unsigned int get_num_hint_points() const
Gives an estimate of the number of points in this ROI that are classified to the given hint It is: nu...
unsigned int height
ROI height.
void set_hint(unsigned int)
Set hint.
void set_image_width(unsigned int image_width)
Set full image width.
unsigned int get_height() const
Get height of ROI.
unsigned int num_hint_points
Minimum estimate of points in ROI that are attributed to the ROI hint.
void set_line_step(unsigned int step)
Set linestep.
unsigned int get_width() const
Get width of ROI.
unsigned int get_hint() const
Get hint.
void set_start(fawkes::upoint_t p)
Set upper left corner of ROI.
unsigned int pixel_step
pixel step
unsigned int get_line_step() const
Get linestep.
unsigned int get_image_width() const
Get full image width.
bool neighbours(unsigned int x, unsigned int y, unsigned int margin) const
Check if this ROI neighbours a pixel.
ROI & operator+=(ROI &roi)
Merge two ROIs.
static ROI * full_image(unsigned int width, unsigned int height)
Get full image ROI for given size.
ROI intersect(ROI const &roi) const
Intersect this ROI with another.
fawkes::upoint_t start
ROI start.
unsigned int line_step
line step
bool operator<(const ROI &roi) const
Check if this ROI contains less hint points than the given ROI.
unsigned char * get_roi_buffer_start(unsigned char *buffer) const
Get ROI buffer start.
color_t color
ROI primary color.
void set_pixel_step(unsigned int step)
Set pixel step.
unsigned int hint
ROI hint.