29 April 2011

Updating Ubuntu Through a Proxy

Updating Ubuntu through a proxy should in principle be an easy process: you just set the proxy settings under System -> Preferences -> Network Proxy. But it seems that if you need a password for the proxy then this does not do the job since the password information does not get passed along.

To fix this issue, edit /etc/apt/apt.conf as follows:

Acquire::http::proxy "http://username:password@proxy:port/";
Acquire::ftp::proxy "ftp://username:password@proxy:port/";
Acquire::https::proxy "https://username:password@proxy:port/";

26 April 2011

Farewell Beluga

It's been fun and the seared tuna roses were unbelievable.

23 April 2011

Hugin with LOTS of Images

If you try and run Hugin with lots and lots of images it seems to die with the error

Too many arguments (images). Try using the %s parameter in preferences.

This can be remedied by creating a little helper script autopano-help.sh


dos2unix $3
exec autopano-complete --points $1 -o $2 `cat $3`

Then in Hugin select File -> Preferences, choose the Control Point Detectors tab and press "New...".

Set this as the default. Then go ahead and use Hugin to align as many images and you want!

Two Oceans Insomnia

Last night I had a very kak sleep. It may have been the inhuman quantity of garlic and chillie I had on my pizza. It may have been the ill advised quantity of sangria I had with that pizza. But I think that the culprit was really the fact that my mind was mulling over just what I was going to do this morning. My leg seems to have improved and the couple of runs I did this week were relatively pain free. But I did not want to get to the 28 km mark (or worse, the 42 km or 50 km mark) and find that a little niggle has turned into unrelenting pain. Not to mention that my total mileage over the last three weeks has not been more than about 20 km. So although my heart wanted to run the Ultra this morning, my mind was counseling something a little more conservative. Obviously sometime around 03:00 I had made a decision. And you would think that this would let me get some decent rest, but by that stage I was 100% awake, so I got up and quietly started the day.

22 April 2011

Day Before the Two Oceans

We went along to the Good Hope Centre yesterday afternoon to register for the Two Oceans. It was rather quiet and not a very painful experience: in and out in about half an hour (and that includes some time browsing the exhibits). Went to get our "free sample" of GU Brew, only to find that instead of being a cylinder of tablets (as indicated in the brochure) it was just a single tablet in a tiny sacher. These people are tight! Certainly not giving me the warm and snuggly feeling that will make me go out and buy a box!

This morning we went for a bit of a stroll on Noordhoek beach, along to the Kakapo wreck, where I took some photographs. Then across to Kalk Bay for Breakfast at the Olympia Cafe. Claire had a spinach and feta baked croissant and I had a grilled croissant topped with cheese and ham. Bloody delicious and left me feeling like I would not need any lunch.

Now, just about an hour later I am seriously thinking about a little snack. We are settling down for a restful afternoon of movies and a nap.

21 April 2011

Sade Cover

I can remember that about the time I started getting interested in music, which is now well over two decades ago, Sade was really big. Then she just disappeared. She is supposed to be a bit of a recluse, but that is a significant hiatus! Anyway, she is now back, producing a new album. And on it will be this cover of "Still In Love With You" (Thin Lizzy), which I think is just about as mellow as it gets.

Good choice for a cover. It has also been done by Gary Moore. Also pretty damn good.

20 April 2011

Multi-Layer TIFFs from Hugin

I have been wanting to make a panorama or mosaic image, but without actually blending the remapped images. The way to do this, I have discovered, is first to use Hugin to do the image alignment. Then, on the Stitcher tab, choose only the "Remapped images" option. Select TIFF for the "Normal Output" type and then press "Stitch now!". The result will be a number of .tif files:

$ ls -l shipwreck????.tif | head
-rw-r--r-- 1 colliera colliera 29079978 2011-04-20 19:34 shipwreck0000.tif
-rw-r--r-- 1 colliera colliera 29079978 2011-04-20 19:35 shipwreck0001.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:35 shipwreck0002.tif
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:35 shipwreck0003.tif
-rw-r--r-- 1 colliera colliera 30548878 2011-04-20 19:35 shipwreck0004.tif
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:35 shipwreck0005.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:35 shipwreck0006.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:36 shipwreck0007.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:36 shipwreck0008.tif
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:36 shipwreck0009.tif
$ ls -l shipwreck????.tif | tail
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:43 shipwreck0053.tif
-rw-r--r-- 1 colliera colliera 30548878 2011-04-20 19:44 shipwreck0054.tif
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:44 shipwreck0055.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:44 shipwreck0056.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:44 shipwreck0057.tif
-rw-r--r-- 1 colliera colliera 29073626 2011-04-20 19:44 shipwreck0058.tif
-rw-r--r-- 1 colliera colliera 29670722 2011-04-20 19:44 shipwreck0059.tif
-rw-r--r-- 1 colliera colliera 32043210 2011-04-20 19:45 shipwreck0060.tif
-rw-r--r-- 1 colliera colliera 29680064 2011-04-20 19:45 shipwreck0061.tif
-rw-r--r-- 1 colliera colliera 31147570 2011-04-20 19:45 shipwreck0062.tif

Now these need to be combined into a single multi-layer TIFF file as follows:

$ tiffcp shipwreck????.tif shipwreck-layers.tif

The resulting file, shipwreck-layers.tif, can then be opened in GIMP.

So this is the basic idea of what I am after:

It still needs some work though. I want to go back in the morning so that the Sun is on the right side. And I need to get closer and move along the ship, so it will be more of a mosaic than a panorama. And I also want to include a special extra bit of interest.

Higher resolution masks in enblend

Today my Hugin died with this error message:

mask is entirely black, but white image was not identified as redundant

Which told me precisely bugger all. After a bit of investigation I found out that passing the extra option --fine-mask to enblend would do the trick. Panorama to follow soon.

19 April 2011

Whale in Hout Bay Harbour

I was across at Hout Bay this afternoon taking Erik and Malin to see Seal Island. While they were out in the boat I wandered around the harbour, taking photos. While I was busy snapping sea gulls I noticed a big whale surface then go under and flip its tail in the air. Right in the middle of the (tiny) harbour. It was amazing.

How to fix any computer

18 April 2011

Why they are called "BOOBS"

If you have done any technical drawing then this will make perfect sense.

No, I am not Ryan Sandes...

Forgot to mention that on the flight back from Cape Town to Durban after the NDC, I was wearing the black race t-shirt. I boarded the plane pretty late and was busy stuffing my stuff into the tiny overhead bins (I had a lot of stuff). Just as I sit down the middle aged guy diagonally across behind from me taps me on the shoulder and asks me if I am "that Ryan guy that goes running in the deserts". For a moment I was tempted to bathe in the vicarious glory of being Ryan Sandes, but then I decided that I probably could not keep up the pretence for very long.

You have to admit, the resemblance is uncanny. :-)

... but thank you for asking.

dvd::rip and VOB files

To start, select File -> New Project. Give the project a name and press "Create project". Just select "OK" in the following dialog box.

Next press "Choose DVD image directory" and select the directory containing AUDIO_TS and VIDEO_TS. You can select "Encode DVD on the fly".

Advance to the "RIP Title" tab and press "Read DVD table of contents". The titles that you are after are the ones with lots of frames. Select them (making multiple selections by holding down the Ctrl key).

Now go to the "Clip & Zoom" tab and press "Grab frame" followed by "Apply preset values".

Go to the "Transcode" tab. Select a DVD title. Press "Transcode".

When it's done, check the finished product. If it looks okay, then select the next title and press "Transcode" again.

Not a Good Start

So I did my little trial run this morning and I am happy to report that I have no pain. I got all the way up to the M3 before turning around and trotting back down again. Now I know that my stated objective was to go to Rhodes Memorial. It was not a physiological limitation that prevented me from doing this (although, admittedly, by the time I turned round I was tired and out of breath). The reason was of a more pragmatic sort. I start lecturing at 08:00. Breakfast starts at 07:30. I dutifully got up at 05:00 and made all of the necessary, um, preparations. Then headed downstairs at 06:00 to hit the road. Now by Durban standards 06:00 is a late start, but I need to remind you that Cape Town is a full 15° or so west of Durban, which translates to an hour of local time. So effectively I was off at a respectable 05:00. Plus it was still very dark. My bunch of keys if pretty big and jangly, so I decided to hide it in the kitchen rather than carry it along with me. So I reached up on top of the kitchen cupboards, right in the corner where they meet the wall, and let go of my keys. They fell out of my hand with a rather disconcerting burst of acceleration... and then I heard them hit the bottom. To my dismay, the cupboards have a narrow gap on either side (since the "standard" cupboard width doesn't conform to the room dimensions. And my keys had fallen to the bottom of this cavity. When I climbed up on the counter I found that it was about 2.5 cm wide and 75 cm deep. Far too narrow for my arm to fit down. Now, as I soon discovered for any of the kitchen implements. I tried the broom handle. I search the whole complex for a wire coat hanger. Since these things seem to multiply if left to their own devices, you would think there would be a stack around. Not one! So, just when I had resigned myself to the idea of waiting until 07:30 and asking for help, I spotted a pile of vine branches under the braai area in the quadrangle. The first branch I tried turned out to be the right length but a little too twisted. The second one, after a bit of manipulation, turned out to do the trick and I had the heartening sensation of feeling the end of the branch catch against the bunch of keys. On the third attempt I managed to drag it up the side of the cavity and, reaching in as far as I could with my fingers, grab the keys. So, a good 20 minutes later, I carefully put my keys back on top of the cupboard (this time right in the middle) and shot out the door.

The offending keys and the stick used to rescue them.

17 April 2011

Cautiously Optimistic

Well, today is the first that I have had absolutely no pain in my left tibialis anterior. Even after a pretty vigorous walk on hard beach sand (and a bit of soft dune sand) this evening, it is still perfectly fine. So, tomorrow morning I think I was take it out for a gentle pre-sunrise run up to Rhodes Memorial. Just to see if it really is fixed. This may seem to be a rather extreme trial run, but I need to make some decisions about my game plan for Saturday. Either I will be able to get in four little runs this week, in which case I will probably have the confidence to attack the full Two Oceans Ultra. Or I will limp through a few small jogs and settle for the Two Oceans Half. Or I will find that I am still broken and I will have to resign myself to sitting on the pavement somewhere with my camera. None of these are terribly bad options, but they are sorted in decreasing order of preference. I would really like to be able to genuinely wear my Two Oceans t-shirt with pride this year and not use it as a throw-away warm up shirt on 29 May.