24 #include <fvclassifiers/border_shrinker.h>
26 #include <fvutils/color/colorspaces.h>
27 #include <fvutils/base/roi.h>
29 #include <fvmodels/scanlines/scanlinemodel.h>
30 #include <fvmodels/color/colormodel.h>
34 namespace firevision {
52 BorderShrinker::BorderShrinker(
unsigned int border_left,
unsigned int border_right,
53 unsigned int border_top,
unsigned int border_bottom)
57 this->border_left = border_left;
58 this->border_right = border_right;
59 this->border_top = border_top;
60 this->border_bottom = border_bottom;
80 if (border_bottom > 0) {
82 if (roi->
start.
y >= brdr) {
92 if (roi->
start.
y <= brdr) {
101 if (border_right > 0) {
103 if (roi->
start.
x >= brdr) {
111 if (border_left > 0) {
113 if (roi->
start.
x <= brdr) {
fawkes::point_t start
ROI start.
unsigned int x
x coordinate
virtual void shrink(ROI *roi)
Shrink! Do the actual shrinking.
unsigned int width
ROI width.
virtual ~BorderShrinker()
Virtual empty destructor.
unsigned int image_width
width of image that contains this ROI
unsigned char * src
Source image buffer.
unsigned int image_height
height of image that contains this ROI
Shrinker class to shrink ROIs.
unsigned int y
y coordinate
unsigned int height
ROI height.