Hand Tracker

Goal Description Hints Passoff

Due Date - Mar 9

Goal

 
This is a simple program for tracking the movement of someone's hand around an area. The program should display the image of the area as taken by the camera. It should continuously update a bounding rectangle that surrounds the user's hand wherever it moves within the camera's view. The program should work in a variety of lighting conditions, with anyone's hand and with various finger positions. It can be assumed that the user is wearing long sleeves that are not skin colored.
 CS 656
Description
 

Interactive Behavior

Correctly track any hand seen by the camera

Hardware Resources

Any camera should work! If you have USB camera at home, the provided software resources should still work IF you download jigl and put it in your class path

There are cameras set up in 1121 TMCB that you can use if you do not have your own.

Software Resources

The ICEImage package provides ALL the camera utilities that you will need.

To set up the computers downstairs (or your own) you will need to add the following environment variables. If you are using Eclipse these must be added to the Build Path rather than an environment variable.

    • Add "PathToJIGL\jigl.jar" to your CLASSPATH environment variable (this may be something like "D:\HandTracker\jigl.jar").
    • Add "JavaHome\bin" to your PATH environment variable (this may be somethinglike "C:\j2sdk1.4_2_02\bin").

Whether or not you are in 1121 TMCB you will still need to download the JIGL package.

Hints
 

Java Tips

When compiling and executing, you will need to include the jigl package in  your classpath.  Here are some examples:

Compiling:

javac -classpath .;jigl.jar ICEImage\*.java

Executing:

java -classpath .;jigl.jar ICEImage.CameraTest

OR

java -cp .;jigl.jar ICEImage.CameraTest

These examples were done with the D: drive, with all the ICEImage stuff extracted into a directory called D:\ICEImage.  The jigl.jar file is placed in D:\, and the two lines above were typed in the Command Prompt at the root of the D: drive.  Note that CameraTest.java is a member of the ICEImage package already.

You may also try and change the environment variables so that the jigl jar is included in the classpath.  You can do this by

  1. Right-Click "My Computer" and select "Properties"
  2. Click the "Advanced" tab.
  3. Click the "Environment Variables" tab.
  4. Add or alter the "CLASSPATH" variable to your "User Variables"
  5. If you already have a CLASSPATH variable, just put this on the end of the string:
    ;jigl.jar
  6. Otherwise, if you had to create a CLASSPATH variable, put this in for its value:
    .;jigl.jar - notice that this starts with a period

Changing the environment variables may or may not work.  I do not know if those values are saved on the CS server for you.  I suspect that they are, though, because you can alter them.

It may dump out a bunch of error messages about not being able to set some Registry Keys.  Don't worry about it.  If you are having other major problems, you may need to have your CS account reset.  Check the CS home page for more information.

After you get images from the camera, you may notice a significant slow-down of the camera.  This is caused by getting images from the camera, and processing them on the same stack/thread that produced the image.  You may want to set something up where the camera constantly updates a variable that holds the latest image, and then a different thread that is doing all the processing just grabs that value.  You will have a more responsive camera if you do that.

Passoff
 
__ 5) Tracks a closed fist with a rectangle that is reasonably close to the fist

__ 2) Tracks an open hand with reasonable bounds

__ 2) Track a fist with an extended pointer finger and extended thumb. It is acceptable for the rectangle to trim off the tips of the thumb and finger provided more that half of each is inside the rectangle.