Вы находитесь на странице: 1из 23

F-Spot Finder

Preliminary Design Report

Tuesday, December 15th, 2009

Group Members:
Adam Albright
Hamilton Turner
Rob McColl
Table of Contents

1.0 Introduction
2.0 System Overview
2.1 System Requirements
2.2 System Diagrams
2.3 Major Component Descriptions
2.4 Interface Description
2.5 Operational Concept
3.0 Project Plan/Schedule
4.0 Appendix
1.0 Introduction

The average Vanderbilt student driver knows the frustration associated with
trying to park their vehicle on campus. It is not unusual for it to take 20
minutes or more of driving through parking lots before locating a spot.
Additionally, the scarcity of spots available on campus often encourages
rapid driving in parking locations, in order to ensure getting a spot.

The F-Spot Project is a system that aims to reduce this hassle and the
associated dangers, by monitoring the number of available parking spots in
the student parking lot (F-Lot), and making that information available via
mobile phone.

The system will be designed to make it easier for students to locate a


parking spot in lots that usually 100% full. The objective of this system is to
increase efficiency of leaving and returning to campus by reducing the
wasted time and fuel associated with hunting for a spot, as well as to
provide a substantial quality of life improvement for student drivers. Also,
the system will provide concrete lot usage statistical information that could
be used directly by Vanderbilt Traffic and Parking. This type of information
could be used to monitor parking space supply on campus, and the average
parking demand during various hours throughout the day.

The system will rely on three major components: an outdoor wireless


camera, an image processing server, and mobile devices. The camera and
server will work in tandem to provide image processing, and the results will
be reported to mobile users via the mobile devices. Our team has assembled
access to all of the necessary hardware, and is ready to begin work on this
project.
2.0 System Overview

This section aims to give an overview of the system in detailed terminology,


and will detail the parts used, the interaction of those parts, and the
operation of the overall system.

2.1 System Requirements

The F-Spot system has several requirements that are necessary for proper
functioning. One of the primary requirements is the placement of the video
camera in such a way as to maximize its height above the parking lot to
provide a coverage of as many parking spots as possible. The placement is
critical to the system as it will large impact on the usefulness of the captured
image. The camera utilized in the F-Spot system is weather-proof and need
not be placed indoors or in a climate controlled environment.

Another important requirement is that the camera is mounted in a location


that provides either a marginal wireless internet signal or an Ethernet LAN
connection. This is necessary to provide communication between the F-Spot
video camera and the image processing server. By placing the camera in a
location with exceptional wireless coverage the speed of image transfer is
increased and can allow for a faster capture rate.

The wireless video camera requires DC 5V/2.0A power to operate but comes
with a power adapter to allow for a standard 110V AC power source. While
the camera itself is weather-proof, the electrical connection from the power
supply to power source is not. Adequate protection of this connection is
necessary when used outdoors to prevent damaging the camera.

In order to process the images that are provided by the camera, a


computer/server must be available for constant use. The server will require
broadband access to the internet and a static IP address or domain name.
This is necessary to provide the video camera with a fixed destination for
where to upload its images. The server should have at least a 1.0Ghz CPU
and 1GB of RAM. It is recommended that the server have 2GB+ of RAM to
allow for quicker processing.

2.2 System Diagrams

This section details high-level diagrams of the system's operational concept,


as well as any available diagrams that showcase the proposed user interface
for the completed client application. A similar diagram of operational concept
is included in that section.

Figure 1 highlights the major functions of the system, identifying the flow of
information between the various components. The diagram depicts the
entire system which is composed of three main components: the outdoor
camera, the server (everything contained in the black box), and the end
user software running on a mobile phone.

The server will run two pieces of software. The first is an image processor
that determines where empty spots are, performs all statistical analysis, and
outputs the formatted data for the phone. The second piece of software is a
web server that allows the phone software access to the data.

Figure 1 - A block diagram of the functioning system.

The video camera is the source of data for the system and it provides the
data it collects by uploading it (using the File Transfer Protocol) to the F-
Spot server (the elements of which are contained within the black
rectangle). The captured images are first placed into the "Uploads" folder on
the server so that the image processing software can import it along with
previous images that can be used for comparison. Once the processing is
complete and statistics have been generated for the image, it will be placed
into the main website directory where it will be accessible to the public.

2.3 Major Component Descriptions

This section aims to cover in individual detail the components used to create
the F-Spot Finder system. The interactions between these components in
explained in Section 2.4.

Camera

The F-Spot system will make use of the E18904W Wireless IP Camera
provided by WirelessCameraOutlet.com. It is able to capture pictures and
video at 640x480 resolution and has the capability to upload time-stamped
pictures via file transfer protocol (FTP) over a standard 802.11b or 802.11g
wireless network. The camera will be configured to take pictures at certain
intervals to provide a consistent view of the parking lot; however, the
camera also provides a feature that allows this interval to be decreased
when motion is detected. This allows for images to be uploaded say every 60
seconds when no motion is detected and say every 10 seconds when motion
is detected. This allows us to avoid unnecessary processing of images when
the parking lot is idle.

