mobu > Index > computing

Items tagged with computing

What if they held a Turing test and nobody came?

posted on Aug 29, 2011

The beautiful filter

posted on Aug 17, 2008
Researchers have found a way to automatically make us more attractive.  The interesting thing is they don't just photoshop our head onto Fabio's body (or vice versa, depending on your head. Or gender.), they leave you perfectly recognizable as you, without any ridiculous airbrushing or absurd body enhancements.

Hard to say if this is really cool, or really creepy.  But I predict that digital cameras will have this feature built-in 3 years from now.

HDRI Awesomeness

posted on Mar 2, 2008
I recently discovered the wonder of HDRI, and it's now the most awesome thing since the last awesome thing I discovered, which was Tinhorn Creek Cabernet Franc.

HDRI, in case you didn't know, is High Dynamic Range Imaging.  It basically involves capturing a higher range of values in an image than conventional digital sensors (or film) can normally represent.  In a conventional image, with strong brights and strong shadows, either the brights will be saturated, or the shadows will be black, or perhaps both.  There is basically no way to catch detail in both the bright spots and the shadows simultaneously.

The human eye can see detail in both brights and shadows at the same time, which is to say that our eyes have a higher dynamic range than cameras do.  There are a variety of ways to simulate the dynamic range of the eye, including using fancy sensors with built-in high dynamic ranges.  But the fun way to do it is cheat, and create composite images based on multiple shots taken at different exposure levels.

A quick scoot through my camera's menus found the auto-bracketing setting, which causes the camera to take three shots instead of one, at normal exposure, below normal, and above normal.  The amount of exposure above and below normal was configurable, so I set it to the max (2 full stops), and took a picture out my living room window.  The frame contains my bookshelves in deep shadow and the sunlit sky and rooftops out the window, which were very bright by comparison.  Auto-bracketing took 3 shots which did a pretty decent job of catching the range of exposures I was interested in.  The original shots are attached below.

There are HDRI programs out there that will allow you automatically combine different exposures and perform HDRI voodoo to combine them into one.  But I am simultaneously cheap, curious, and technically inclined, so I decided to see what I could do with just the Gimp.

I layered the images, largest exposure on top, and least on the bottom.  Then I used the Color to Alpha filter on the top exposure and converted white to transparent, which effectively deleted the saturated parts of the image, and made everything else semi-transparent according to its brightness.  Then I did the same to the second (middle) exposure.  With all that removed brightness, the result was a little dark, so I compressed the levels on the top layer.  That revealed that removing the whites made all the colours oversaturated, so I also reduced the saturation on the top layer.

The end result is shown above.  It has the slightly surreal tones of HDRI, which is kind of interesting.  It's not perfect, but it's a promising start.  The Gimp's color to alpha filter seems to translate value to transparency using a linear function that I would rather be logarithmic.  And the compression of levels in the top layer really reveals the limitations of JPEG's 8-bit range.  But that gives me something to work on in all the spare time I don't have.  I'll keep you informed.


Things that mobu likes, things that mobu does, things that mobu makes, things that mobu thinks.