Photo Stitching

As the owner of a brand spanking new Canon SD1000, I unpackaged the included software and found a nifty tool called PhotoStitch.  The camera itself only provides a special function which assists you in providing overlap between successive images of a panorama. The magic of the stitchery is in the desktop software.

PhotoStitch does a descent job, given its design parameters: it is intended to do the stitching largely unaided.  Hugin, an open source tool for creating panoramas, requires that you specify the alignment control points.  Although seemingly daunting, the task is actually extremely easy.

As one majoring in computer vision, I should understand the algorithms a little better – to be able to compare the two on an algorithmic level.  What is clear, subjectively, is that Hugin is just more powerful. If it makes a mistake, i can go back and add a couple more control points and out pops a better alignment.  Here below is a sample of output from PhotoStitch (software from Canon) and Hugin (open source software).

PhotoStitch

PhotoStitch

Hugin

Hugin

A Matter of Definition

As someone who grew up mainly in the 90s, many of the societal norms I learned can be attributed to one of two main sources: Cool (e.g., Saved by the Bell and The Fresh Prince) and Uncool (e.g., Full House) TV shows. Although many positive social changes have been introduced over the last half century, as taught by mother TV, I think there are some supposed proscriptions that attempt to redefine what the dictionary already defines clearly. 

For example, one might conclude that it is sexist to use the word “he” to refer to an individual of unknown gender.  I have had english teachers attempt to codify a style rule for this situation, so that you use “they” to refer to such an individual; others have suggested using the more prolix “an individual” or “the person.”  The problem with using “they” is that “they” is plural, where “he” is attempting to address something in the singular.  The other suggestions violate the law of syllabic conservation.

“He” or “she” can certainly be used as anaphora.  Why not as a generic reference?  The truth is, you don’t have to reason about it: Webster already defines “he” as “used to refer to a person of unspecified sex.” By the way, “she” also includes the same definition allowing for gender-neutral references.  

PS, I got the definition while reading DeGroot “Probability and Statistics”, 2nd ed.  

Almost 2 Years With MacBook Pro

I have been wanting to write a bit about my experience as a computer scientist who switched to Mac about 2 years ago.  I bought a MacBook Pro after  talking with a coworker at the INL.  As most people, I had a bunch of misconceptions about the Macs shortcomings.  Most of all, I knew macs used PowerPCs – and although these seemed like cool chips from a nerd standpoint, I saw no compelling reason to switch.  But when Apple released its first iteration of the MacBook Pro, with the Intel Core Duo, I was thouroughly impressed with the whole package.  It was attractive – and had a whopping two cores (I am sure when my kids have 64 cores in their laptops two cores will seem a paltry amount). When I ordered one in August, 2006, I watched it ship from China – it felt like I was having a supercomputer delivered to my doorstep.  On top of that, I knew it was a good looking, quite laptop – all aesthetical parameters that have meant much more to me as I have grown older (I hate loud fans with a passion).

First some background.  I grew up as a nerd.  I tackled the most inane nerd tasks at an early age – even doing database applications in middle school (boooring).  That said, by the time I had decided to get a Mac I was not the same breed of nerd.  Fans drive me crazy – and I don’t care how powerful a computer is, I want it to have a bright screen, be quiet, powerful, and capable.  I like programming and Unix, but there are certain tasks, as a long time linux user, that I find repugnant – namely, rebuilding your kernel.  That’s a fun excercise once or twice, but when it becomes a useful skill for daily computer use in a particular OS, as it seems to be in Linux, I question whether that OS is ready for mainstream use.

How has the Mac measured up?  Truth is, it has meet my high hopes for it.  Here’s a list of Pros and Cons:

