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
- Road Following for an Autonomous Vehicle in Dynamic Environments
- Project started on the 5th July. End on the 31st August.
- You can read my proposal here.
- You can read my 1st of August abstract here.
- You can read my 1st of August project report here.
- You can see my Poster (August 17th) here
Work
GOTChA chart
Goals:
| Technical Challenges:
|
Objectives:
| Approach:
|
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
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:
Make movies from Logged images
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...:
- login to skynet3 with user team or whatever
- open 3 terminal windows
- on all of them type the following:
- > ssh skynet6 //(now you have access to skynet6)
- > export SKYNET_KEY="6"
- on terminal window 3 type
- > cd dgc/modules/timber
- > ./timber
- when timber starts on terminal 3, type
- > start
- there will be an answer like *starting new session .... (YYYY_MM_DD/XX_YY_ZZ)
- on terminal window 2 type
- > cd dgc/modules/simulator
- > ./simulator
- > there should be a black screen with the state appearing
- on terminal window 1 type
- > cd dgc/modules/stereoFeeder
- > ./stereoFeeder --nowait --log fdrs --name myself --pair short --noestop
- or > ./stereoFeeder --help to know more options...
- you should see a black window with the frames being record.
- If you want to check that everything is working, navigate to skynet6 and into the folder temp/logs/YYY_MM_DD/XX_YY_ZZ. Check inside stereoFeeder that images are being recorded!
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
- install X11 from the developer CD.
- before compiling do > export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- if you dont want to do it everytime you compile, add the line to your .profile file inside your home directory. To do this, open Terminal, navigateto your home directory, do > pico .profile and the file will open . Add the line and save!
- compile with g++ `pkg-config --cflags opencv` -o morphology morphology.c `pkg-config --libs opencv`
- preferably run on X11, especially if you are using windows and displays.
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
Edge-Finding
- Good Doc on all edge-detection methods, has one error on one FreiChen kernel. Find it! eheheh
- Sobel (with code)
- Edge-detection
- Sobel (with code)
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 .
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.

![[Main Page]](../../../../upload/alice.jpg)