Screw tonemapping: long live enfuse!


Because I recently bought a new motorcycle I wanted to sell my old GS500. Most important when selling your stuff online: good pictures of the item you’re selling. So I dusted of my Nikon, gave my trusty Suzuki a nice cleaning and started taking pictures. With HDR in my mind I used a little tripod and took 3 pictures of every position with the bracketing function. +2EV, 0EV and -2EV. No raw but plain jpeg’s. For some reason I don’t like raws. It just takes too much time to get them ready for publishing.

I shot 10×3 pictures, uploaded them to my laptop and started looking for some HDR/tone-mapping software for linux. Qtpfsgui looked very nice and I tried it out. It was available from the ubuntu repositories. I have the Intrepid repositories enabled and installed hugin-tools (a dependency for qtpfsgui) from there. The added benefit was that qtpfsgui could align the pictures for you. I used a tripod but I didn’t use a remote control. So some pictures were not perfectly the same.

Qtpfsgui seemed like everything I needed: a nice gui, automatic aligning of images and a lot of different algorithms for creating tone mapped images.

But I couldn’t create a realistic tonemapped image. Qtpfsgui creates a lot of those fantasy-like HDR images. Nice if you like the style, but I wanted realistic images. Exit qtpfsgui.

After doing some more research I found a commandline utility called enfuse. There were some very positive and exciting comments on it, so I decided to check it out. I wanted enfuse, which is part of the enblend package on ubuntu. But the newest enblend package on Ubuntu was 3.0. And I needed something newer for enfuse to be part of it. So I had to compile it from source. What I did:


sudi aptitude install build-essential
sudo aptitude install pkg-config libtiff4-dev libboost-graph-dev libboost-thread1.34.1 liblcms1-dev libglew1.5-dev libplot-dev libglut3-dev libopenexr-dev libopenexr2ldbl libxi-dev
cd ~/src
wget http://kent.dl.sourceforge.net/sourceforge/enblend/enblend-enfuse-3.2.tar.gz
tar -xzvf enblend-enfuse-*.tar.gz
cd enblend-enfuse-*
./configure
make

You can optionally do:

sudo make install

I decided to first try it from the build directory:

cd ~/Pictures/test
~/src/enblend-enfuse-3.2/src/enfuse DSC_080* -o enfuse_test.tiff

And it worked perfectly. Without any tweaking of the parameters, it resulted in a nicer, better looking image than with a fully tweaked qtpfsgui.

But…. what if your images aren’t perfectly aligned as in my case? Install the latest hugin-tools package which contains the align_image_stack program:

sudo aptitude install hugin-tools=0.7.0~svn3191+beta5-1ubuntu1
align_image_stack -a aligned_ DSC_080*
~/src/enblend-enfuse-3.2/src/enfuse aligned_* -o enfuse_test_2.tiff

Perfect! I would really recommend enfuse.

Maybe I’ll create a small ruby script to ease this process.

Deploying, merb, capistrano & passenger

First of all I did a:

capify .

And used this deploy.rb

Then to setup the current, releases, etc. directories:

cap deploy:setup

Then, when I tried to login via ssh with shared key: nothing!
After some searching I found out that capistrano messed up the permissions on the .ssh directory :(

To fix it:

chmod 755 $HOME
chmod 755 $HOME/.ssh
chmod 644 $HOME/.ssh/authorized_keys

Installing merb on phusion passenger


I’ve created a little merb app for a customer. The reason I chose merb because I really like the :provides-api. The app had to generate a lot of xml, so using Merb was really nice.

But the installation on the server was a little troublesome. I had to install some gems (which I of course forgot to do) and I had to figure out how the file permissions had to be.

First step: installing software

aptitude install build-essential ruby1.8-dev libxml2-dev libmysql++-dev
gem install merb datamapper do_mysql merb_datamapper --include-dependencies --no-ri --no-rdoc
gem update --include-dependencies
passenger-install-apache2-module

Step two: project’s dependency packages

aptitude install libmagick9-dev libtidy-0.99-0
gem install orderedhash shared-mime-info rmagick tidy

But the big problem here was libtidy! All the packages keep segfaulting. So I had to use the Gutsy or Feisty package (don’t remember which one exactly. One of the two :) ).

Step three: config.ru

Because I wanted to run Merb on apache2 with Phusion passenger I had to create a config.ru file. The contents of the file can be found on the merbivore wiki.

Last step: Adjusting permissions

I was ready to start merb, but when I tried to start it, it kept complaining about permission errors. So after a little fiddling I chmod’ed the whole shebang to 750. I think it will be solved if I install suexec on the server.

Brother HL-2030 & Ubuntu Hardy


Ah, time for my yearrly recurring troubles with my Brother HL2030. Very nice printer. But the driver support under Linux is terrible. Yes, brother released some (crapy) closed source drivers for Linux. But in my opinion that’s even worse than no drivers for linux at all. If there’re no drivers, some opensource Kernel guru creates them. If there are drivers available, no matter how crappy they are, no one’s going throught the trouble of creating them.

I first picked the HL2060 drivers. But I had troubles printing pages in the landscape format. So after some searching I found the appropriate drivers. Just do:

