Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Posts Tagged ‘Terrain Correction’

IMCORR– using image correlation to georeference an image

Posted by smathermather on January 23, 2010

IMCORR is a package distributed by the National Snow and Ice Data Center (did you know we have one of those?), or NSIDC, that performs image cross correlation between two images using a comparison between a moving image chip in each image.  It measures the displacement (in pixels) between the objects found in the two images, and writes that out to a text file.  It is used to calculate how quickly glaciers are moving by calculating displacements.  If you have an image of a glacier from two different time periods, this little program will calculate how far crevasse zones and other discernible features have moved between two images. I know I know.  I have been talking about trees, and now ice.  Bear with me.

IMCORR can also be used for simple image georeferencing, say when we don’t want to collect our own tie points.  We can look for correlations between two images, and tabulate those as points, use them with a thin plate spline, in say gdalwarp, and thus correct for distortions in one dataset with another one.

Now, this is all in theory, and I haven’t tested it yet.  But I’m thinking this may be a really useful technique, especially because we already have well referenced high-resolution aerials for so many areas.  I have an effective 3″ color infrared (CIR) dataset for an entire county kicking around somewhere that has been referenced to frame on center, but with no terrain correction or other optical distortion corrections applied.  I’m hoping to cross correlate these with a 6″ georeferenced aerial in order to make these data useable.  3″ CIR could be very useful for all sorts of fun applications… .

Posted in GIS | Tagged: , , , , , , , | Leave a Comment »

Follow-up (#1) for Camera Calibration in POV-Ray (Porro-Koppe Principle in Virtual)

Posted by smathermather on September 7, 2008

Ok, so projecting an image isn’t hard at all in POV-Ray.  I’m not sure what I was thinking.  In my first post on camera calibration in POV-Ray, I suggested that we could analytically solve for lens and topographic distortion in POV-Ray.  I haven’t gotten far as I don’t have a work project to take advantage of this yet, but I projected a false color infrared image from a Landsat image over Argentina onto the walls of virtual building.  The walls would be replaced with topography, the camera with an orthographic camera, and some lenses would be in-between, but at least it is a start.  It is basically just a modified version of some example code from Boris van Schooten.  Just so long as a photon scene does something similar, the rest of the problem shouldn’t be too hard to solve.  With my schedule as it is right now, about 3 hours of coding is probably about 3 months though… .

Projected Satellite Image

Projected Satellite Image

union {
polygon {5, <0,0,0>, <0,1,0>,<1,1,0>,<1,0,0>,<0,0,0>}
disc {<0.5, 1, 0>, <0, 0, 1>, 0.5}
pigment {
image_map {jpeg “landsat-argentina.jpg” interpolate 2 filter all 1.0 }
scale <1,1.5,1>
}
finish{ambient 1.0}
translate x*-0.5
scale <20,20,1>

translate z*13.9
}

Posted in Camera Calibration, GIS, POV-Ray | Tagged: , , , , , , , | Leave a Comment »

19th Century Camera Calibration for Remote Sensing in PovRay (or Porro-Koppe Principle in Virtual)

Posted by smathermather on August 24, 2008

A complete analytic solution for geometric distortions in remote sensing (ahem, ignoring atmosphere, of course)

Ok, so here is another thought experiment. This time, it will take a few months before I have time to write the code for this, but maybe the thought experiment will inspire someone. A major problem of photogrammetry, remote sensing, and computer vision is correction of lens distortion. Thanks to almost a century of working with this problem, and recent developments in computer vision, your average geek can now calibrate her camera with freely available code. see the Camera Calibration Toolbox for code written in Matlab– there are also links to other free camera calibration projects.

I have a real interest in using cheap off-the-shelf cameras for solving small remote sensing problems, and it would be nice to be able to correct distortions in the images with my favorite computational tool, PovRay.

So, how to do this? Well, let’s not think of this as an empirical problem like most of the corrections of today. The Camera Calibration Toolbox, for example, requires image inputs from the camera to correct for the distortion. What if, instead, we arrive at a completely analytic solution using the known information about the array of lenses, their geometry and index of refraction to correct for distortion? What if we created a virtual array of lenses identical to our camera, and pass our image back through the lenses to cancel the lens distortion effects? This would be the virtual version of an late 19th century technique discussed by Clarke and Fryer, 1998:

For mapping applications the earliest solutions to the problems associated with large radial lens distortions were by direct optical correction whereby the image was re-projected through the camera and lens system which had captured it. This system was termed the Porro-Koppe Principle after the scientists who perfected it in the latter part of the 19th century. In this manner the geometric distortions in the image were canceled.

How do we build such a system? Well, we start with a photon scene, ala Henrik Wann Jensen, and take advantage of the constructive geometry lens set ala Don Barron, and project our image back through a virtual version of our lens set, to be captured on a flat surface with an orthographic camera in PovRay. But here’s an opportunity– If our original scene captured by the camera was not flat, and we knew its three dimensional properties from other information (stereo pair or lidar), we could project the scene back on to it’s 3D geometry, then capture with an orthographic camera, and then we could correct for terrain distortion and camera distortion all in one go. Fun stuff huh– all implemented in free software, a complete analytic solution for geometric distortions in remote sensing.

Just one problem– I’m not quite sure how to project an image in PovRay. Oh, I could do it brute force and create a square transparent pane of color for each pixel (which I may end up doing), but if anyone has a better idea, I’m open to it.

T.A. Clarke and J.G. Fryer, Photogrammetric Record, 16(91): 51-66, April 1998 found at: http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/ref.html)

Posted in Camera Calibration, GIS, POV-Ray | Tagged: , , , , , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 198 other followers