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

Public Member Functions

 Scene (BufferedImage img) throws SceneInitialisationException
 
 Scene (BufferedImage img, double scalingFactor) throws SceneInitialisationException
 
 Scene (BufferedImage img, Slingshot sling) throws SceneInitialisationException
 
 Scene (BufferedImage img, Slingshot sling, double scalingFactor) throws SceneInitialisationException
 
- Public Member Functions inherited from de.uniba.sme.bambirds.common.objects.AbstractScene
 AbstractScene (BufferedImage image)
 
Slingshot getSlingshot ()
 
void setSlingshot (Slingshot slingshot)
 
List< ABObjectgetBirds ()
 
List< ABObjectgetPigs ()
 
List< ABObjectgetHills ()
 
List< ABObjectgetBlocks ()
 
List< ABObjectgetTnts ()
 
List< ABObjectgetAllObjects ()
 
int getGroundPlane ()
 
List< ABObjectsortedTargetsList ()
 
int estimateMaximalPointsWithoutBirds ()
 
ABObject findObjectWithID (String id)
 
String sceneDescription ()
 
ABType getBirdTypeOnSling ()
 
String toString ()
 
BufferedImage getImage ()
 
String toJSON ()
 
int getObjectCount ()
 
boolean compareTo (AbstractScene scene)
 

Static Private Attributes

static final Logger log = LogManager.getLogger(Scene.class)
 

Additional Inherited Members

- Public Attributes inherited from de.uniba.sme.bambirds.common.objects.AbstractScene
double scalingFactor = 1.005
 
- Protected Member Functions inherited from de.uniba.sme.bambirds.common.objects.AbstractScene
void generateIds ()
 
void generateIDsPerList (List< ABObject > list)
 
List< ABObjectmergeAllObjectsInOneList ()
 
double estimateScreenScale ()
 
long getNumberOfSpecBlocks (ABType typeOfBlock)
 
- Protected Attributes inherited from de.uniba.sme.bambirds.common.objects.AbstractScene
Slingshot slingshot
 
List< ABObjectpigs
 
List< ABObjectbirds
 
List< ABObjecthills
 
List< ABObjectblocks
 
List< ABObjecttnts
 
List< ABObject_allObjects
 
int groundPlaneY = -1
 
BufferedImage image
 

Detailed Description

The

Scene(BufferedImage img)
Definition: vision/src/main/java/de/uniba/sme/bambirds/vision/Scene.java:40

class is basically a simple wrapper around the Vision class. It provides a few simple methods to suit the needs of the BamBird agent and hides the many

Vision

methods we don't care about.

When you instantiate a

object, make sure you catch the

NullPointerException

it may throw if the given

BufferedImage

does not contain some critical objects.

Constructor & Destructor Documentation

◆ Scene() [1/4]

de.uniba.sme.bambirds.vision.Scene.Scene ( BufferedImage  img) throws SceneInitialisationException

Stores all objects in

img

that are recognized by the

find...

methods of the Vision class.

Parameters
imgA screenshot from ActionRobot#doScreenShot
Exceptions
SceneInitialisationExceptionif
Vision
cannot find a sling, pigs or birds in
img

◆ Scene() [2/4]

de.uniba.sme.bambirds.vision.Scene.Scene ( BufferedImage  img,
double  scalingFactor 
) throws SceneInitialisationException

Stores all objects in

img

that are recognized by the

find...

methods of the Vision class.

Parameters
imgA screenshot from ActionRobot#doScreenShot
scalingFactorIf
0
use default scaling factor
Exceptions
SceneInitialisationExceptionif
Vision
cannot find a sling, pigs or birds in
img

◆ Scene() [3/4]

de.uniba.sme.bambirds.vision.Scene.Scene ( BufferedImage  img,
Slingshot  sling 
) throws SceneInitialisationException

Stores all objects in

img

that are recognized by the

find...

methods of the Vision class.

Parameters
imgA screenshot from ActionRobot#doScreenShot
slingIf
null
invoke
Vision
to determine
Exceptions
SceneInitialisationExceptionif
Vision
cannot find a sling, pigs or birds in
img

◆ Scene() [4/4]

de.uniba.sme.bambirds.vision.Scene.Scene ( BufferedImage  img,
Slingshot  sling,
double  scalingFactor 
) throws SceneInitialisationException

Stores all objects in

img

that are recognized by the

find...

methods of the Vision class.

Parameters
imgA screenshot from ActionRobot#doScreenShot
slingIf
null
invoke
Vision
to determine
scalingFactorIf
0
use default scaling factor
Exceptions
SceneInitialisationExceptionif
Vision
cannot find a sling, pigs or birds in
img
See also
Vision::findSlingshotMBR

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