edu.berkeley.guir.papier_mache.vision
Class VisionPhob

java.lang.Object
  extended by edu.berkeley.guir.papier_mache.Phob
      extended by edu.berkeley.guir.papier_mache.vision.VisionPhob
All Implemented Interfaces:
edu.berkeley.guir.lib.util.ToShortStringable
Direct Known Subclasses:
VisionPhobCollection

public class VisionPhob
extends Phob

A VisionPhob represents a single object found by the vision system.

Author:
Scott Klemmer ( srk(AT)cs.berkeley.edu )

Constructor Summary
VisionPhob(edu.berkeley.guir.papier_mache.vision.VisionData visionData, PhobProducer source)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.awt.Rectangle getAlignedBoundingBox(double theta)
          Rotates the four extrema points about the center point.
 java.awt.Rectangle getBounds()
           
 java.awt.geom.Point2D getCenter()
           
 javax.swing.Icon getIcon()
           
 java.awt.Dimension getImageSize()
           
 long getLastUpdateTime()
           
 double getMajorAxisLength()
           
 java.awt.Color getMeanColorRGB()
           
 float getMeanIntensity()
           
 double getMinorAxisLength()
           
 java.awt.image.RenderedImage getRawImage()
           
 int getSize()
           
 double getTheta()
           
 boolean isNew()
           
 java.awt.geom.Point2D rotatePointAroundCenter(java.awt.geom.Point2D p, double theta)
          Rotates the specified point around the center of the phob
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.berkeley.guir.papier_mache.Phob
getCreationTime, getSource
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisionPhob

public VisionPhob(edu.berkeley.guir.papier_mache.vision.VisionData visionData,
                  PhobProducer source)
Method Detail

getIcon

public javax.swing.Icon getIcon()
Overrides:
getIcon in class Phob

getSize

public int getSize()
Returns:
the size (perimeter length) of the phob, in image pixels

getImageSize

public java.awt.Dimension getImageSize()
Returns:
the pixel size of the image containing this phob

getBounds

public java.awt.Rectangle getBounds()
Returns:
the rectangular bounding box of this phob, in image pixels

getCenter

public java.awt.geom.Point2D getCenter()

getTheta

public double getTheta()

getMajorAxisLength

public double getMajorAxisLength()

getMinorAxisLength

public double getMinorAxisLength()

getRawImage

public java.awt.image.RenderedImage getRawImage()
Returns:
the original camera image that the vision system found this phob in

getMeanColorRGB

public java.awt.Color getMeanColorRGB()

getMeanIntensity

public float getMeanIntensity()

getLastUpdateTime

public long getLastUpdateTime()

isNew

public boolean isNew()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toShortString

public java.lang.String toShortString()
Specified by:
toShortString in interface edu.berkeley.guir.lib.util.ToShortStringable
Overrides:
toShortString in class Phob

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

rotatePointAroundCenter

public java.awt.geom.Point2D rotatePointAroundCenter(java.awt.geom.Point2D p,
                                                     double theta)
Rotates the specified point around the center of the phob

Parameters:
theta - the amount to rotate, in radians.

getAlignedBoundingBox

public java.awt.Rectangle getAlignedBoundingBox(double theta)
Rotates the four extrema points about the center point.

Parameters:
theta - the amount to rotate, in radians.
Returns:
A Rectangle whose corners are the rotated extrema points.