File Transfer Protocol Server

The server will be configured to act as a standard FTP server that will allow
the video camera to transfer/upload the images that it captures. The FTP
functionality provides the critical connection between the wireless camera
and the image processing software. By setting the server to run a FTP
server, the camera will be able to transmit its data in a reliable way at a
variable frequency. That is, the FTP server acts like a "drop-off" point that is
willing to accept the images at any time. The speed at which the images can
be transferred from the camera to the server depends on the bandwidth of
both the server and the camera.
Web Server

The computer acting as the F-Spot server will also be configured to act as
web server. This allows for phones to easily contact the server for the latest
information about a particular parking lot. The web server will have a static
IP address or an associated domain name so that devices can always locate
it. The web server will not necessarily host a web site but rather host/serve
the availability data in a cross-platform format (namely XML). This allows
any application that is internet-capable to access the information and display
it to users; this opens up the possibility to create both mobile phone
applications (such as for Android, iPhone, or Blackberry) and web
applications (such as a WAP site or Web 2.0 widget for any website) that are
driven by our data.

Server

The server used to host the F-Spot software will only require standard
hardware, as can be seen with modern web servers. This hardware will be
needed to power the application software logic, and the virtual protocol
(web, FTP, database) servers. The server acts as the aggregation center to
store the data provided by the camera and the results provided by the image
processing software. The server is the central point of contact for all of the
other components.

mySQL Database Server

A standard mySQL database server will be used to store the current parking
lot status. While a database is largely overkill for such a small amount of
stored data, adding in database functionality allows for future flexibility and
expansion, such as allowing user feedback loops (discussed later in this
document).

Application Business Logic

The business logic for the application will mainly be responsible for handling
requests for information from the client devices, and for performing the
processing on the images. Internally, this processing could take a large
number of possible forms. Considerations include static image subtraction,
localized histograms, neural networks (initially trained with localized
histograms), or motion tracking. This component is the critical part of the
system, and the interface is therefore very limited to allow internal algorithm
flexibility.

Client Devices

The client mobile devices will be any mobile smartphone running the Android
OS. However, the server interface (as we will soon discuss) uses an easily
understood XML format, and the code can therefore be easily ported to
another smartphone platform.

Figure 2 - A sample lot details window.


Figure 3 - A sample lot selection window

2.4 Interface Description

This section covers the component parts that are accessible. In short, this
section aims to treat each major component of the system as a black box,
and detail the inputs and outputs to that box.

Camera

The camera unit has the ability to upload pictures remotely to the server
using File Transfer Protocol. This is an ability that comes standard with the
camera unit.
Figure 4 - Outdoor Wireless IP camera

File Transfer Protocol Server

The FTP server will listen on a standard FTP port (21) for incoming
connections from the camera. The FTP server will allow access to a single
directory, termed the "Image Drop Folder," or "drop folder" for short.

The FTP server will allow three distinct users to connect:


• A user intended to represent the camera
• A user intended to represent the application business logic
• A user intended to represent any remote administrators

The FTP server allows these users to upload images into the drop folder and
to download images from the drop folder. In terms of the overall process,
the next step is for the image processor (Application Business Logic) to take
the image from the drop folder.
Web Server

The web server will listen to requests for information on the standard web
port, 80. The web server will respond to two types of requests:
1. Open Parking Space Request
2. Lot Image Request

When a client is asking for open parking spaces, they must pass the server
the unique ID of the parking lot they are requesting. The server will return
XML (see open_space_sample.xml) informing the client which spaces are
open.

When a client is asking for a lot image, they can simply request one of the
preset resource indicators. For example, a client requesting
http://www.fspotfinder.com/pic/lot15.jpg should always receive the latest
picture available of the lot with ID#15.

Application Business Logic

The public application business logic interface will accept as input a stream
of images, or a video stream. Additionally, each image (or frame) must be
associated with the lot that the image (or frame) originates from. The
application business logic will output the determined number of parking
spaces available in each image or video frame group.
Figure 5 - A depiction of the Image Processing component of the F-Spot
Finder. Inputs and outputs to the 'black box' are shown

mySQL Database Server

The mySQL database server will listen on a standard mySQL port for
incoming connections from the application business logic, or from a remote
database administrator.

Client - Android Mobile Phone

The client mobile device will accept input from the user to select a parking
lot, contact the server, and display the information on the screen. Some
safety features may be implemented, given adequate time. An example of a
potential safety feature would be voice interaction.
The client will receive and read XML content from the server. It is worth note
that, although our initial client will be an Android OS phone, any other
mobile smartphone would work just as well with our application.

