edu.berkeley.guir.papier_mache.vision
Class VisionPhobProducer
java.lang.Object
edu.berkeley.guir.papier_mache.PhobProducer
edu.berkeley.guir.papier_mache.vision.VisionPhobProducer
- All Implemented Interfaces:
- java.util.EventListener, InputDataListener
- public class VisionPhobProducer
- extends PhobProducer
- implements InputDataListener
This class takes a camera as input, and uses computer vision to find objects in the camera
image. It then creates a VisionPhob for each of these objects. This class also displays the raw
camera input and the computer vision output in the main Papier-Mache frame.
This software is distributed under the
Berkeley Software License.
- Author:
- Scott Klemmer ( srk(AT)cs.berkeley.edu )
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VisionPhobProducer
public VisionPhobProducer(ImageInputDevice imgSource)
VisionPhobProducer
public VisionPhobProducer(ImageInputDevice imgSource,
int minSize)
getIcon
public javax.swing.Icon getIcon()
- Overrides:
getIcon
in class PhobProducer
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
addCurrentPhobsListener
public void addCurrentPhobsListener(CurrentPhobsListener listener)
captureFirstCalibImage
public void captureFirstCalibImage(CalibrationListener listener)
- Parameters:
listener
- the listener to send a completion acknowledgement to
captureSecondCalibImage
public void captureSecondCalibImage()
dataReceived
public void dataReceived(InputDataEvent e)
- Specified by:
dataReceived
in interface InputDataListener
getImageSource
public ImageInputDevice getImageSource()
getPhobType
public java.lang.Class getPhobType()
- Specified by:
getPhobType
in class PhobProducer
groupPhobs
public static java.util.Collection groupPhobs(java.util.List phobs,
int maxDist)
- Given a collection of phobs, groups phobs that are close to each other based on the input var 'maxDist'
- Returns:
- Collection of Collections of phobs
generateWOzPhob
public void generateWOzPhob()
- Creates a new VisionPhob and fires a PhobAddedEvent