I was just wondering how useful would it be to have an open source class scheduler. I mean, create a GTK or Qt based scheduler using Hungarian Matching or some other Operational Research algorithm in order to schedule teachers and classes or other types of tasks.
I've seen commercial versions of around U$100.00, but I'm still not sure how much benefit it would be to the open source community.
I'm tracking this post's visits, so, the number of Google searches that lead here will be tracked and I'll decide if it's worth based on this number and comments to this post.
Thanks for your feedback
This blog is focused on GPGPU, OpenCV, OpenGL, Bio-informatics, Segmentation, Livewire and IT news.
Saturday, February 16, 2008
Monday, February 11, 2008
GPUWire - A GPU implementation of the livewire image segmentation algorithm
This video shows one of the results of my master thesis which is a solution to the Single Source Shortest Path problem through the use of a GPU.
The idea belongs to the field of GPGPU and my approach was using the GPU in order to parallely expand vertices just like the Delta-stepping algorithm.
Source code, as well as my master thesis can be found at http://code.google.com/p/gpuwire/.
The GPU API used was NVidia's CUDA.
I'm currently making small corrections to the thesis text as well as trying to clean up the code.
It's interesting to notice that the GUI used is Qt. I'll probably post an entry explaining how to glue CUDA and Qt.
If you're interested, please leave me a comment.
The idea belongs to the field of GPGPU and my approach was using the GPU in order to parallely expand vertices just like the Delta-stepping algorithm.
Source code, as well as my master thesis can be found at http://code.google.com/p/gpuwire/.
The GPU API used was NVidia's CUDA.
I'm currently making small corrections to the thesis text as well as trying to clean up the code.
It's interesting to notice that the GUI used is Qt. I'll probably post an entry explaining how to glue CUDA and Qt.
If you're interested, please leave me a comment.
Thursday, January 24, 2008
WebCam + OpenGL + OpenCV head tracking = Immersive 3d environment
UPDATE! This sample has evolved to a project sponsored by Google. Please check http://code.google.com/p/ehci
This is my first attempt to create a 3d immersive environment using a simple webcam to track head's position.
This video shows my approach to combine OpenCV head tracking with a 3d OpenGL environment so that the user will see objects from their head's point of view. Since head tracking is 2d, no depth information is obtained. Besides that, it takes the face recognition algorithm around 200ms, which yields low fps (about 5). I'm currently trying to improve that :)
*******
Well, thanks to Walter Piechulla I could decrease detection time to around 20ms using the flag CV_HAAR_FIND_BIGGEST_OBJECT - which makes opencv detect only one face - in a parameter to the function cvHaarDetectObjects, that looks like this now:
cvHaarDetectObjects( small_img, cascade, storage, 1.1, 2, CV_HAAR_FIND_BIGGEST_OBJECT,
cvSize(30, 30) );
(by the way, I had to update OpenCV from CVS)
As soon as I get some time, I can make another video showing speedup :D
Thanks Piechulla
********
The new version is available here: http://danielbaggio.blogspot.com/2008/03/enhanced-version-of-head-tracking-and.html
This is my first attempt to create a 3d immersive environment using a simple webcam to track head's position.
This video shows my approach to combine OpenCV head tracking with a 3d OpenGL environment so that the user will see objects from their head's point of view. Since head tracking is 2d, no depth information is obtained. Besides that, it takes the face recognition algorithm around 200ms, which yields low fps (about 5). I'm currently trying to improve that :)
*******
Well, thanks to Walter Piechulla I could decrease detection time to around 20ms using the flag CV_HAAR_FIND_BIGGEST_OBJECT - which makes opencv detect only one face - in a parameter to the function cvHaarDetectObjects, that looks like this now:
cvHaarDetectObjects( small_img, cascade, storage, 1.1, 2, CV_HAAR_FIND_BIGGEST_OBJECT,
cvSize(30, 30) );
(by the way, I had to update OpenCV from CVS)
As soon as I get some time, I can make another video showing speedup :D
Thanks Piechulla
********
The new version is available here: http://danielbaggio.blogspot.com/2008/03/enhanced-version-of-head-tracking-and.html
Tuesday, January 15, 2008
Avoiding ACM Web Account to download papers
In case you are a researcher and you really want that paper but ACM web account is blocking you from seeing it, you might try the following:
Besides that, ACM Web Account seems to be a great service. I would really recommend getting one account :)
Hope this post can help you!
************** this text can be useful for google indexing *******************
Full-Text is a controlled feature.
To access this feature:
- Access the paper from your university - some universities have granted access because of their IP, which makes it very easy for researchers to download the papers
- Get yourself an ACM Web Account
- In case you are a researcher and you simply are not at the university when trying to see the paper, an useful workaround can be looking for the author's homepage or the congress that published the article
Besides that, ACM Web Account seems to be a great service. I would really recommend getting one account :)
Hope this post can help you!
************** this text can be useful for google indexing *******************
Full-Text is a controlled feature.
To access this feature:
- Please login with your ACM Web Account.
- Please review the requirements below.
Friday, December 28, 2007
From OpenSocial's sandbox

