24 #ifndef __FIREVISION_FVUTILS_ROI_H_
25 #define __FIREVISION_FVUTILS_ROI_H_
27 #include <fvutils/base/types.h>
29 namespace firevision {
64 ROI(
unsigned int start_x,
unsigned int start_y,
65 unsigned int width,
unsigned int height,
66 unsigned int image_width,
unsigned int image_height);
69 void set_start(
unsigned int x,
unsigned int y);
71 void set_width(
unsigned int width);
72 unsigned int get_width()
const;
74 void set_height(
unsigned int height);
75 unsigned int get_height()
const;
77 void set_image_width(
unsigned int image_width);
78 unsigned int get_image_width()
const;
80 void set_image_height(
unsigned int image_height);
81 unsigned int get_image_height()
const;
83 void set_line_step(
unsigned int step);
84 unsigned int get_line_step()
const;
86 void set_pixel_step(
unsigned int step);
87 unsigned int get_pixel_step()
const;
89 unsigned int get_hint()
const;
90 void set_hint(
unsigned int);
92 bool contains(
unsigned int x,
unsigned int y);
94 bool neighbours(
unsigned int x,
unsigned int y,
unsigned int margin)
const;
95 bool neighbours(
ROI *roi,
unsigned int margin)
const;
97 void extend(
unsigned int x,
unsigned int y);
99 void grow(
unsigned int margin);
102 bool operator<(
const ROI &roi)
const;
103 bool operator>(
const ROI &roi)
const;
104 bool operator==(
const ROI &roi)
const;
105 bool operator!=(
const ROI &roi)
const;
106 ROI& operator=(
const ROI &roi);
108 unsigned int get_num_hint_points()
const;
111 unsigned char* get_roi_buffer_start(
unsigned char *buffer)
const;
113 static ROI * full_image(
unsigned int width,
unsigned int height);
141 static ROI *roi_full_image;
fawkes::point_t start
ROI start.
unsigned int width
ROI width.
unsigned int image_width
width of image that contains this ROI
Point with cartesian coordinates as unsigned integers.
unsigned int image_height
height of image that contains this ROI
unsigned int hint
ROI hint.
unsigned int height
ROI height.
unsigned int line_step
line step
unsigned int num_hint_points
Minimum estimate of points in ROI that are attributed to the ROI hint.
unsigned int pixel_step
pixel step
color_t color
ROI primary color.