Archive

Archive for the ‘Software Design’ Category

Interpolation: Bilinear vs Bicubic

July 5th, 2009 No comments

Stereo reconstruction works by identifying similar features within two images, and we will use any technique that enhances small features.  As a first step in our stereo reconstruction pipeline we currently use bilinear interpolation to rectify/dewarp images.  While bilinear interpolation is easy to code and does a good job, there are many other types of interpolation worth considering. The two images below have been modified with bicubic interpolation and bilinear interpolation. The results confirm that bicubic is sharper, so we will eventually migrate to bicubic interpolation.

bilinear-vs-bicubic

Wikipedia has some more examples.

Converting 16 bit Images to 8-bit Images

June 21st, 2009 No comments

We spent the last year designing and building a camera and software that can capture images with pixels that are 16-bits deep.  It isn’t easy to view these images since most tools expect 8-bit images, so the following routine is used to squeeze the 65,536 values in the 16-bit image down to the 256 values of an 8-bit image.  There are thousands of ways to compress a 16-bit image, and this approach is specifically for our machine vision/stereoscopic needs.

This approach to compressing pixel intensities is based on the octave relationship, and it is similar to the way a piano’s keys represent a wide range of frequencies. Each “octave” in this case is light intensity that is either twice as bright or half as bright as its neighboring octave.  Each octave of light intensity is broken into 20 steps, and this is similar to the 12 keys (steps) in each octave of a piano keyboard.  Below is a table and chart that illustrate the conversion from 16-bit images to 8-bits. Each red dot in the chart represent an octave, and there are 20 steps inside each octave.  The approach outlined here allows an 8-bit image to evenly cover 12 octaves: almost the full dynamic range of a 16-bit image.

octaves

This curve will probably be modified many times with different numbers of divisions per octave, but the basic approach will stay the same.  Below is an example  of an original 16-bit linear image, and an 8-bit version of the same image after application of the above logarithmic curve.  The pictures are not pretty, but they illustrate how details can be pulled from the shadows.  The 16-bit linear image is on the left, and the curve-adjusted 8-bit image is on the right.

comparisonv2

The image at the right allows you to see the details in the shadows (notice the wires in the upper right) as well as details in the bright areas.   An image editing program could be used to manually adjust brightness and extract details from the 16-bit image, but the curve described here can do a good job automatically.

Next post: Rectification.

Google Sketchup Basecamp

June 14th, 2008 No comments

From June 11 to 13 Google hosted a 3-day training called SketchUp Basecamp. About 400 people from all over the world all gathered to learn about the 3D visualization techniques of SketchUp and how to integrate the 3D models into Google Earth. We spent most of our time on this patio and in the buildings that you see.

Inspired by Google’s global perspective, I decided to make a Google-centric version of a “Google Earth.” I stiched 18 images together to make a spherical panorama, and then warped the image to form a globe. This is a first draft, and I plan to post a better HDR version without the tripod and shadow once I get back home.

The stitching errors have been removed, and HDR & tone mapping have improved the details. There will probably be a V6 with a few more tweaks. A little more sky would be nice, and there are some HDR artifacts in the lower left.

54 shot panoramic HDR.
3 sets of 18: -2, 00, +2