I've been playing out with OpenSocial's API from within Orkut's sandbox for a while. This API intends to integrate social sites like Orkut, MySpace, Hi5 and others through a javascript API.
In order to test, I've signed up for a sandbox account and started reading the documentation api .
After creating the Hello Worlds gadgets - by the way, in order to use Orkut's sandbox, Google gadgets need to be created - I've came across the output on the right.
I'm still wondering why so few friends are retrieved... maybe it's a sandbox limitation... I don't know... I've just posted this to find it out.
****
Ooops... they've just answered that... only friends who are also in the sandbox are listed... that's why it only retrieves a couple friends :)
Small ruby script to remotely run a program
In case one needs to remotely run a program from some ruby application, an easy way to do that is using Net-ssh. It remotely runs commands through ssh.
After installing the gem through a simple
the following script can be run in order to call the 'ls' application, used to list directory's contents:
After installing the gem through a simple
gem install net-ssh
the following script can be run in order to call the 'ls' application, used to list directory's contents:
require 'rubygems'
require 'net/ssh'
session = Net::SSH.start('your-host','your-user', 'your-password')
session.process.open("ls") do | ls |
ls.on_stdout do | p, data |
puts "#{data}"
end
end
Tuesday, October 23, 2007
What you should know before diving into GPGPU study
Before choosing your Graduate/Master/PhD thesis subject as something in GPGPU, you should be aware that:
1- A new technology, from NVidia, called CUDA, has been created and you don't need to use Graphics API to make general purpose programming using GPUs. Besides being outdated, confusing and not productive, graphic API code lacks several features available from CUDA, specially the ability to make scatter. Unfortunatelly programs written for CUDA are only going to run in GeForce 8000 series (and later), QuadroFX 5600, 4600 and Tesla C870, D870, S870. Other frameworks as Brook and RapidMind should be checked as well.
2- You need to understand that a GPU, as you'll use it, is a set of SIMD (single instruction multiple data) processors grouped in multiprocessors. It means THEY WILL ALWAYS EXECUTE THE SAME INSTRUCTION during a clock cycle, but in different data. So, you should not think of them as being able to execute threads in a fashion like a dual-core Intel would, or even the Cell processor. Make sure your algorithm can be expressed in such a way.
3- Memory transfers can become potential bottlenecks for your application. Remember that, when programming GPU code, the data you access needs to be located at the global memory space in GPU. In order to load something there, you'll firstly need to download data to the GPU. As a rule of thumb, it takes a GeForce 8600M GT around 6ms to download a 1024x1024 pixels image (around 4MB). And YES, it might be the single detail that will prevent your application from running faster on GPUs.
4- There's some initialization time for the GPU (which is around 100ms). If you need to run only one iteration of your algorithm, and it is supposed to take less than 100 ms... CPU will probably be the best choice.
5- There's very small shared memory for GPUs. CUDA architecture makes available is 16KB per multiprocessor. It means, that if you are running 256 threads in a single multiprocessor (which is what you should be generally doing) you'd have 64 Bytes per thread... which are about 16 integers... if you can solve your problem with such a small amount of memory, your application will be extremely fast, because shared memory access is almost as fast as register access. Else, you'll need to write to global memory... it takes around 300 cycles to retrieve a value from global memory - which has around 256MB depending on your GPU. If you cannot hide this latency processing the retrieved data while other requests are made, your application will really lag in this point. A good strategy is to allow other threads to process the data while others are waiting for memory requests. An application heavily focused on memory requests will suffer dramatically because of this.
6- Only single precision floating point registers are available. It means around 7 digits of mantissa. Of course, future GPU generations will include double precision values.
7- Linear algebra problems will most probably run very fast on GPUs.
8- Large arrays, such as N-Body simulations are also a good fit for GPUs.
Some benchmarks on CPU, Cell and GPUs are included in this paper. It should be noticed, though, that the article hasn't been accepted for the congress, mainly because this application really does not require much processing from Cell or GPUs, as it spends most of the time on memory transfers. For more info, a great article about the subject and a great site www.gpgpu.org.
*Source: NVidia CUDA Programming Guide and personal experience with GPGPU
1- A new technology, from NVidia, called CUDA, has been created and you don't need to use Graphics API to make general purpose programming using GPUs. Besides being outdated, confusing and not productive, graphic API code lacks several features available from CUDA, specially the ability to make scatter. Unfortunatelly programs written for CUDA are only going to run in GeForce 8000 series (and later), QuadroFX 5600, 4600 and Tesla C870, D870, S870. Other frameworks as Brook and RapidMind should be checked as well.
2- You need to understand that a GPU, as you'll use it, is a set of SIMD (single instruction multiple data) processors grouped in multiprocessors. It means THEY WILL ALWAYS EXECUTE THE SAME INSTRUCTION during a clock cycle, but in different data. So, you should not think of them as being able to execute threads in a fashion like a dual-core Intel would, or even the Cell processor. Make sure your algorithm can be expressed in such a way.
3- Memory transfers can become potential bottlenecks for your application. Remember that, when programming GPU code, the data you access needs to be located at the global memory space in GPU. In order to load something there, you'll firstly need to download data to the GPU. As a rule of thumb, it takes a GeForce 8600M GT around 6ms to download a 1024x1024 pixels image (around 4MB). And YES, it might be the single detail that will prevent your application from running faster on GPUs.
4- There's some initialization time for the GPU (which is around 100ms). If you need to run only one iteration of your algorithm, and it is supposed to take less than 100 ms... CPU will probably be the best choice.
5- There's very small shared memory for GPUs. CUDA architecture makes available is 16KB per multiprocessor. It means, that if you are running 256 threads in a single multiprocessor (which is what you should be generally doing) you'd have 64 Bytes per thread... which are about 16 integers... if you can solve your problem with such a small amount of memory, your application will be extremely fast, because shared memory access is almost as fast as register access. Else, you'll need to write to global memory... it takes around 300 cycles to retrieve a value from global memory - which has around 256MB depending on your GPU. If you cannot hide this latency processing the retrieved data while other requests are made, your application will really lag in this point. A good strategy is to allow other threads to process the data while others are waiting for memory requests. An application heavily focused on memory requests will suffer dramatically because of this.
6- Only single precision floating point registers are available. It means around 7 digits of mantissa. Of course, future GPU generations will include double precision values.
7- Linear algebra problems will most probably run very fast on GPUs.
8- Large arrays, such as N-Body simulations are also a good fit for GPUs.
Some benchmarks on CPU, Cell and GPUs are included in this paper. It should be noticed, though, that the article hasn't been accepted for the congress, mainly because this application really does not require much processing from Cell or GPUs, as it spends most of the time on memory transfers. For more info, a great article about the subject and a great site www.gpgpu.org.
*Source: NVidia CUDA Programming Guide and personal experience with GPGPU
Monday, October 22, 2007
latex error .sty not found
Hi guys, if you've come into this error:
"latex error your-new-file.sty not found"
while building your .tex files, and you are sure you've just put them in some sort of directory like:
/usr/share/texmf/tex/latex/your-new-directory
you should run the command
$ texhash
and then, latex should be ready to find your style files
:)
"latex error your-new-file.sty not found"
while building your .tex files, and you are sure you've just put them in some sort of directory like:
/usr/share/texmf/tex/latex/your-new-directory
you should run the command
$ texhash
and then, latex should be ready to find your style files
:)
Tuesday, October 09, 2007
Saturday, September 08, 2007
Good friends @ Northwestern University - Robert H. Lurie Comprehensive Cancer Center

