BamBirds 2021
de.uniba.sme.bambirds.vision.VisionHelper Class Reference
Collaboration diagram for de.uniba.sme.bambirds.vision.VisionHelper:

Classes

class  FillProcessing
 
interface  HSVFilter
 

Static Public Member Functions

static void imageFilter (BufferedImage image, Rectangle crop, HSVFilter filter)
 
static void loopFillObjects (BufferedImage img, Rectangle crop, FillProcessing processor)
 
static void fill (Point seed, Point offset, boolean[][] ignorePixel, boolean[][] bitmask, FillProcessing proc)
 
static BufferedImage screenshotWithoutMovingParts (BufferedImage image)
 
static double calculateScalingFactor (final BufferedImage img, Level currentLevel, Point releasePoint, long tapTime)
 

Static Private Attributes

static final Logger log = LogManager.getLogger(VisionHelper.class)
 
static VisualDebugger DBG = new VisualDebugger("VisionSling")
 
static int birdsXMax = 0
 
static int birdsWidthMax = 0
 

Member Function Documentation

◆ calculateScalingFactor()

static double de.uniba.sme.bambirds.vision.VisionHelper.calculateScalingFactor ( final BufferedImage  img,
Level  currentLevel,
Point  releasePoint,
long  tapTime 
)
static

After a shot get the display parabola

◆ fill()

static void de.uniba.sme.bambirds.vision.VisionHelper.fill ( Point  seed,
Point  offset,
boolean  ignorePixel[][],
boolean  bitmask[][],
FillProcessing  proc 
)
static

Start flood fill on single pixel.

Parameters
seedStart point of flood fill
offsetApply offset if using a clipping rect
ignorePixelBitmask to skip certain pixels
bitmaskBitmask to indicate relevant areas
procUser defined function

◆ imageFilter()

static void de.uniba.sme.bambirds.vision.VisionHelper.imageFilter ( BufferedImage  image,
Rectangle  crop,
HSVFilter  filter 
)
static

Loop over the whole image (or part of it) and call user function on HSV values.

Parameters
cropDon't use complete image but a clipped segment
filterUser defined function for processing

◆ loopFillObjects()

static void de.uniba.sme.bambirds.vision.VisionHelper.loopFillObjects ( BufferedImage  img,
Rectangle  crop,
FillProcessing  processor 
)
static

Loop over image and create seeds for flood fill algorithm

Parameters
cropDon't use complete image but a clipped segment
processorUser defined function

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