Pros:

  • It IS Unix.  It has the full suite of Unix tools, most of them open source.  It uses GCC.  It has a great Terminal and comes with Bash.  Its POSIX, BSD, and has done everything that I have ever expected a UNIX to do.  For many open source apps, if there are slight tweaks that need to be made to the source, one can easily download mac ports, and install apps in much the same way as with apt-get.  Bottom line: flawless unix environment.
  • It IS beautiful.  Or, as steve Jobs would say, “gorgeous.”  The keyboard lights up in the dark.  The screen is bright – even after 1.8 years. It is about noticeably  quieter than most laptops Ive put it next to.  The windowing environment makes Microsoft Windows look like a bad dream. Everything scrolls smoothly, looks slick, and works well together.  
  • It IS capable.  Lets face it, its Intel Inside.  It uses a standard intel chipset with some Apple BIOS.  But while the processor is standard Intel, the layout is definitely Apple – all laid out in the cleanest, cleverst, thinnest package.  As for the OS, the kernel OS X sports works wonders. I regularly have a dozen browser windows, the XCode development environment, NeoOffice (Open Office variant for OS X), iTunes, Mail, iPhoto, Gimp, and Final CutExpress all open at once – and it all runs smooth as butter.  Whatever they are doing to make it seem so smooth, they have me fooled. 
  • It IS upgradeable.  Even in a laptop!  I have doubled the ram, and just yesterday, using no “extra” tools, cloned my harddrive onto a new one that is 3x as big – all went flawlessly (even though I voided the warranty by opening the box myself.  Hey, Im not gonna let someone else do it if I can do it myself)
  • It IS different.  Apple does things differently.  They follow an 80% rule – they show the features that 80% of users want. Some people, even Mac Users, have complained, e.g., about the lack of resize handles around all sides of an application window.  I simply do not care about that.  Some people complain about a lack of games on the Mac.  In my opinion, computer games are a total waste of time (though I am sooo grateful to all the parents who buy their goober kids the latest video cards and drive down the price on fast graphics hardware for me to develop cool visualization applications)
Cons:
  • For some reason, in Leopard the Activity Monitor sometimes gets weird shapes drawn in it.  I am pretty sure this never happened in Tiger.  Weird.
  • All people in Apple Stores seem like goobers.  I avoid working with them at all costs now.
That is honestly it.  I am living the dream.  As a full time developer, I have been able to do web development more effectively (if ere I need windows I pop open Parallels and virtualize it – I did this once to develop an MS Access application).  As a home video enthusiast, I have made extremely fun, and cheesy, home videos in iMove and Final Cut Express (and with a single click of a button they are uploaded to YouTube).  All the productivity applications (NeoOffice for spreadsheet/word, Mail to aggregate my many email accounts, iPhoto for photo tagging and indexing, etc.) have all worked together harmoniously. 
Seem to good to be true? Maybe I am an anomaly – but Apple has definitely delivered a product to me, at least, that is about as good as I could have asked for.  It is the ultimate development platform, and the prettiest usable one I have yet to see.  And, with the looks of Microsoft’s Vista, it will be the only good platform, in my humble opinion, for years to come.

First Podcast

This is my version of Cristofori’s Dream by David Lanz.  I created this using garage band, making each note individually.  Conclusion: the real version, played by a human (such as David Lanz) has much more emotion and character to it.  

Hot Dog Evolution

We chose to take part in the long standing tradition of the hot dog bar today in the Magicc Lab.  The first hot dog bar started in the spring of 2007 while at the INL, established with the de facto condiments: ketchup, mustard, relish, and Sour Kraut.  Later that year mayonaise was added to the condiment canon. This year, beyond the sheer joy of partaking of hot dog goodness, we also investigated the evolutionary history of the dog.   Look below to see the four major stages of hot dog evolution:

  1. Emerging from the sea of primordial null dog soup, the basic frank emerged, exhibiting little taste or desirable texture.  These dogs have been given the name sawdust dog (SD), or just plain wiener.  This basic life form has survived deserved extinction for eons because of its low market price.
  2. Slight evolution spawned the Oscar Meyer Beef frank, a $5/pack dog with barely noticeable improvements over the SD. It is expected – or at least hoped – that this branch will dwindle into extinction soon.
  3. After steady evolution, the SD developed into the present day polish dog. The polish offshoot may optionally include a cheese core, but the basic idea is an infusion of more palatable spices into the same basic link.  Note the baboon buttox and lengthy arms that are crude predecessors to fully evolved bratwurst, below.
  4. The Bratwurst represents the apex of evolution.  Full-bodied taste is carried by its well-developed bipedal frame.  Sporting a refined neck tie and a full smile, this dog looks as good as it tastes.  Other names include heaven-on-a-bun, or the King of Dogs. Some have suggested the name of this species be changed from Bratwurst to BratBest, to better reflect its palatability.

