Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

User:Tallberto

From DGC Wiki

Contents

Intro

Humberto Bento Ayres Pereira.

Studying @ Faculdade de Engenharia da Universidade do Porto

Email: tallberto[at]gmail[dot]com <- always there

MSN: hbapereira[at]hotmail[dot]com <- sometimes there

AIM: tallberto <- rarely there

SURF stub

This is the place to look for the Grand Challenge project on Alice, the automated vehicle for dynamic environments from Caltech.

Project


Work

GOTChA chart

Goals:
  • Create a Road module which:
    • characterizes the road in a lower level
      • has a suficient radius (~100m)
      • processes reflection and shadow (at least be able to distinguish from shadows and road features)
      • determines the shape and position of the curb
      • finds intersections and forks
    • allows the laneMarker step (Johnny) to further characterize the road:
      • determine lanes (central lines, dashed lines, yellow/white lines).
      • find special lanes (bike lanes, parking lanes)
      • identify parking spots
Technical Challenges:
  • The slicing of the Gabor wavelets filtering needs images bigger than the current 80x60 (done at 25 fps).
  • Relation between diverging vanishing points and the existence of a fork may not be trivial.
  • Updated. Filtering the reflection of light is dificult. A control for the automatic exposure is already coded.
  • Eliminating shadows on a multi-textured image is very dificult.
  • Done. Thoroughly understand what has been done.
  • A lot of features to implement in short time.
Objectives:
  • Started. - Start implementing image optimization (shadows/reflection).
  • Replaced. FT2: Run current road following on Alice, collect data and evaluate accuracy.
  • Done. Shop Test: Run current road following on Alice, evaluate basic RF and StereoProcess accuracy.
  • - Start implementing the curbs detection.
  • Done. CDR: Elaborate the global Architecture for Road Following algorithms and code. DIA chart.
  • Done. FTjuly26: Get Stereo Vision data on road situations with shadows, intersections and all. Identify tricky situations, classify ammount of valid pixels with Stereo. Field Test.
  • Done- Get edge-detection to work on received images.
  • Done- Identify lines from edge-detected images.
  • Done- Get top-view from edge-dection output.
  • - Start implementing fork detection. Other strategies. Evaluate improvements.
  • Skip FT3: Test everything to the exaustion. Not ready.
  • Done - Work on missing features and optimize.
  • Done. Corrected. - FT4: Assessment of the Road Following module with available progress. Camera stops logging after first frame. Logged images and worked on them afterwards.
  • Done. - Elaborate final sugestions for future work.
  • Done. - Elaborate report.


Approach:
  • Done. Read on Road Following, image processing, shadow and reflection filters.
  • Done. Check current developments.
  • Done. Define global procedure for Road Following image processing.
  • Implement Best strategy
  • Delayed. Use the horizontal slicing of the Gabor wavelets filtering for curb detection. Investigate the results with k piecewise segments and optimal solution; compare areas from RF-algorithm and human inspection.
  • Delayed. Implement Fork detection based on vertical slicing, diverging multiple vanishing points. Accuracy of detection for fork type (1,2,3 intersections)
  • Replaced. Delayed. Optimization based on heuristic trimming and poligonal slicing of the images; processing gain in rate.
  • Pushed Forward. Work on the road characterization and overall image processing with Johnny; provide low level image refinement such as edge-detection and line trimming. Make a simple module to interact with Johnny so that he can output to Jessica.
  • Done. New. Measure the accuracy of current stereo-cameras on road situations. Consider the use of new pairs by PGR and software developed at the JPL.
  • Done. Build and evaluate in terms of percentage of correct human-inspections the removal of non-smooth shadows.
  • Done. Performance booster with ROI (Regions Of Interest) in OpenCV. 8-15% faster by cutting Alice from bottom of image.
  • Future. Implement ROI with previous iteration road information, LADAR, stereo info, color layer info.

More on Objectives