Figure 6 - A depiction of the interface exposed to the mobile devices via the
F-Spot finder web server.

2.5 Operational Concept

This section covers the interaction of the major components, using the
interfaces defined in the Interface Description section above. It also covers
talking about any configuration initialization needed to 'start' the system.

Operation Concept: Camera Unit


The camera is given login credentials to a File Transfer Protocol (FTP) server,
and is instructed to upload images to the server at standard intervals.
Initially, this interval will be set to twice a minute. If other factors indicate a
need for changing this value, or an advantage to doing so, then the camera
unit will be re-configured.

The camera will be spatially located above a parking lot, and will be
connected to a dedicated power source.

The camera will be configured to connect to the Vanderbilt wireless network.


Initial testing will be required to determine the effective operating hours of
the camera unit. It will be advantageous to determine the operating
conditions in terms of ambient light required as a function of distance from
the farthest corner of the parking lot, in clear weather conditions. If the
camera proves effective only in a narrow range of lighting conditions, server
side image processing may be able to compensate for this deficit. It is worth
note that the effective operating conditions depend heavily on the internal
algorithms used within the business logic. For example, a well trained neural
network would likely perform much better in low light conditions than a
localized histogram.

Operational Concept: Server - Application Software

The application software will be responsible for retrieving images from the
drop folder, and performing image processing on those images by passing
them to the application business logic. Upon retrieving picture files from the
drop folder, the application software will push a copy of that image to a
permanent storage folder. This permanent folder may be turned off at a later
point, for privacy reasons, but will be used initially to assist in debugging the
effectiveness of the system. The application software will also move the
image folder to a "Pull Folder," and rename the image using a standard
naming convention. For example, a user connecting to
http://www.fspotfinder.com/images/towers_lot.jpg will consistently be
presented with the latest copy of that parking lot. When a new image for the
'towers lot' arrives in the drop box, the new image will be copied to the pull
folder, and then renamed, overwriting the current 'towers lot' image.

The application software will receive as initial configuration input data about
the location and angle of each camera, relative to the lot that camera is
recording. Additionally, depending on the image algorithms used, the
software would also need information about the layout of each parking lot,
including the location of driving lanes and individual parking spaces within
each lot. The software will use the image processing techniques to determine
if each individual space is currently filled, and will store the results of said
processing in the mySQL database.

Operation Concept: Server - Image Processing Software

Originally a subtraction approach to detect empty spots was considered in


which each parking spot would be subtracted from a reference image. The
difference is compared to a threshold value to determine if the difference is
great enough to indicate a car parked in the space. This is demonstrated in
the figure below.

Figure 7 - An implementation of image subtraction.

The image processing software will instead use a histogram based detection
approach. The processor will break up the image into individual parking
spots and create a histogram for each spot. The histogram will then be
compared to the histogram of either a histogram from a previous image, a
histogram for a patch of the parking lot that we know shouldn't contain a
car, or both.

Figure 8 - An example of a histogram.


The image processing will be simulated in The Mathworks MATLAB software
before the software is implemented. This allows for rapid prototyping of a
proposed image processing technique before much work is invested in
writing the code for the image processor.

In addition to localized histogram approach, the team is examining the


potential benefits of using a neural network to estimate a parking lot. In
short, a neural network is a collection of millions of 'neurons,' and each
neuron can be given a set of discrete inputs, to which it responds with a set
of discrete outputs, similarly to a single AND logic gate. By taking a very
simple 'neuron' and duplicating it millions of times results in a highly flexible
neural network. This network is then 'trained,' by providing examples of
inputs and the desired outputs. The network slowly adjusts the constant
values on various neurons to create the desired outputs for the given inputs.
The end result is essentially a network that can recognize and report on
patterns in the input versus output parameters.

Figure 9 - Example Neural Network

In order to initially 'train' a neural network, many inputs must be provided.


We will consider using a localized histogram to perform large numbers of
input operations, understanding that most of these localized histogram
operations will result in correct lot values. After the system is deployed, a
user feedback loop embedded on the mobile devices will allow users to
report incorrect outputs. At a certain threshold, the user reported value will
be assumed to be correct, and our processing will be assumed to have been
faulty for that one image. That image, and the correct value, can then be
used to 'train' the network more, resulting in a system with a constant
increase in accuracy.

While the neural network approach is very promising, it hinges on an


accurate localized histogram approach, and therefore is impractical to
consider until the localized histogram algorithm has been developed and
tested.

Operation Concept: Server - Web Server

The server will also be responsible for responding to information requests


from mobile devices. This will be done through a web interface over
hypertext transfer protocol (HTTP). When the mobile device software makes
a request to the server using the HTTP GET or POST methods, the software
running on the web server will process the request and send back a
response. The software will be able to access and manipulate the mySQL
database in order to return statistical data. It will be able to construct XML
files containing the results of the request. It will also be able to return a
specifically requested image file. The web server software will be able to
accept user feedback and will store it in the mySQL database.

