automated parking lot attendant sdp ’07 team frasier tom cleary matt regan bill ryan adam bailin
Post on 19-Dec-2015
218 views
TRANSCRIPT
Automated Parking Lot Automated Parking Lot AttendantAttendant
SDP ’07SDP ’07
Team FrasierTeam Frasier
Tom ClearyMatt Regan
Bill RyanAdam Bailin
Current SystemCurrent System•Disorderly•Confusing •Antiquated
Large Parking LotsLarge Parking Lots•The larger the parking lot, the more difficult it is to find a parking space
Choosing a LotChoosing a Lot
This is a bad lot
•Many obstacles
•Parking spaces are obscured
•Hard to map
The lot we choseThe lot we chose
This is a good lot
•Fewer obstacles
•Parking spaces easily identifiable
•Easier to map
HoweverHowever► Still things we need to worry aboutStill things we need to worry about
The CameraThe Camera►Axis 210 Network CameraAxis 210 Network Camera►Set up on 2Set up on 2ndnd Floor KEB Floor KEB
System OverviewSystem Overview
►Project all about image processingProject all about image processing►Two main parts: control and processingTwo main parts: control and processing
Need a central way to control systemNeed a central way to control system
►Basic steps of control systemBasic steps of control system 1) Take picture1) Take picture 2) Send to Matlab2) Send to Matlab 3) Receive from Matlab3) Receive from Matlab 4) Display to user4) Display to user
Controlling the SystemControlling the System
►Block diagram for control systemBlock diagram for control system
Generate readable result
Wait for timer to expire
Query camera, grab snapshot
Save snapshot locally with unique filename
Send image data to Matlabfor image processing
Matlab returns processing results
Display to user
Initialize system
►Take picture every 3 seconds using Take picture every 3 seconds using TimerTimer
►Run m-file from MatlabRun m-file from Matlab►Wait for Matlab to return resultsWait for Matlab to return results►Arrange results in human-readable Arrange results in human-readable
formform►Create image – layout of parking lot Create image – layout of parking lot
with indication as to which spots are with indication as to which spots are takentaken
Controlling the SystemControlling the System
SoftwareSoftware
►Using Microsoft’s .NET frameworkUsing Microsoft’s .NET framework►ClassesClasses
WebRequest() - request web resource WebRequest() - request web resource (image.jpg)(image.jpg)
HttpWebResponse() – returns jpg data HttpWebResponse() – returns jpg data streamstream
FileStream() – saves stream locallyFileStream() – saves stream locally Timer() - take pictures at intervalTimer() - take pictures at interval
User InterfaceUser Interface
► Will present user Will present user with computer with computer generated map of generated map of parking lotparking lot
Problems and SolutionsProblems and Solutions
►Learning curve for Visual Studio and Learning curve for Visual Studio and MATLABMATLAB
►Network congestion (wireless vs. wired)Network congestion (wireless vs. wired)►.jpg image size (640x480).jpg image size (640x480)►Delays to/from MatlabDelays to/from Matlab
We have our picture We have our picture on file, now what?on file, now what?
►Must read picture into MatlabMust read picture into Matlab““imread(‘c:\snapshot.jpg’)”imread(‘c:\snapshot.jpg’)”
►Image is 3-dimensional(red, green, Image is 3-dimensional(red, green, blue)blue)
Snapshot 480x640x3 uint8Snapshot 480x640x3 uint8
Our image ProcessingOur image Processing
► Basic idea: Image Differencing!Basic idea: Image Differencing! Is the new snapshot different from the base Is the new snapshot different from the base
snapshot?snapshot?► If so, something must have changedIf so, something must have changed
► Cut large snapshot into smaller piecesCut large snapshot into smaller pieces Each small piece is of one parking spotEach small piece is of one parking spot Pixels are manually mapped to each spotPixels are manually mapped to each spot
► All processing done on small pictures All processing done on small pictures individuallyindividually
Scaling ExampleScaling Example
► This is one example This is one example of pixel mappingof pixel mapping
► Most processing will Most processing will be done on these be done on these small picturessmall pictures
How Different?How Different?
► No two pictures are alikeNo two pictures are alike Glare, shadows, random ambiences.Glare, shadows, random ambiences.
► How different are two pictures?How different are two pictures? Correlation coefficient!Correlation coefficient!
► Variable which represents how different or alike two Variable which represents how different or alike two pictures arepictures are
► Between -1 and 1, 1 being two identical picturesBetween -1 and 1, 1 being two identical pictures A correlation coefficient below the threshold A correlation coefficient below the threshold
causes concern!causes concern!► State of parking spot is changedState of parking spot is changed► New snapshot becomes the baseNew snapshot becomes the base
A visual..A visual..
t0…… t5….. t10…
►A visual of how the program will run
Differencing IssuesDifferencing Issues
►Ambience's blocking camera positionAmbience's blocking camera position What if a truck blocks the view?What if a truck blocks the view?
►Solution! Timing bufferSolution! Timing buffer The base picture is only changed if the The base picture is only changed if the
new picture is different for a timenew picture is different for a time►Something that is blocking the camera will Something that is blocking the camera will
likely move awaylikely move away
More Issues…More Issues…
►Cars aren’t the only thing that can Cars aren’t the only thing that can cause a changecause a change Daylight gradually changes the new Daylight gradually changes the new
snapshot from the basesnapshot from the base
►Solution! Use full snapshotSolution! Use full snapshot A subtraction will show where the most A subtraction will show where the most
change took placechange took place
Determine Ambient Determine Ambient ConditionsConditions
►Look at area of Look at area of just pavementjust pavement
► If average of If average of pixels is pixels is similar, spot is similar, spot is probably probably emptyempty
MDR SpecificationsMDR Specifications
► Mount camera in good location overlooking a lot Mount camera in good location overlooking a lot near Knowles Engineering Building and connect to near Knowles Engineering Building and connect to network network
► Able to import an image into an image processing Able to import an image into an image processing programprogram
► Able to manipulate an image using basic image Able to manipulate an image using basic image processing techniquesprocessing techniques
Live view of cameraLive view of camera
http://abyss.ecs.umass.edu:8080
ImagesImages
RGB Grayscale
Edge Detection
ImagesImages
Picture 2
(Picture 1) – (Picture 2)
Picture 1
Looking ahead…Looking ahead…
► Need to explore the effects of weather conditions such as Need to explore the effects of weather conditions such as rain and snowrain and snow
► May need to consider alternate image processing solutions May need to consider alternate image processing solutions due to the following observations:due to the following observations: Pixel subtraction may not be accurate based on time of dayPixel subtraction may not be accurate based on time of day Obstructions (groups of people, cars driving through parking Obstructions (groups of people, cars driving through parking
lot)lot) Glare on window directly in front of camera – solved with box Glare on window directly in front of camera – solved with box
► Have many ways of determining spots – can average them, Have many ways of determining spots – can average them, have threshold for ‘spot taken’ eventhave threshold for ‘spot taken’ event
► We’re over the learning curveWe’re over the learning curve► Our demoOur demo
Questions?Questions?