Prof. Rasmussen suggested that a lot of work on curves is probably not needed, once the setting for the Darpa Grand Challenge 07 probably will not have very curvy roads and forks, but more like intersections! That caused the delay of some items and the imediatization of others as seen on the GOTChA chart. Also, road orientation for curved roads is already contemplated on his work where the scan-line is progressively moved up - a process similar to that of the slicing of gabor-wavelet filters! Link here his work. I will therefore consider in a higher meausre the image processing for ed-detection, eventhough the current Road Following will always be taken into account.


Image processing framework

This original image framework has been replaced with a newer version inside the Road Finding Module. It will live inside deprecated_utils for reference to how things can be done! You can see its documentation with a example.


Proposed Road Module

Image:Proposed_road_module.png

More here. Edit it: Media:Proposed_road_module.dia.

Walkthroughs


Deposit of small tips and tricks. I took a long time and learning to do this, so perhaps you should dispense that waste of time.

2D point mapping to 3D

Using the stereovision module, it is possible to map a point from the left stereovision camera into an (x,y,z) coordinate in the 3D world (either relative to the vehicle, or using the vehicle's state estimate, you could map that point to some global coordinate system).

The code currently lives in the stereoProcess class (utils/stereoProcess), which is used by the stereoFeeder module (modules/stereoFeeder). What you want is probably the SinglePoint method, documented here: http://gc.caltech.edu/doc/dgc-api/html/classstereoProcess.html#a27

That said, setting up the stereo and working with it is not trivial....you might try taking a look at the stereoFeeder module (especially stereoFeeder.cc) to see how it's done. Basically it involves creating a stereoSource object (drivers/stereoSource, which is the object that acts as the driver for the cameras), initializing it properly, and then having it grab images from the cameras. Then, you have to pass those images to a stereoProcess object, call the appropriate processing methods, and you can then get the coordinates of a pixel. Stereo is also very slow, in that it takes 100-300ms just to process one frame of data.

by Jeremy Gillula

Installing the Magick++ API

Instead of coding the whole image convolution operations needed to apply to each frame (Sobel, Prewitt, Laplacian of Gradient, Gaussian, other kernels), I just decided to use the ImageMagick API for C++.

Most (if not all) linux distributions have ImageMagick preinstalled, but not all of them have ImageMagick++. To install this API, first download the ImageMagick source Here. Unzip, untar, just decompress the whole folder into your home folder. Then follow the instructions inside the ImageMagick folder, in the file install-unix.txt (or other platform if that's the case). At least, you have to run the './configure' and 'make install' commands.

That should be it! To compile an application, test.cpp, just type: > g++ test.cpp -o test `Magick++-config --cppflags --cxxflags --ldflags --libs` dont forget those are ` and not '.

Get DIA

Dia is an opensource charting and diagraming application. I don't know if GC, SURF or the CDS use DIA or some other application, but this one works OK. There are windows and linux versions. Links:

DIA:charts&diagrams

DIA survival guide

Make movies from Logged images

someone just did that, so....

Running and Logging stereo-images

This works on Alice only. Theoretically you should log-in to skynet6, but skynet6's screen is messed up. So...:

Its done!

Killing those Acrobat Reader windows!

Just type gnome-system-monitor on terminal and then right-click on the process you want to kill (acroread)

Huge bug in OpenCV

"Update." Instead of making all those changes below, you might want to get the latest version from the OpenCV CVS repository. Any version newer than 0.9.7 should be working OK.

There was a bug causing a segmentation fault when I used the HoughLines2 function with the Probabilistic setting. After spending over 2 days trying different methods and searching the whole internet for answers, I discovered that there is actually a bug there!

In cvHough file of the OpenCV lib, the bug is in function: icvHoughLines_8uC1R()

Memory is allocted to sort_buf on line 115:

sort_buf = (int*)cvAlloc( sizeof(accum[0]) * numangle * numrho );

But is not freed on return of the function (170 - 173):

func_exit:

cvFree( (void**)&tabSin );

cvFree( (void**)&tabCos );

cvFree( (void**)&accum );

cvFree( (void**)&sort_buf); // new line! horray

By freeing this buffer, it no longer leaks.

OpenCV on Mac OS X

If you want to work with Open CV library on Mac OS X, now you can. Just download version 1.0rc1 (0.9.9) or later and follow the instructions inside INSTALL. Dont forget to

There was a bug causing a segmentation fault when I used the HoughLines2 function with the Probabilistic setting. After spending over 2 days trying different methods and searching the whole internet for answers, I discovered that there is actually a bug there!

In cvHough file of the OpenCV lib, the bug is in function: icvHoughLines_8uC1R()

Memory is allocted to sort_buf on line 115:

sort_buf = (int*)cvAlloc( sizeof(accum[0]) * numangle * numrho );

But is not freed on return of the function (170 - 173):

func_exit:

cvFree( (void**)&tabSin );

cvFree( (void**)&tabCos );

cvFree( (void**)&accum );

cvFree( (void**)&sort_buf); // new line! horray

By freeing this buffer, it no longer leaks.



Installing OpenCV

I managed to install OpenCV on skynet 6.

Somehow, if I do the usual ./configure , make and then login as root for the make install , some errors prevent the installation.

So the best way to do it is: - login on the machine as root, no ssh - get the latest cvs checkout from opencvlibrary.sourceforge.net - follow the instructions in INSTALL.txt - install first the latest ffmpeg on the machine - if something fails, reboot the machine, do a make clean and make uninstall and try again. It worked for me.. - if other libraries are missing or old, the make checkout can fail, but most code will still work. its something to watch for. The linux pro who will be incharged should maintain a wiki page with all the libraries required, available versions and whatever.

Where I am Linked

If this project had synapsis, these were mine. It includes other team members, documents, etc.

Johnny, also doing Road Finding stuff

Open CV

OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real time computer vision.

Shadow removal

Image manipulation

Magick++

Edge-Finding

Hough-Transform

Hough Transform

About

Motto

Worse than going to sleep without a deed is waking without a dream.

If you aren't working a lot, at least you should be dreaming a lot (about SURF of course).

Studies

I am currently studying Electrical & Computers Engineering, which is the same as Electrical Engineering & Computer Science... I am in the 4th year of the Course in the University of Engineering of the University of Porto, Portugal Google Pages.

Hobbies

You may see me playing soccer between the Baxter and Beckman buildings (just in front of the Beckman auditorium), or at wednesdays in the old gym, but what I really like to do is wryttinng.

Calendar

This is my Calender. You can follow where I'll be from here. If there's an empty slot, perhaps I'm free. Email me at tallberto[at]gmail[dot]com .

My Google Calendar

Extra planned stuff

I have been offered a scholarship for the World Wide Developer Conference from Apple Computer Inc, event that takes place from August 6 to Friday the 11th. Once the first days are the most important, I plan to stay there from sunday untill wednesday, which will be focused on science-solving technologies (from grid computing to fractal geometry representation and rendering...). If you would like to know something about these technologies or have a special question, I am sure I can deliver that to the Scientific panels there. Just contact me in the email provided... If you want something from apple wwdc at discounted prices, I am sure I can buy it for you - if its not too big.

More info from apple's WWDC website: WWDC website.

Other

More of me, of projects and of SURF at The Oz Corporation or Blog.

Retrieved from "http://kincora.cds.caltech.edu../../../t/a/l/User%7ETallberto_29be.html"

This page has been accessed 473 times. This page was last modified 16:12, 12 October 2006 by Humberto Pereira. Based on work by Johnny Zhang and Richard Murray.


[Main Page]
Main Page
Alice Docs
DGC07
DGC05
Categories
Recent changes
Help

Edit this page
Discuss this page
Page history
What links here
Related changes
User contributions

Special pages
Bug reports