Shrinker Class Reference

Shrinker class to shrink ROIs. More...

#include <classifiers/shrinker.h>

Inheritance diagram for Shrinker:

List of all members.


Public Member Functions

 Shrinker ()
 Constructor.
virtual ~Shrinker ()
 Destructor.
virtual void setFilteredBuffer (unsigned char *yuv422planar_buffer)
 Set the filtered buffer.
virtual void shrink (ROI *roi)
 Shrink! Do the actual shrinking.

Protected Attributes

unsigned char * src
 Source image buffer.

Detailed Description

Shrinker class to shrink ROIs.

This shrinker shrinks a given ROI. This is done to cope with several special problems that arise in different setups. For example if playing downstairs in the lobby without a carpet we always have a problem with reflections on the floor.

This shrinker works like this:

  • if ROI is vertically rectangular, we cut off the bottom part because it is likely to contain reflection
  • if ball is not close (roi->width <= 100), we tighten the ROI, such that it only contains the ball. This helps against reflection. (If ball is close, this does not work, because it takes away too many edge pixels.)

Definition at line 29 of file shrinker.h.


Constructor & Destructor Documentation

Shrinker::Shrinker (  ) 

Constructor.

Definition at line 46 of file shrinker.cpp.

References src.

Shrinker::~Shrinker (  )  [virtual]

Destructor.

Definition at line 53 of file shrinker.cpp.


Member Function Documentation

void Shrinker::setFilteredBuffer ( unsigned char *  yuv422planar_buffer  )  [virtual]

Set the filtered buffer.

The buffer is assumed to being YUV422_PLANAR mode and the desired filter combination has been run.

Parameters:
yuv422planar_buffer YUV422 planar buffer

Definition at line 64 of file shrinker.cpp.

References src.

void Shrinker::shrink ( ROI roi  )  [virtual]

Shrink! Do the actual shrinking.

See above for used method.

Parameters:
roi ROI to srhink

Reimplemented in BorderShrinker, and SquareShrinker.

Definition at line 74 of file shrinker.cpp.

References ROI::get_roi_buffer_start(), ROI::height, ROI::line_step, src, ROI::width, fawkes::point_t::x, and fawkes::point_t::y.


Member Data Documentation

unsigned char* Shrinker::src [protected]

Source image buffer.

Definition at line 41 of file shrinker.h.

Referenced by BorderShrinker::BorderShrinker(), setFilteredBuffer(), shrink(), and Shrinker().


The documentation for this class was generated from the following files: