Automatic panoramas with hugin and autopano

I’ve only been using hugin for an hour now, and I’m really impressed.

The mac binary doesn’t include the ability to automatically determine how images overlap, but it’s pretty easy to make that work, too.

First download the hugin binary. The Mac OS X port is here.

Then install the autopano binary.

First install MacPorts.

Then run:

sudo port selfupdate
sudo port install autopano-sift-c

I had a problem with cmake hanging during install. If port stalls for you, ctrl-c, then sudo port clean cmake ; sudo port install cmake ; sudo port install autopano-sift-c again.

Then tell Hugin where the binary is. Go to Hugin > Preferences… and click the “Autopano” tab, and make it look like this:

Close the preferences window, and the next time you use the “Assistant” tab and load images, you’ll see that the alignment is done for you automatically.

Here’s an example taken from Bryce Point in Bryce Canyon: (it’s also one of the banners).

Ant bash completion on Mac OS X

bash will do tab-completion for ant targets on Debian/Ubuntu boxes out-of-the-box. If you haven’t upgraded lately, you may need to:

sudo apt-get install bash-completion

On Mac OS X, it needs a bit of massaging. First install the macports version of bash-completion and ant:

sudo port install bash-completion apache-ant

Then add this to the end of your ~/.bashrc:

if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
complete -C /opt/local/share/java/apache-ant/bin/complete-ant-cmd.pl ant

See http://marius.scurtescu.com/2005/03/23/ant_bash_completion for Windows instructions.

Secure VNC with ssh port forwarding

Need to help out a damsel in distress (username “damsel”) sitting on a remote debian/ubuntu box (“remotehost”)? Have you set up ssh on a non-standard port (port 12345) already? Great. Keep reading.

Step 1: Install x11vnc on the remote machine:

ssh remotehost
sudo apt-get install x11vnc

Step 2: Spin up x11vnc on the remote host:

ssh remotehost
sudo -u damsel x11vnc -noxdamage -speeds dsl -solid -display :0 -passwd SECRET

Keep this ssh running. -speeds dsl -solid makes vnc more responsive.

Step 3: Forward the remotehost’s vnc port, 5900, to your local host using ssh:

ssh -p 12345 -L 5900:127.0.0.1:5900 remotehost

Step 4: Start up your VNC viewer application, pointing to localhost.

Tightvnc is a great vncviewer and is installable through macports:

sudo port install tightvnc

Then run:

vncviewer localhost

Bad Blocks Make Macs Unhappy

My fairly young MacBook Pro started randomly hanging, not coming out of sleep, and being generally disagreeable a couple days ago, and it turned out to be a bad hard disk.

What’s disconcerting is that Disk Utility.app didn’t see any problem with the disk. I had to install smartmontools to find the error.

After installing MacPorts, install smartmontools:

sudo port install smartmontools

Then tell the drive to do a long self-check in the background:

sudo smartctl -t long /dev/disk0

Note that this check may take an hour to run, but it’s done in the background, so you can continue to use your computer while it does its little dance on the catwalk.

Check the status of the test with:

sudo smartctl -c /dev/disk0

I was unlucky:

...
Self-test execution status: ( 121) The previous self-test completed having
  the read element of the test failed.
...

See The macosxhints forums for more discussion about this issue.