Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Thursday, December 16, 2010

Awesome New Photo Tool - Hugin

I was trying to find a solution for a coworker today, getting a wide area of the office into a single photo. This was a daunting task, as the area needed to be covered was around 100 feet wide and only about 40 feet deep. I figured I could perhaps stitch several photos together and make a panorama. As you may know, I do not use Windows or Photoshop. I kicked the Microsoft habit back in 2oo1, and haven't looked back since. I use Linux exclusively as the platform for all of my computing needs, though I will occasionally utilize my wife's OS X desktop for the sake of convenience (it is the only desktop system in the house at present time).

I'd researched photo stitching software a few years back, and only found complex and inadequate guides to sortof putting photos together with The GIMP. I use The GIMP as my primary post-processing and editing program, and am quite happy with its performance. For the uninitiated, it is full-featured photoshop workalike with active development. It is open-source and it is free. Check the link above for more info.

However, this post is not about The GIMP. I took my photos and set about finding a way to stitch them together for my coworker. A short Google search brought me to Hugin. I run Debian Linux, and Hugin is included in the standard repositories. I installed the application with its requisite dependencies and suggested optional related packages. The entire install footprint ended up at a mere 60MB. I ran through the steps presented to me by the program, and waited a few minutes for it to process the images (five 12 megapixel images from my Nikon D90). The results were astounding. This application is so well-developed that I had an incredibly impressive image in TIF format in a matter of 5 minutes, and there was nothing manual about the process.

I got to my usual coffee shop this evening, and thought I'd play a bit with some 30 second time exposures of the outdoor porch area. I wanted to see how Hugin handled this, given the differences in exposure and color temperature in such an environment, as well as knowing that the darker shots were underexposed due to the limitations I imposed on the camera when capturing the images.

Here are the images I started with, scaled down to 1024 pixels wide (if you click on them) for your viewing pleasure:





I simply dumped these photos into Hugin for processing, and out comes this, after about 3 minutes on my single-core not-current-technology laptop:

The photo (if you click it) has been scaled to 2048 pixels wide and converted to png format, but otherwise no post-processing has been done. The resulting TIF image was 5989x2037 pixels.

This is one impressive piece of software. There are many options that I haven't taken a look at yet, but this is what it produces out of the box, choosing the "photometrics" (which I believe evens out the exposure) and "difference" blend mode. Kudos go out to all of the developers of this software. This has got to be one hell of a project to get such a complex piece of software working so elegantly.

Check out the project page at:

http://hugin.sourceforge.net/

This is cross-platform software, and there are releases available for Windows, Mac OS, Linux, and FreeBSD. If you find this software as incredibly useful as I do, consider making a contribution to the project. There is a small link at the bottom of the home page for PayPal donation.

Wednesday, May 20, 2009

UNIX Humor

WARNING: GEEKY HUMOR AHEAD. PROCEED AT YOUR OWN RISK.

I don't show it a lot here, but I am a geek. I do UNIX systems administration work, and if you don't know it yet, those who work with UNIX have a special humor when it comes to their work. You can find evidence of this in the source code comments of just about any independently-developed open source software project. Running a grep -Ri [enter your choice of colorful word here] * in the Linux kernel source tree for example, will present you with a long list of interesting and exciting commentary on the code or hardware the programmer was working with. This will provide hours of entertainment for the right kind of geek. My personal favorite was a comment, probably typed out of frustration, by whomever was writing kernel code for the Sparc platform eons ago. Sadly, that part of the kernel appears to have gone away in the more recent 2.6 versions. I actually went and downloaded a 2.4 kernel just now to find it. I won't post it here verbatim, to keep the blog family-friendly, but it involves tender intimate relations with a chainsaw. For those of you geeky enough and curious, it's located in arch/sparc/kernel/ptrace.c of the 2.4 source tree.

Anyhow, some of this humor will occasionally spill over into error messages seen by sysadmins like yours truly. I came across one today that had me laughing out loud. Part of my duties of recent involve getting some of the servers to keep proper time, implementing ntpd to accomplish the task. The internal clock on the particular server I was working on had drifted forward a bit since it was last synchronized, so I ran ntpdate to get it current. Some software isn't written to handle a backwards time shift, and I soon found out that this was the case with our ssl-enabled POP and IMAP daemon. It had crashed when I changed the time, and since I wasn't yet very familiar with the server, I had to go and figure out which daemon I needed to restart. A quick check of the logs informed me that it was dovecot, so I went and started the service up again. Now, the nice developers of dovecot added the handy feature that if the service crashed previously, the error message indicating the likely cause will be printed out for you when you start it back up again. I also found that the dovecot developers have a sense of humor. And apparently, dovecot is emo.

Behold:

[root@mail ~]# /usr/local/etc/rc.d/dovecot start
Starting dovecot.
Warning: Last died with error (see error log for more information): Time just moved backwards by 418 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards


I'll leave you with that. :)