Well, just for the records, I'd like to leave this picture here, with all the great colleagues I've met in Northwestern University. Special thanks to Simon, Dong, Rhett and Pan Du for the help along the project :)
Friday, September 07, 2007
Summer of Code final project
GeneQuad, an automatic way to describe genes based on their GeneRif (Gene Reference into function) is available through a rails web application, in the following address:
GeneQuad
The other project, GenDex is also available.
Both of them are intended to be useful in cancer research field as well as bio-informatics.
Guess what's the most researched gene in 2007?
GeneQuad
The other project, GenDex is also available.
Both of them are intended to be useful in cancer research field as well as bio-informatics.
Guess what's the most researched gene in 2007?
Tuesday, June 12, 2007
Rising Stars
I've made some research finding out the genes that had more importance according to published articles in the last years. The findings are reported in these pages http://code.google.com/p/genequad/wiki/RisingStars and http://code.google.com/p/genequad/wiki/DetailsRisingStars
On the other hand, the ones that had less importance are also reported at http://code.google.com/p/genequad/wiki/ShowStoppers
On the other hand, the ones that had less importance are also reported at http://code.google.com/p/genequad/wiki/ShowStoppers
Monday, June 11, 2007
Importing pubMed database with a ruby script using bioruby
If you desire to import pubMed database, a useful library for ruby may be used: bioruby. This post http://code.google.com/p/genequad/wiki/ImportingPubMed shows how to do that.
Zipf's Law in geneRIF
This post http://code.google.com/p/genequad/wiki/ZipfsLaw shows a study about Zipf's law in geneRIF.
Importing geneRIF database to sqlite3
Ok, if someone wants to import the txt file from NCBI to sqlite3, http://code.google.com/p/genequad/wiki/ImportingGenerif tells you how to do that. A procedure just like this may be used to import to other databases as well. Congrats NCBI for geneRIF!
Wednesday, May 30, 2007
Some studies about Zipf's law and genes
Wednesday, May 23, 2007
Trick to change octave's plot background
Well, I was trying to change octave's plot background, but I found no easy way, so I changed the way gnuplot is called (gnuplot is the program octave calls to plot the graphics). Simply go to /usr/bin, log as root, and backup gnuplot as
Rename it to gnuplot1:
Now create the script gnuplot by typing
Create this script:
Add execution permission through chmod +x gnuplot
It will make a standard call to gnuplot change to gnuplot -background white, which will change your plots background in octave.
If you have a better way to do this, please leave me a comment
Have fun :)
cp gnuplot gnuplot.bak
Rename it to gnuplot1:
mv gnuplot gnuplot1
Now create the script gnuplot by typing
emacs gnuplot
Create this script:
#!/bin/bash
/usr/bin/gnuplot1 -background white
Add execution permission through chmod +x gnuplot
It will make a standard call to gnuplot change to gnuplot -background white, which will change your plots background in octave.
If you have a better way to do this, please leave me a comment
Have fun :)
Thursday, January 04, 2007
IVUS Plugin available
In order to make my graduation thesis fully repeatable, I'm making the IVUS plugin available. This ImageJ plugin adds the functionality to slice an image frame sequence in 4 directions, so that longitudinal segmentation may be applied. It is used for Coronary Intravascular ultrasound images.
The download is available here http://sourceforge.net/project/showfiles.php?group_id=171446&package_id=195893&release_id=475672 under the ivussnakes package in IVUS Plugin release.
Enjoy it!
The download is available here http://sourceforge.net/project/showfiles.php?group_id=171446&package_id=195893&release_id=475672 under the ivussnakes package in IVUS Plugin release.
Enjoy it!
Friday, December 15, 2006
IBM Cell Workshop with Peter Hofstee

