Monthly Archives: March 2009

Optimization Library

I have been spending weeks to write a conjugate gradient program to do multi-dimensional minimization. But the results didn’t seem to be right. I’m also reluctant to use Matlab optimization toolbox, although it is very powerful. So I searched again and again, and re-found GSL. GSL is numerical library for c/c++ programmers, of course it includes minimization functions. Also, opt++ ( seems to be not bad.

stack a set of images

I use to write my own opencv program to stack a set of images for viewing, e.g. rectification results of multiple images. But today I want to give ImageMagick a try. I searched on-line, and find many extremely useful features of ImageMagick. To stack a set of images, I could use ‘convert’ command with option ‘+/-append’. I could also ‘montage’. Some examples go follows:

  montage -label Balloon   balloon.gif  \
-label Medical medical.gif \
\( present.gif -set label Present \) \
\( shading.gif -set label Shading \) \
-tile x1 -frame 5 -geometry '60x60+2+2>' \
-title 'My Images' titled.jpg


 montage -font Times-New-Roman -pointsize 24 \
-label (a) F28_IMG_0001.ppm \
-label (b) F28_IMG_0002.ppm \
-label (c) F28_x.ppm \
-tile x1 -geometry +10+10 titled.jpg

These commands are really cool. I don’t need Illustrator anymore for preparing my paper figures.

T Slot Aluminum

I always tried to find good materials to build the camera array with low cost. However, the only think I can only find is slotted metal at Low’es and Homedepot. These metals are very heavy, and are not easy to align the camera array either. Slide bar in the market ( is way too expensive.

Today I found T slot aluminum. This is very good to build staffs. With linear bearing, I can build a slider on the rail very quickly, and I could also add a fastener to the side of the roller to fix the position of the camera.