Hot Dog Evolution:

Hot Dog Evolution

Link links:

Travis Millet, pictographer of the dogolution:

http://themilletfamily.blogspot.com/

The Crispy Dog, thanks to Jeff Kennington:

http://www.oakenweld.com/coppermine/thumbnails.php?album=20

Macbook Pro 85W Power Adapter Repair

A friend stopped by yesterday mourning the loss of his MacBook Pro power  adapter.  Since he had already ordered a new one from Apple, I asked if we could try to resuscitate the “broken” one.    It turned out to be a simple fix:

  • Chisel along the seam of the power adapter; this may be he hardest part – mainly because it seems so unreasonably hard to get the blasted thing open.  Keep on chiseling, it will give with time.
  • Snip the old wires and solder on the new ones.

Did I really need to make this list? Bottom line: if your macbook adapter broke because you bent the cord to death, just pop it open and resolder.

MacBook Power Adapter 2 MacBook Power Adapter 1

eXfuze Drinks

A friend tells me he is getting ready to sign on as an eXfuze drink distributor.  In his explanation of the company, he named a few fruits I had never heard of. Not wanting to get left in the dust (yet again) about some new trend, I decided to do “light” research on some of the supposedly salutary effects of the fruit drinks this company is pushing.  Here’s what I found on the “7+” group of fruits they market:

  •  Fucoidan – From brown seaweed. eXfuze’s site compares it nutritional value as equal to breast milk.  Many reports indicate it is healthful.
  • Mangosteen – The point of interest here is a group of organic compounds called Xanthones, found in the hard shell of the fruit.  On the one hand, these compounds can be used for insecticides, on the other hand lots of people say they have healthful effects.
  • Sea buckthorn – Apparently very high concentration of Vitamin C (much higher than, say, and orange.)  Lots of other supposed good acids.
  • Noni – a potato sized fruit, lots of vitamin C and fiber.  Several medical reports indicate it is high in potassium, a problem for people with kidney problems; also, it may contain levels of toxicity dangerous to some parts of the body.
  • Goji – A cute berry loaded with tons of amino acids and vitamins.  Reports indicate many of its claims, such as preventing cancer, have been been debunked.
  • Acai – Extremely high in dietary fiber. Lots of antioxidants. 
  • Gac – More lypotene than tomatoes, more beta-carotine than carrots.

In all, none of these fruits seem like they will do you harm – except to your pocketbook.   It isn’t clear, however, that any of these items are any more salutary than any other fruit.

Emerson, You Did It Again!

These quotes by Emerson could almost stand on their own, if such a thing could be said. 

It is easy in the world to live after the world’s opinion; it is easy in solitude to live after our own; but the great man is he who in the midst of the crowd keeps with perfect sweetness the independence of solitude. 

 

And this one:

 No change of circumstances can repair a defect of character.

 

Not that people cannot change, but there seems very little evidence that they will unless they – even in the minutest way – wish to do so. 

SMB connection over SSH

At one point, I wanted to connect from my MacBook Pro (using OS X Leopard 10.5.1)  to our OS X server’s Samba shares from off campus.  The only problem is that the server only allows SSH connections off campus.  This is all you need, however, to create a tunnel and connect to the windows shares.   To create the tunnel, do

 sudo ssh user@servername -L localhost:139:servername:139 

The next part involves mounting the share, which Leopard won’t let you do from the Finder (it gives the error message “This file server is running on your machine. Please access the volumes and files locally.” )  That’s ok, you can get around this by opening the terminal and typing the following commands:

  1. sudo mkdir /Volumes/sharename 
  2. sudo mount_smbfs //username:password@localhost/sharename /Volumes/sharename

 Note that in my case I wanted to have a subdirectory on the share mounted, so in place of command 2 above, I typed (all one line):  

sudo mount_smbfs //username:password@localhost/sharename/subdir /Volumes/sharename  

 

And it worked!  I then used this share to do my backup using Time Machine.  Time Machine will let you backup to network shares if you type the following at the terminal (all one line):

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1″