Hugin and small, silly mencoder tip

Posted by Esteban Manchado Tue, 28 Oct 2008 20:44:00 GMT

From time to time I like making panorama pictures. When I started several years ago, Autostitch was really popular, but it didn’t have a Linux version, which sucked. Actually, it still doesn’t. However, it worked under wine, so I just used it via emulation. It was very simple and worked ok.

Sometimes I’d look for alternatives under Linux (if possible, free) and I had seen a tool called Hugin. It looked complicated (at least compared to Autostitch’s select-pictures-hit-ok-there-you-go), and for some reason I never really used it. It probably wasn’t packaged for Debian or something like that.

A couple of days ago, though, I arrived from a trip where I took a couple of panoramas, and Autostitch had a quite suboptimal behaviour: it didn’t recognise one of my panoramas, and some others were completely destroyed perspective-wise. So I decided to give Hugin another go. And boy am I happy with it. It’s very easy to install in Debian, and although I had some problem with the path to enblend (apparently I had to specify the absolute path to it in preferences), everything worked fine. Selecting the points to join the pictures is not that hard, and actually has one advantage over Autostitch, namely that if it doesn’t recognise your panoramas automatically, you are giving “hints” about which points are the same in other pictures to Hugin, so it will work. Another advantage is that it has several ways of joining the pictures, which solved my second problem with perspective destruction :-)

Apart from the panorama pictures, I also had some videos... and one of them was recorded as “portrait” instead of “landscape”. So I needed a way to rotate the video. Fortunately, that was easy enough with mencoder (using command-line, though):

mencoder -vop rotate=2 MVI_2352.AVI -ovc lavc -oac copy -o MVI_2352.avi

I found the tip in some thread in Ubuntu forums, and had to look up the values for “rotate” in mencoder’s manpage:

0    Rotate by 90 degrees clockwise and flip (default).
1    Rotate by 90 degrees clockwise.
2    Rotate by 90 degrees counterclockwise.
3    Rotate by 90 degrees counterclockwise and flip.

The shoemaker's son always goes barefoot

Posted by Esteban Manchado Tue, 21 Oct 2008 18:25:00 GMT

I admit it. I’m a terrible developer. I write code, sometimes even write tests.

But. I. don’t. test. my. programs.

By hand, that is. And sometimes (usually) the coverage is not enough, and I end up making embarrassing mistakes. It usually happens outside of work, although at work I also have my share. The last one was with the Debian package dhelp, where trying to fix an issue before Lenny is released, I ended up making it even worse. The story goes like this:

There was some problem with the indexing of documents on installation/upgrade (namely, it would take ages for most people upgrading to Lenny, and they would think the upgrade process had hung). So, I go and change the indexing code so it ignores documents on installation/upgrade. Also, as suggested by someone, I created some small example utility to reindex documentation for certain packages. I test installation, upgrades, upgrade of the dhelp package itself, the utility, searching for keywords before and after all that… and everything worked.

Only that I made a typo. A typo that would make all indexing to be ignored (except for the example utility, because it was a bit lower level). And I didn’t realise, because it “only” broke some cronjob, a completely different part of the package. And it happens that the cronjob reindexed everything weekly, to make sure that you had reasonably up-to-date search indices. And it also happens that, given that the documentation reindexing was being ignored on package installation/upgrade, the weekly total reindex process was the only thing that could provide the user with indexed documentation. But I screwed up. Oh well.

Someone filed a bug yesterday, and I fixed more or less right away. But this time I spent a couple of hours thinking of test paths and ways to make it fail, and actually doing all that testing. Thanks to that, I found some potential bug in the example utility, that I fixed just in case. So hopefully everything is fine now, if I can convince the Release Masters to allow the new, less broken update to dhelp to be accepted for Lenny.

I think I need personal QA. Anyone up to the task?

Google translate WTF?

Posted by Esteban Manchado Thu, 16 Oct 2008 19:21:00 GMT

Maybe that’s something you all already knew, and it’s just me that arrived late to the party, but this is hilarious. I hadn’t used Google Translate myself too much (if ever; can’t remember), but the other day someone mentioned some “funny” translations in some internal mailing list at Opera:

The first translation is… not correct, but somewhat close to the original. The Spanish text is “SOY FELIZ PORQUE CONOCI LA VERDADERA AMISTAD” (“I’m happy because I knew true friendship”) and the translation is “I AM HAPPY KNOW WHY THE TRUE FRIENDSHIP”. As I said, not really correct, but at least it’s somewhat close to the original. Check by yourself:

http://translate.google.com/translate_t#es|en|SOY%20FELIZ%20PORQUE%20CONOCI%20LA%20VERDADERA%20AMISTAD

If you add a couple of exclamation marks at the end, some strange things happen (only half of them are shown in the translation, as if they were escape characters or something). But the really hilarious thing is what happens when you add five of those:

http://translate.google.com/translate_t#es|en|SOY%20FELIZ%20PORQUE%20CONOCI%20LA%20VERDADERA%20AMISTAD!!!!!

In that case, Google Translate “translates” the same sentence to “KNOW WHY I AM HAPPY THE REAL MURDER !!!!!”. Maybe that means that for Spanish speaking people, friendship plus an adequate amount of enthusiasm means…. murder. Scary.