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