examples.dlife.vision
Class CokeCanTrackerV4L

java.lang.Object
  extended by dlife.robot.Controller
      extended by examples.dlife.vision.CokeCanTrackerV4L

public class CokeCanTrackerV4L
extends Controller

Controller that tracks the location of the Coke can in a video stream from a DLifeVisionServer. This Controller uses several of the filters in dlife.vision.filter to track the Coke can in the series of images in the examples.dlife.vision.testImages.CokeCan directory. The Controller indicates the location of the Coke can by drawing a dot on the "Raw Video" window.

To run this example:

  1. Ensure that the Basic dLife installation has been done.
  2. Install the dLife VisionServer on a Linux box.

  3. Start the dLife VisionServer.
  4. Launch the dlife.robot.gui.controlcenter
  5. Choose "dlife.vision.camera.VisionPseudoRobot" from the "Robot" drop down.
  6. Click on the "Controller" button and select dLifeDist/examples/dlife/vision/CokeCanTrackerV4L.class as the controller.
  7. Click the "Start Up" button.
  8. Enter the connection information for your VisionServer and click "Connect".
  9. Choose the V4L device to be used, set its parameters and click "Connect". At this point a tab for the "Camera" and a tab for the "Filters" should appear in the ControlCenter. Viewing the "Camera" tab should display the Raw and Filtered Video being streamed from the V4L device. Depending upon the lighting, if you hold a Coke can in front of the camera, parts of the Coke can may be colored yellow and a white bounding box will be drawn around them in the "Filtered Video" window.
  10. Click the "Run" button. When this Controller is running it will attempt to paint a light blue circle near the center of the Coke can in the Raw Video window. Depending upon the lighting this may or may not work well.
*

The source code for this class is contained in the file:

Version:
Aug 6, 2010
Author:
Grant Braught, Dickinson College

Constructor Summary
CokeCanTrackerV4L()
           
 
Method Summary
 void shutDown()
          This method is invoked when the Shut Down button in the ControlCenter is clicked.
 void startUp(Robot myRobot)
          This method is invoked automatically when the Start Up button in the ContolCenter is clicked.
 void step()
          This method is invoked either once when the Step button is clicked or periodically when the Run button is clicked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CokeCanTrackerV4L

public CokeCanTrackerV4L()
Method Detail

startUp

public void startUp(Robot myRobot)
             throws VideoSourceCreationFailedException
Description copied from class: dlife.robot.Controller
This method is invoked automatically when the Start Up button in the ContolCenter is clicked. This is typically where Sensors and Effectors are created and added to the Robot.

Specified by:
startUp in class Controller
Parameters:
myRobot - the Robot that this Controller will be controlling.
Throws:
VideoSourceCreationFailedException

step

public void step()
Description copied from class: dlife.robot.Controller
This method is invoked either once when the Step button is clicked or periodically when the Run button is clicked. The rate at which step is invoked varies from Robot to Robot and is dependent on the computer being used as well as the amount of processing done in step, the number and type of sensors attached to the Robot and the robot's communication latency.

Specified by:
step in class Controller

shutDown

public void shutDown()
Description copied from class: dlife.robot.Controller
This method is invoked when the Shut Down button in the ControlCenter is clicked. The default implementation of this method is empty.

Overrides:
shutDown in class Controller