aptitude install brother-cups-wrapper-extra brother-cups-wrapper-laser

I had to reboot before the drivers showed up in the system-config-printer tool. After the reboot I could select the HL-2030 drivers. But too bad,the same problem remained. When tweaking the default job options, I could set the orientation to landscape. Very weird. I believe it’s a bug in Gnome but I couldn’t find any similar cases.

So for now, it’s very annoying to set the default job options every time, but it works…

Wii sensor bar repareren

Ik heb twee hele lieve ratjes maar ze knagen alle losliggende kabels door :(
Nu was de Wii aan de beurt. Bijna alles weggewerkt of draadloos. Behalve de sensor bar natuurlijk. En ja hoor, die hadden ze te pakken genomen (op twee plekken zelfs). Dus ik dacht: dat wordt weer dure replacement parts bestellen bij Ninentendo. Maar…. nee hoor! Een nieuwe sensorbar kost bij Nintendo 10 dollar. Dat is omgerekend zo’n 50 eurocent of zoiets :)

Ook zijn bij Bol wireless sensor bars te bestellen (een stuk of vijf verschillende).

En natuurlijk draait een beetje klusser er zijn hand niet voor om om de draadjes weer aan elkaar te solderen. Ik dat gedaan, maar dat werkte niet :?

Na wat zoeken op internet bleek dat er nog een soort coating over de draadjes zit. Die moet je er eerst even afbranden en dan werkt het perfect! Met dank aan deze guide.

Just some stuff

Just some quick links!

This links describes how to manage multiple databases with Capistrano. That’s not why I picked it though. I liked it because it shows the “<<: *” syntax of yaml.

And a repository of Ubuntu Hardy Heron debs for mod_rails/Phusion passenger. At this time I installed mod_rails via rubygems. But if the guys at brighbox make the package so it builds/installs the Apache module automatically (without human intervention and pressing Y two times) I will install that one. Much, much nicer to use with Puppet.

New virtualization server / HTPC machine

I was thinking about putting together a new low-energy VT-enabled HTPC. So I can use it to watch video’s, play my music on it, use it for testing purposes, put freebsd on it and a lot more. That’s why I want the VT extension. So I can install KVM/Xen with all the goodies :)

But, the trick question: what components? Pffff, I don’t know anything about hardware anymore so I had to brush-up my knowledge about this stuff. After reading a lot of forum posts, reviews and the lot, I came up with the following hardware components:

Case: Antec Fusion case

A nice looking case with a lcd display with Linux drivers for it available (I think). And also an infrared receiver. And the price is not too high like some other cases.

Motherboard: Gigabyte vs. Asus

I’ve got two options: The Gigabyte GA-MA78GM-S2H or the Asus M3A78-EMH HDMI. I also thought about a similar Asrock motherboard. Because they use very little energy (so I’ve read). But it’s a bit of a hassle to find a dealer who sells these boards. So I think I’ll stick with the former two.

Why one of these? They both have the new AMD 780G/SB700 chipset which supports full HD hardware encoding. So if I’m gonna us it as a HTPC it does it work descent.

CPU: AMD Athlon X2 4450e

Low power usage and only a couple of euro’s more than it’s brother the 4050. I think it supports amd-v/svm, but it’s not too obvious if you read the AMD site. So I hope I got it right :)

Cooler: Scythe Ninja mini

I want the system to be passively cooled. And this is the best small heatsink I could find.

Memory: 2 x 2GB

I don’t care what kind of memory goes into it. As long if it’s enough to support a couple of VM’s.

Hard disk: 32GB SSD

This one is hard! Is this worth the 160 euro’s? Well it is fast, silent and reliable! And it’s enough for DomU + some VM’s. All my  data is gonna be saved on another (network) diskdrive. But still….

New ticket/issue tracking software


I was surfing for some ticketing / project management software and it returned the following result:

Especially Sifter looks really nice! But… it isn’t open source. So too bad. I went with Redmine: open source, ruby on rails and already a nice feature set!

A nice overview of bug/issue tracking systems can be found on wikipedia.

Installed passenger a.k.a. mod_rails


Today I’ve installed Phusion passenger on one of our servers. I wanted Redmine for one of our projects so this seemede a nice opportunity to install it.

Installation was a breeze. For mod_rails as well Redmine.

So I was thinking: we have mod_rails installed, we could offer some rails hosting to attract new customers.

But I see three bears on the road with using mod_rails in a shared hosting environment.

1. Same user

Every mod_rails site runs on the same user :( I’ve spent hours on configuring fastcgi and suexec. But now every hosting custommer’s scripts run under their own user. Would be nice if mod_rails supported something like that.

2. Memory

I couldn’t find an option to limit the memory usage per mod_rails site. And I know how memory hungry rails can be :(

3. Aliases

Mod_rails doesn’t support host aliases. This is overcomable but feels like a hack. Wouldn’t it be nice if mod_rails supported aliases :) Pleeeeeeaaaaase?

Maybe I haven’t read the documentation to well and are my points useless :) In that case: please let me know!

Css flash messages

I was reading a nice article on Ruby on Rails flesh messages. It linked to an article about styling message boxes with css.

I’m a real sucker for nice message boxes. If you are too: this is a must-read.