Silhouette Project

axis2100.jpgWhat is Silhouette?

The Silhouette Project is an open-source pure Java implementation of a shape detection engine.  I created Silhouette in 2005 for my undergraduate senior Computer Science project at Loyola Marymount University.  Silhouette reads a live real-time image stream from a network-camera, and applies a series of algorithms to the image to identify obvious shapes.  While this may seem like a simple task, it is actually more difficult than one might expect.  For example, the human mind is clearly capable of deciphering the difference between an apple and banana, or a cardboard box and a cookie.  We can make these seemingly simple determinations in a matter of a nanosecond.  However, training a computer to recognize shapes is a daunting task, and has been studied by many computer engineers since the birth of computer graphics and machine vision.


How does it work?


At its core, the the Silhouette engine uses a 4-part process to extract and identify shapes in a streaming real-time image.

  • Step 1: Receive and cache input from a live network camera, like the Axis 2100.
  • Step 2: Process the digital image from the camera.  This involves converting a JPG-image stream into a set of byte arrays that can be analyzed.
  • Step 3: Run the byte arrays through the well known and published Sobel Edge Detection algorithm to remove "the meat" of the image.  Extract vectors using the resulting edges.
  • Step 4: Analyze the resulting vectors to identify shapes; Silhouette currently identifies circles and squares.  In this case, a vector is nothing more than a directed line from (x1,y1) to (x2,y2).

sil_flow.jpgWhy Java?

For performance reasons, most image processing applications are written in languages like C and C++.  Computer vision experts prefer C/C++ for image processing because these languages produce binaries that run closer to native hardware.  For intense data crunching applications, Java isn't ideal.  Regardless, I chose Java for this project because very few machine vision resources exist for Java.  Based on my research, Java machine vision appears to be a relatively unexplored space.  As a result, consider this as a way of giving back.


Other Details

Silhouette is freely available under the MIT License.  You can download a pre-built JAR, or the source below.  I've also provided full documentation from my project, including slide-sets and other write-ups.  I am no longer maintaining or working on the code for the Silhouette engine.

As a result, you shouldn't use Silhouette for anything serious.  I built it as a college project to learn about image processing and machine vision.  As the MIT License states, Silhouette "...IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."


Downloads

Pre-built "runnable" JAR (80Kb): silhouette-1.0.jar

To run Silhouette, download the JAR.  From your favorite command line, run:

#silhouette/>  java -jar silhouette-1.0.jar


Source JAR (84Kb): silhouette-src-1.0.jar

To compile Silhouette, download and extract the source JAR.  Assuming you have Ant installed, run ant inside of the silhouette directory.  The Ant build.xml file will build and package Silhouette for you:

#/>  mkdir silhouette
#/>  mv silhouette-src-1.0.jar silhouette
#/>  cd silhouette
#silhouette/>  jar xvf silhouette-src-1.0.jar
#silhouette/>  ant



Documentation

Here is a list of complete documentation on the Silhouette project.  Note, the User Manual can be found in the Deployment and Delivery Plan below; see section V.G (Page 10).

  • Silhouette_Milestone1.ppt -- A project status slide-set from the first project milestone.
  • Silhouette_FinalPresentation_Version5.ppt -- My final presentation slide-set.  At a high level, discusses how Silhouette works under the hood.
  • Silhouette-Project-Proposal.pdf -- Initial project proposal document.  "Shape and color recognition algorithms and the software applications which implement them are traditionally very elaborate, and often extremely complex. I propose to develop a software application which efficiently implements a high quality recognition algorithm. Unlike facial recognition algorithms, the technology industry does not have a standard open-source shape and color recognition toolkit.  Therefore, Silhouette will attempt to implement a known shape detection algorithm and package it into a powerful and easy to use open-source application!"
  • Silhouette-Analysis.pdf -- Project analysis document.  "The following section contains all project related analysis documents for the Silhouette project. This includes a list of supported activities, a detailed description of the human-computer interface, and other important information such as ethical issues and security/fault requirements."
  • Silhouette-Imp-Testing-Plan.pdf -- Complete implementation and testing plan.  "This section contains important implementation and testing plan documents for the Silhouette project. It also contains a detailed section of algorithm implementation specifics."  If you're looking for technical details on the shape detection and vector extraction algorithms used in Silhouette, see Section IV.D (Page 14).
  • Silhouette-Use-Case-Diagram.pdf -- A rough use-case diagram for the project.
  • Silhouette-Deployment-and-Delivery-Plan.pdf -- A full deployment and delivery plan.  Also contains a complete user manual in Section V.G (Page 10).  "This section contains all documentation relating to application deployment and final software delivery of the Silhouette Project."
  • Silhouette-Appendices.pdf -- A complete appendix with "references and project research, a copy of all weekly project status reports, a lessons learned writeup, and an in-depth self-evaluation."  See section VI.E for a bibliography.


Here are a few other reference research papers I used during my project: