24 #ifndef __FIREVISION_FVUTILS_ROI_H_ 25 #define __FIREVISION_FVUTILS_ROI_H_ 27 #include <fvutils/base/types.h> 64 ROI(
unsigned int start_x,
unsigned int start_y,
69 void set_start(
unsigned int x,
unsigned int y);
92 bool contains(
unsigned int x,
unsigned int y);
95 bool neighbours(
unsigned int x,
unsigned int y,
unsigned int margin)
const;
98 void extend(
unsigned int x,
unsigned int y);
100 void grow(
unsigned int margin);
114 static ROI *
full_image(
unsigned int width,
unsigned int height);
142 static ROI *roi_full_image;
unsigned int get_height() const
Get height of ROI.
unsigned int get_pixel_step() const
Get pixel step.
unsigned int get_line_step() const
Get linestep.
void set_height(unsigned int height)
Set height of ROI.
unsigned int get_width() const
Get width of ROI.
fawkes::upoint_t start
ROI start.
void grow(unsigned int margin)
Grow this ROI by a given margin.
bool neighbours(unsigned int x, unsigned int y, unsigned int margin) const
Check if this ROI neighbours a pixel.
unsigned int get_image_height() const
Get full image height.
unsigned int width
ROI width.
ROI & operator+=(ROI &roi)
Merge two ROIs.
void set_pixel_step(unsigned int step)
Set pixel step.
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...
ROI & operator=(const ROI &roi)
Assign the given ROI data to this 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 image_width
width of image that contains this ROI
static ROI * full_image(unsigned int width, unsigned int height)
Get full image ROI for given size.
unsigned int image_height
height of image that contains this ROI
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...
void set_image_width(unsigned int image_width)
Set full image width.
bool contains(unsigned int x, unsigned int y)
Check if this ROI contains the given coordinates.
bool operator>(const ROI &roi) const
Check if this ROI contains more hint points than the given ROI.
unsigned char * get_roi_buffer_start(unsigned char *buffer) const
Get ROI buffer start.
Point with cartesian coordinates as unsigned integers.
void set_start(fawkes::upoint_t p)
Set upper left corner of ROI.
unsigned int hint
ROI hint.
unsigned int height
ROI height.
void set_hint(unsigned int)
Set hint.
ROI intersect(ROI const &roi) const
Intersect this ROI with another.
void set_line_step(unsigned int step)
Set linestep.
unsigned int line_step
line step
unsigned int num_hint_points
Minimum estimate of points in ROI that are attributed to the ROI hint.
void extend(unsigned int x, unsigned int y)
Extend ROI to include given pixel.
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 pixel_step
pixel step
color_t color
ROI primary color.
bool operator<(const ROI &roi) const
Check if this ROI contains less hint points than the given ROI.
unsigned int get_hint() const
Get hint.
unsigned int get_image_width() const
Get full image width.
void set_width(unsigned int width)
Set width of ROI.