Monday, December 01, 2008

VxL code browsing in ViM

When working with a huge codebase, its nice to be able to browse
through the code lying in different directories.
Most other sites about ctags only deal with files in the same
directory, though.
I use vxl.sf.net, which consists of a huge source tree of C++
libraries, headers, and templates.
Here is my solution:

I installed exuberant-ctags (make sure this is the one in your system),

then I issued the following command:

ctags -R vxl lemsvxlsrc

from the directory containing the vxl source tree 'vxl' and the
internal Brown 'lemsvxlsrc' tree.
This generates a tags file. Now, tell VIM to always use that by
setting a tags search path:


" Set the tag file search order
set tags=./tags,tags,~/tags,/home/rfabbri/cprg/vxlprg/tags

You can add the above line to your ~/.vimrc or, even better, to a file
in ~/.vim/ftplugins/cpp_xxx.vim, where xxx is a custom extension you
choose.

Tuesday, October 28, 2008

Windows partition deleted.

Never used it, never needed it, never respected it. Now let me pump up my Linux environment with the Windows carcass left in my harddrive :-)

Pós-doc e Pós-grad na USP

Altamente recomendado!
Sem duvida o melhor grupo cientifico em que ja estive :)

==========================
OPORTUNIDADES PARA PÓS-GRADUÇÃO E PÓS-DOUTORADO
GRUPO DE COMPUTAÇÃO INTERDISCIPLINAR, IFSC-USP
Outubro de 2008 a Maio de 2009

Comunicamos diversas possibilidades para pesquisa, a nível de
pós-graduação e pós-doutorado, no Grupo de Computação Interdisciplinar (GCI)
do IFSC-USP. As principais áreas de pesquisa incluem mas não se limitam a:
1. VISÃO E IMAGENS
2. INTELIGÊNCIA ARTIFICIAL
3. REDES COMPLEXAS
3. BIOINFORMÁTICA E BIOLOGIA DE SISTEMAS
4. COMPUTAÇÃO DE ALTO DESEMPENHO
5. SISTEMAS DISTRIBUÍDOS E GRIDS
6. REDES DE COMPUTADORES
Os candidatos poderão ter formação anterior em computação, informática,
física, matemática, engenharia, estatística, química ou bioinformática.
Os trabalhos de pesquisa serão desenvolvidos nas respectivas áreas de formação
dos candidatos. As possibilidades de pós-graduação incluem o IFSC (nível 7
CAPES) e Bioinformática da USP (nível 5 CAPES).

PARA INFORMAÇÕES ADICIONAIS, visite a página
http://cyvision.if.sc.usp.br/~francisco/comp_inter/index.html

Thursday, October 16, 2008

John Maeda talk at Brown

The new RISD president, and former MIT Media-Labber John Maeda spoke
today at Brown.

It was an interesting experience, more of a light sequence of simple
facts that did the job of kepping people entertained; I feel nobody
was profoundly illuminated.
But maybe that's exactly the message - life simple facts and tidbits
can be more important than they seem. But at the same time it does
bring a sense of unfulfilment and apathy towards getting
anything explained, nailed down, or thoroughly illuminated. I had a
simple mild positive reaction to it. Simplicity and mediocrity
inevitably must have something in common. Its much like short Tao
wisdom.

One of his little ideas that really shook me was the fact that
technology is kind of saturating in the 21st century, and that what we
really need is more human reality, sensibility, and creativity into
our lives.
That's pretty much true. As a computer vision scientist, I think we
already threw hardware at problems a lot, and although it does bring
insights and immediate results, what we really feel the need for is
some human spark, human care, and human design to actually get
algorithms to be smarter, faster, and solve the innumerous problems
that fundamentally weren't solved before. Yes, like the vision
problem.

Friday, July 18, 2008

Pics of my dog, Eve.

She's a Beagle mix, but a very beautiful one probably a Beagador.

Wednesday, July 02, 2008

Congrats to my Angie

Angie just told me she scored straight A's this semester. A great feat!

Sunday, May 18, 2008

Augmented Virtual Reality in your Phone

Another awesome application of computer vision being materialized - point your cellphone's camera into the environment, and have it augment the video stream by tagging the buildings, restaurants, and attactions for you:
Enkin on Vimeo.