So, these days have been great!!! I was able to present a purpose from ITA to Peter Hofstee!!! I just can't believe such a genius was here in Brazil and we had the opportunity to interact with him in two days of workshops.
Besides him, Bob Szabo was there and I was able to show him www.cellperformance.com. It was great!
I'll be able to post some of what happened these days in the following posts! Keep tuned!
Thursday, December 07, 2006
My Graduation Thesis is Online
Well, I've finally made my graduation thesis available online. I hope it may help someone :)
The link is here: http://downloads.sourceforge.net/ivussnakes/TG.pdf
The abstract is the following:
This graduation thesis deals with intravascular ultrasound (IVUS) image segmentation through LiveWire and Snakes algorithms. As the type of ultrasound studied is the one from coronaries, there’s an initial detailing of the medical environment in which the problem is inserted.
The introduction is followed by an explanation of how LiveWire technique works, which is by calculating the shortest cost path between two pixels of the image. There’s a discussion about the implementation, using binary trees and a heap data structure. This is followed by the evaluation of which costs should be adopted, which were: modulus and direction of the gradient, the laplacian and a non-linear function.
Then, Snakes algorithm is described, which simulates a set of vertices submitted to one internal field of energy and another external one. There’s also a discussion about the number of iterations to be adopted as well as the values used as parameters.
It is explained, so, how simulated images, used for evaluation, were generated. Besides, a model for Speckle noise is described as well as the filter to which the images were submitted.
There’s a brief discussion on how the algorithms were implemented, with a special focus on ImageJ platform and it’s extensibility features.
The results are, then, described, with each of the simulated image types: noiseless, with Speckle noise and filtered. The main results found are that LiveWire has better segmentation quality and is slightly affected by noise, while Snakes is faster and is practically not affected by wrong initial points retrieved from longitudinal segmentation.
There’s, then, the conclusion, describing what was found, focusing the high velocity of Snakes technique, followed by good results. Although better results were found for LiveWire, the processing time was about 500 times higher, what might indicate this method is not desirable. Due to the good results found with simulated images, the developed platform promises to work efficiently in a medical environment, after submitted to validation by specialists.
I've got more news! Stay tunned!
The link is here: http://downloads.sourceforge.net/ivussnakes/TG.pdf
The abstract is the following:
This graduation thesis deals with intravascular ultrasound (IVUS) image segmentation through LiveWire and Snakes algorithms. As the type of ultrasound studied is the one from coronaries, there’s an initial detailing of the medical environment in which the problem is inserted.
The introduction is followed by an explanation of how LiveWire technique works, which is by calculating the shortest cost path between two pixels of the image. There’s a discussion about the implementation, using binary trees and a heap data structure. This is followed by the evaluation of which costs should be adopted, which were: modulus and direction of the gradient, the laplacian and a non-linear function.
Then, Snakes algorithm is described, which simulates a set of vertices submitted to one internal field of energy and another external one. There’s also a discussion about the number of iterations to be adopted as well as the values used as parameters.
It is explained, so, how simulated images, used for evaluation, were generated. Besides, a model for Speckle noise is described as well as the filter to which the images were submitted.
There’s a brief discussion on how the algorithms were implemented, with a special focus on ImageJ platform and it’s extensibility features.
The results are, then, described, with each of the simulated image types: noiseless, with Speckle noise and filtered. The main results found are that LiveWire has better segmentation quality and is slightly affected by noise, while Snakes is faster and is practically not affected by wrong initial points retrieved from longitudinal segmentation.
There’s, then, the conclusion, describing what was found, focusing the high velocity of Snakes technique, followed by good results. Although better results were found for LiveWire, the processing time was about 500 times higher, what might indicate this method is not desirable. Due to the good results found with simulated images, the developed platform promises to work efficiently in a medical environment, after submitted to validation by specialists.
I've got more news! Stay tunned!
Subscribe to:
Posts (Atom)

