InstaTrack White’s log

Comment to whitec at c m u dot e d u

 

07-11-05: back to space detection, but now no clicking and opening image,

zip_space_detection.zip contains
- lot_map_small.jpg: blueprint of HH-PH parking lot
- lines_for_space_detection.txt: sample input
lot_map_small.jpg
100 100 660 100
100 300 660 300
...
- detected_parking_spaces.txt: sample output
1        55        169        130        169        55        53        130        53
2        134        169        188        169        134        53        188        53
3        192        169        246        169        192        53        246        53
4        249        169        303        169        249        53        303        53
... (space id and 4 xy corners)
- space_detection.m: currently, working for this sample blueprint (HH-PH lot). Not
confirmed for others
- space_detection.exe: exe file of this section. it reads
lines_for_space_detection.txt, which reads an image , and outputs
detected_parking_spaces.txt
 
note: when using mcc in MATLAB, don’t put close all, clear all, or open any images. It only works with normal functions.

 

07-06-05: successfully, calculate T matrix transformation from one angle of camera (A) to another (B). It requires 6 pairs of points to compute T. BxT = A, so T = A x pseudoinv(B). A and B are 3x6, the last row is all 1. This is done in MATLAB and mcc to generate executable file.

matrix_transform.exe
reads 'xy1.txt' and 'blueprint.txt'
creates 't_matrix.txt'
 
xy1.txt or blueprint.txt example:
262   313   276   329   367   381
167   155   215   202   142   173
 
t_matrix.txt example:
0.8731         0.2532         158.3725
-0.2479         0.7559         63.5564
 -0.0000         0.0000         1.0000

For the entire project update, Ted’s Progress Slide [Thanks to Ted]

 

06-23-05: Nearly 100% complete up to color code spaces. Since my algorithm is a bit weak, parking spaces are not entirely filled up with colors. But they look pretty good enough.

Usage: user clicks start and end points that cover parking spaces along its main line. Require a pair of points to form a line. Right click indicates the last point on the image.

Code: usr_input.m

 

06-21-05: Ted gave ideas about user tool for finding spaces. Approaches are

 

06-17-05: After group meeting, we move on from previous two methods. Possible idea is Linear-Edge Map (LEM) and trapezoid fitting

 

06-16-05: After segmentation, intensity values from radon transform are too small for some lines, so method mentioned on 06-09-05 is not feasible. So move to Kevin Goh approach, which is

From this method, I am able extract some parking spaces; however, very limited on certain images because of threshold values such as

 

 

06-14-05:  try image segmentation using function bwlabel and regionprops in MATLAB (not sure what’s algorithm behind them)

·        

·         red dot is a centroid of each segment, possibly need to neglect parking spots in the corners (no complete 4 corners), keep 3 large area (> 1400)

·           

 

06-09-05: ‘find parking space’ using MATLAB based on synthetic image. Method is following

·         Edge (either sobel or canny)

·         Hough and Radon Transform – problem: 1) How to automatically compute the best threshold for all scenario to extract all lines (parking line), which are points with high intensity. 2) How to reduce # of points to only the correct amount (clustering).

·         Find m and b values from y = mx + b of all lines

·         Find # of intersection points

·         Form a parking space by connecting points

Current Result:

1)2)

3) 4)

5)

1) Edge detection 2) Radon Transform 3) using low threshold, picking up all possibilities 4) using high threshold, only major lines 5) using pts from 4) to draw y=mx+b lines

 

06-07-05: generate parking lot images using POV-ray, source: parking_lot pov file, output: ang1, ang2, ang3, ang4, ang5, ang6, ang7