Wednesday, May 14, 2008

[linux] CVS server issue + solution

I was trying to use my computer to serve a CVS repository. Should be
simple as connecting through SSH,
but I was getting the error "unknown command server" whenever I typed
"cvs up -d"

The solution in Gentoo Linux was to re-emerge CVS with the server flag
enabled, which can be done by adding the line "dev-util/cvs server" to
/etc/portage/package.use

Monday, April 28, 2008

The Rise of Computer Vision

Computer vision, automatic image analysis applications, panoramic and
3D reconstructions, face recognition...
all this has attracted more and more attention in the press. Its is
always good to remind readers that this area remains largely unsolved,
and that it is very easy to claim something can be done and to talk
about it, but actually get it working is really really hard.

Some recent major news articles (on basic stuff without details)

A Google Prototype for a Precision Image Search
http://www.nytimes.com/2008/04/28/technology/28google.html?_r=2&oref=slogin&oref=slogin

Next-Generation CAPTCHA Exploits the Semantic Gap
http://tech.slashdot.org/article.pl?sid=08/04/23/0044223&from=rss

Lyrics of the day

Operation Ivy - Healthy Body Sick Mind

Expensive vitamin pills and wheat germ on your windowsill
Your schedule's hectic and you've got no time to kill
Earning money and you're spending it the right way
Just in such a rush you don't know if it's night or day
5:30 get up, run, run, run
Then you work eight hours slaving under the gun
Your little world's based on lies lies lies
Always rushing but you're never ever satisfied
Healthy body, Sick mind (working overtime)
Healthy body, Sick mind (Too hectic too hectic)
Healthy body, Sick mind (why don't you just survive)
Its just a matter of time sick body sick mind
The money you spend on running shoes could feed me for a week
Your plans are laid so well you can't even sleep
Pursuit of happiness got your life locked up under martial law
You got everything to lose so you're paranoid about some fatal flaw
5:30 get up and you run, run, run
Then you work eight hours slaving underneath the gun
Your little world's based on lies lies lies lies lies lies lies
Always rushing but you're never ever satisfied
Healthy body, Sick mind (working overtime)
Healthy body, Sick mind (Too hectic too hectic)
Healthy body, Sick mind (why don't you just survive)
Its just a matter of time Sick body Sick mind

Tuesday, April 01, 2008

True Happiness

This is a really inspiring video. It is pretty much the way I like to intuitively think about deep things in life, but hearing such a reasonable person speaking about it really made an impact on me. You should really watch the whole thing!

Tuesday, February 19, 2008

Just a funny pic

This is my niece Sara

Friday, February 08, 2008

Panoramic video used in google maps

The demo videos in this website is really cool - drag the mouse and you can look
around while the video is playing:

http://demos.immersivemedia.com

The images are acquired using an 11 lens camera. I'll put some more
cool info here if I get some more time, but it is all in that website.

Friday, February 01, 2008

Face reconstruction

I decided to make a series of posts about computer vision demos and software related to my research in 3D reconstruction and camera calibration. The following is a video I had seen about a year ago and and I thought it was a hoax: It turns out that it is really a true working system. In fact this group from Germany have published in major conferences and journals in my area. They use techniques that I work with in my PhD. Yes -- they have to be restricted to a face model, thats how they get away with making this work. But they also recover everything from a single image. Another one of their video: And there even seems to be an end-product based on this idea: www.gizmoz.com. Brown is teaching a course where they will try to implement this face reconstruction system as a class project: www.cs.brown.edu/courses/cs296-4

Tuesday, January 22, 2008

Structure from Motion

Angela found this interesting video showing how you don't need two eyes to have a very good impression of 3D: Original article: www.geekologie.com/2008/01/johnny_lee_is_my_hero_headtrac.php

Brazilian Cheese Bread Recipe

Here is my mom's cheese bread recipe:

Ingredients 2 Cups of milk 3/4 cup of corn oil (or any light tasting oil) 1 table spoon of salt 1-3 cups of cheese, either parmesan or romano (you can try other hard cheeses) 2 big eggs or 3 small ones 1 package of "povilho doce" flour, Yoki brand (or any other brand)

Instructions Mix milk, oil, and salt into a pan and bring to a boil, mixing the bottom once in a while. Be careful as the milk will suddenly boil and you don't want it to spill. Now empty the flour into a deep bowl. Pour the milk mixture over the flour, while mixing well avoiding the formation of clumps. Leave the dough sitting until it cools down (about 15 min, but they say the longer, the better). Now alternate between adding the eggs and the cheese, while working the dough with your hands in order to mix everything together as well as possible. The longer you squeeze the dough, the better. You can now wash your hands, then butter-up a cookie sheet or similar container, then add a little bit of oil to your hands, spreading it out. Make little balls of the desired size, adding oil to your hands whenever the dough starts getting sticky. Pre-heat the oven to 356F, and bake your Brazilian cheese bread.

The cheese bread takes around 15min to bake, sometimes longer. After those 15min, if the cheese bread is not light-gold, then continue baking and monitor the oven every 5min to see if it has reached the desired coloration. Usually you don't want it to get too brown, but tastes vary.

Friday, January 18, 2008

Computer vision and partial solutions

In computer vision, no problem has been completely solved. People tend to move to more complex problems in an anxiety to do something new, but the fact is that this fatally builds upon a very wobbly foundation of partial solutions. My fear is that there is a high risk that nothing really gets done in this process. Here is an excerpt from a researcher in my field:

Monkey Collects Corn Cobs.
Before an old and more basic problem is completely solved, one would accept a partial, suboptimal solution and use it in a solution to a new or supposedly more challenging problem. When a partial solution or result is found, one moves on again. Such a constant shift of focus is very counterproductive. When others try to revisit some of the problems, one would claim that the problems have already been addressed and there would be no need for any improvement. It is impossible to measure progress or compare different solutions if they are all to some extent partial. From a pedagogical perspective, from partial results like that, it is impossible to develop a systematic body of knowledge that can be effectively transferred to future students and researchers. -- Yi. Ma, in Warning Signs of Bugus Progress in Research in an Age of Rich Computation and Information, 2007.

That is something to think about. Nowadays, researchers have the big challenge of dealing with vast informational and computational resources. All this power also leads to lack of focus and fundamental research when used without discipline.

Saturday, December 22, 2007

Opening Up a Sony Cybershot DSC-L1

I purchased this little guy three years ago, but the lens cover stopped working, displaying the message "ERROR: TURN THE POWER OFF AND ON AGAIN" on the LCD. After searching the web, I only found useless manuals for sale or just basic consumer reviews. Since my fiancee and I already have two other Sony's, I figured I'd open up this one just as a saturday-afternoon adventure. Last time I opened up a consumer electronics device (other than a computer) I was probably 6. It was my first vinyl player whose plate suddenly stopped spinning. As usual, we took it to the nearest electronics repair shop, and they said they'd have to order this new motor, and that it'd cost a lot (sounds familiar?). So I got pissed and I just opened it up on my own at home, and starting touching random electronic components while the thing was still plugged to the wall. Finally, I touched something and the record player started spinning. It was a ridiculous potentiometer (a mere variable resistor)! Couldn't be easier and cheaper to fix, my dad just spent a few cents and I could hear my music again. Although I could have electrocuted myself that day, my mom still prides herself of her son's feat, more so than anything else I ever consciously did. Anyways, I figured I don't need to be an expert to be able to fix today's electronics. They have become more complicated but I am not 6 anymore, and sony electronics engineers haven't become all that much smarter, believe me, you'll see how cheap the shutter cover is. So lets start the step-by-step quest to open the Cybershot DSC-L1. (Do it at your own risk!)

First of all, go to radio shack and get yourself a set of precision screwdrivers. Get good ones since you need good grip here, as the screws will be really tight. Remove the battery from the camera. Now lets unscrew it, literally. There are 4 pairs of screws in total - 2 pairs on the bottom, 2 pairs on each side. The side screws become visible once you open the compartments for the batteries and the compartment for the DC power.

Ok, now that you removed the 8 screws, snap-out the plastic cover on the side where the DC input is. Then try to pull apart the two halves of the camera, the front cover from the back cover. One of the corners is kinda tricky, but just force it a little and it will snap open. Be careful but firm. Now you have the camera opened-up, it should look like this: You can now hook the camera to the outlet as the figure shows. Turn on the camera, and it should work as before. In my case, the shutter cover is stuck, so the lenses don't open or extend. Now notice that there are two switches that sense whether the shutter cover has retracted or not: In the case of my camera, I can fool it to extend the lenses by pressing the top left switch with a screwdriver:
Now unplug the power chord. The next step is to remove the plastic connectors from the front of the camera, so we can detach the two halves of the camera. First remove the two screws that hold the strap, one in the middle, the other near the motor. Do this by carefully using a precision screwdriver to help take the strap from under the plastic holders along its track. After some careful but trivial process, you obtain: Good. Now lets take care of that front cover. If so far it felt like you're performing a careful brain surgery, the next step will be more of an orthopedic surgery, except that you probably don't need a hammer. The problem is that the freakin' asses at sony actually glued the mechanics of the lens cover onto the front steel case. I thought I was doomed at this point, that the only way would be to order another front case, if sony still manufactures them, which I doubt. I got pissed and went for a high-risk brutal operation: to forcibly detach the black part from the steel case. Yes, it feels grotesque but it is the only way. Use a precision screwdriver to help you detach the two parts by "carving" into the glue. Sounds laughable, and looks even more laughable: Notice all the glue? Yeah, now you realize how the lens cover mechanics is by far the crappiest part of this camera. I don't know why sony tried to save money by doing such a shitty job at this, given that it is nothing compared to the cost of the software, signal processing and lens optics. Anyways, this is why probably every owner of the DSC-L1 will have problems with the lens cover at some point. Ok, back to business. Notice that there is a rod with a spring. Be careful with that little spring, it'll easily fall or jump all over the place. Anyways, the problem with my camera was that this rod wasn't perfectly in place, it seems, and that the gears weren't able to grasp the shutter cover. Now try to put that rod in place. First take the lens cover off and slide it all the way to the right of the rod. Carefully place the lens cover back in the track on the black plastic base by first fitting the bottom of it, then the top-right part of the rod, then, by squeezing the spring, fit the left part of the rod into the plastic case. You should feel it snap, and you need to put some pressure to get it to fit. After some patience with the damn spring, it is now time to reconnect the orange strap back into the black plastic support. Start by fitting and screwing the motor tight and move your way to the end of the strap. Plug the camera on the wall. You should end up with this: Now there is a subtle trick to it. The switch in the middle has to be pressed-in. Use a screw driver to press the switch and your finger to snap it in, then screw the middle switch: Ok, now you can turn your camera on to test the shutter cover. It should work! If not, post a comment and I'll try to help. If it worked, now you have to stick the black plastic component back into the metal cover. Do this by positioning it carefully then pressing firmly so that the glue sticks to the metal again (argh this horrendously cheap). Make sure the little transparent LED plastic on top of the shutter cover is in place. Now put the two halves of the camera back together, and screw the outer 8 screws back in. Snap the side plastic cover and you should have your >$100 value reward (>$250 back in the days):

Sunday, December 09, 2007

high quality eps in pdf

From http://electron.mit.edu/~gsteele/pdf/

One of the problems with pdf conversion is that most pdf converters
("distillers") are configured by default to always use lossy (DCT
Encoding) for color and grayscale images. For a scientific paper, this
produces very poor results. In order to get high quality figures in
the converted PDF, you can either tell the PDF distiller to use
FlateEncode or to use DCTEncode with a high quality factor. Here are
the postscript snippets that allow you to do this:

* Use DCTEncode with a high quality factor: this involves setting
a parameter called "/Qfactor" to a small number. The /Qfactor
parameter actually refers to "Quantization factor". Setting this to
0.15 uses the same settings as "Maximum Quality" mode for Acrobat
distiller.

systemdict /setdistillerparams known {
<< /ColorACSImageDict << /QFactor 0.15 /Blend 1 /ColorTransform
1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
>> setdistillerparams
} if

* Use FlateEncode: this way, the images that you see in the
converted pdf file will be exactly identical to the EPS images you
submit.

systemdict /setdistillerparams known {
<< /AutoFilterColorImages false /ColorImageFilter /FlateEncode
>> setdistillerparams
} if

To use these, simply open up your .eps file in a text editor such as
emacs and insert the text after the end of the "%" commented area at
the beginning of the file. This should automatically work with dvipdfm
conversion as well as the pdf conversion software used on the arXiv
server.