In addition to the software to support mobile device requests, the web


server will also have a web application running on it that will provide a web
interface to the parking lot data. This interface will be formatted to display
appropriately on a mobile phone to be able to reach a larger user base than
only people with Android powered devices or iPhones. The web interface will
be able to perform many of the same actions that can be performed on the
mobile device software.

Operation Concept: Mobile devices

The mobile device software will provide the user with an interface to our
parking data. When the user first opens the application, it will connect to
the web server and request a list of all available parking lots. It will display
this list to the user and allow the user to select a lot. The software will then
request the most recent image from that lot and the count of the empty
parking spaces in the lot. It will also request any user feedback that has
been submitted. The software will display the current count of parking spots
available in the selected lot, the most current image of the parking lot, and
the current user feedback. This screen will also provide the option to submit
user feedback. User feedback allows users to indicate that they do not think
the calculations made by the image processing are correct. They can also
indicate ow many spots they think are available. Finally this screen will also
provide a button to access the statistical data. When the button is pressed,
the client will request the statistical data for the lot from the server and
display it graphically to the user.

To obtain data to display to the user, the mobile devices will connect to the
web server using their mobile internet connection. A mobile device will
connect to a specific location, such as http://www.fspotfinder.com/
update.php. The mobile device will pass in a parking lot location, as a HTTP
GET parameter, resulting in a completed URL similar to
http://www.fspotfinder.com/update.php?loc=15. Upon connecting, this page
will return an XML document specifying the number of empty spaces in that
lot, and the specific space numbers that are available. A sample XML file is
included in the appendix section, titled parking_sample.xml.
3.0 Project Plan/Schedule

The overall plan is for the project to be full completed by April 10th. The full
Gnatt chart is included in the submission as shedule.project. The major
components are outlined in the figure below.

Figure 10 - Gnatt chart showing the overall project schedule.

If time permits, our group will perform an analysis of the difficulty of


modifying the camera to be completely solar powered, thus increasing the
mobility and ease of installation for our system.
4.0 Appendices

Includes:
XML Sample from server to mobile device
Specification sheet for E18904W camera
File: open_space_sample.xml

<lot name="Towers 1" id="1">


<free>3</free>
<space>12</space>
<space>16</space>
<space>27</space>
</lot>
Data Sheet: E18904 Specifications

Features

Simple and quick to setup, friendly user Support IE browser or any other standard
interface browsers

Water-proof and IR night vision (up to 20 Wi-Fi compliant with IEEE 802.11b/g,WEP
meters) encryption

High image and video quality with one-way Motion detection alert via email or upload
audio image to FTP

Allow remote viewing & record from anywhere Multi-level users management with password
anytime protection

Camera Specs Communicaton

Image Sensor 1/4" Color CMOS Sensor


Display Resolution 640 x 480 Pixels(300k Ethernet One 10/100Mbps RJ-45
Pixels)

Supported Protocol HTTP,FTP,TCP/


Lens f: 6mm, F:2.4 Mini. Illumination 0.5Lux
IP,UDP,SMTP,DHCP,PPPoE,DDNS,UPnP,GPRS

Lens Type Glass Lens Viewing Angle


Wireless Standard IEEE 802.11b/g
67Degree

Image Compression MJPEG Image Frame Data Rate 802.11b: 11Mbps(Max.), 802.11g:
Rate 15fps(VGA),30fps(QVGA) 54Mbps(Max.)

Resolution 640 x 480(VGA), 320 x


240(QVGA) Flip Mirror Images Vertical /
Wireless Security 64/128-bit WEP Encryption
Horizontal Light Frequency 50Hz, 60Hz or
Outdoor

Video Parameters Brightness, Contrast Computer Requirements:

CPU 2.0GHZ or above (suggested 3.0GHz)


Infrared Light 24 IR LEDs,Night visibility up to
Memory Size 256MB or above (suggested
20 metres
1.0GHz)
Dimension 140(L) x75(W) x80mm(H) Gross
Weight 830g (carton box package) Net Video Card 64M or above
Weight 650g ( accessories included)

Power Supply DC 5V/2.0A (EU,US,AU adapter


Supported OS Microsoft Windows 2000/XP/
or other types optional) Power Consumption 5
Vista
Watts (Max.)

Operate Temper. 0° ~ 55°C (14°F ~ 122°F)


Browser IE 5.0,IE 6.0, IE7.0 or other
Operating Humidity 20% ~ 85% non-
standard browsers
condensing

Storage Temper. -10°C ~ 60° (14°F ~ 140°F)


Certification CE,FCC
Storage Humidity 0% ~ 90% non-condensing

Вам также может понравиться