Running Shale

Setup and Calibration of Shale

Once you have installed Shale on your computer, you can set it up to run the program. This assumes that you are in control of the computer running the software, and must calibrate the system to properly work in the room where the physical objects will be displayed. Because of the nature of the image recognition, different lighting conditions and webcam/projector positions require for the code and webcam settings to be tweaked slightly to ensure optimum performance of the program.
Note: In order to properly run Shale, the following must be installed:
You must also have the following minimum hardware:
The Steps:
  1. Prepare the Arduino.
    1. Make sure Arduino is connected red-to-red black-to-black to the rechargeable battery.
      Click here for picture of the power connection.
    2. Mount hardware securely to the whiteboard, and press the reset button on the Arduino.
      Click here for picture of board-mounted hardware.
      Click here for picture of the reset button.
  2. Connect the Xbee to your computer.
    1. Plug the USB cable into the Xbee so that the green wire on the plug is connected to the second pin from the right on the Xbee.
      Click here for picture of the Xbee connection.
    2. Plug the USB cable into your computer.
  3. Position projector and webcam and connect to your computer.
    1. Place the webcam as close as possible to the projector lens.
    2. Adjust the position of the projector so that the projected image has as little skew as possible.
  4. On laptop, open up Processing (JMyron example Bounding Boxes) and Logicam Quickcam Settings for adjustments.
    1. Adjust brightness, color, and contrast settings for red and white (laser pointer) recognition to work in tandem.
      • While the Bounding Boxes program is running, and with the red-colored mechanical object secured to the board, change the recognition color in the Bounding Boxes program to red (255, 0, 0) and white (255, 255, 255) and shine the laser pointer on the whiteboard surface. Make sure that the current camera settings allow both sources of red (the mechanical object) and white (the laser pointer) to be detected.
    2. Using this input, modify Shale in Eclipse as needed in the detectLaser() and takeCameraImage() methods (the tolerances are what need to be adjusted here) in the ShaleApplet.java - try to get this working without changing the tolerances.
    3. Use the Bounding Boxes JMyron example, mark the boundaries of the webcam's window of sight on the whiteboard. Determine the necessary scaling factor for that window setting - in Vista, use Snipping Tool in the Accessories folder to create the image, then calculate that by 320x240 original for scaling. Then adjust the scale factor (X & Y) in the setup() method in ShaleApplet.java
  5. Start the Shale application.
  6. Adjust computer's display settings so that the desktop is extended with the projector as the secondary monitor.
    1. Drag Shale applet window onto secondary monitor so that it is projected onto the stage.
  7. Adjust camera and lighting as needed.
    1. Place the webcam as close as possible to the projector lens.
    2. Shale works best when the lighting upon the stage is even. If there are regions of contrast, Shale may interpret the borders of those regions as edges of objects, and misinterpret the location of the laser pointer image.
    3. The laser pointer image is sometimes easier for Shale to interpret if the camera is out-of-focus because the laser pointer image then appears enlarged.


Return Home