The programs that I describe below were compiled and executed under a unix operating system (specifically, Irix from Silicon Graphics, Inc.). Some of the programs I wrote myself; others are freely available on the Internet. My image formats of choice are PPM, PGM, and PBM. Netpbm programs named with the letters "pnm" (Portable aNyMap) can handle all three of these formats.

Be warned that hyperlinks to the output files of the commands given below point to the actual, full-resolution output files in PPM format. If you can't read PPM files, have a slow connection to the Internet, or are short of disk space, then save yourself some trouble and don't click on those links.

My raw material, so to speak, is a SeaWiFS level-1A HDF file named S1999244172740.L1A_HNSG.

I use a program that I wrote called swl1a2tc to make a true-color PPM image out of the level-1A file.

swl1a2tc S1999244172740.L1A_HNSG > S1999244172740.L1A_HNSG.ppm

scaled-down version of true-color image output by swl1a2tc

In the current example, I am only interested in the perspective effects along the right (eastern) side of the swath. In an attempt to remove the effect from the left (western) side of the swath, I wrote another program called stretch_swath.

stretch_swath S1999244172740.L1A_HNSG.ppm > S1999244172740.L1A_HNSG.left_edge_stretched.ppm

true-color image with its left edge stretched out

An image often looks much more striking after it has been sharpened, so I use the ImageMagick convert program to do that. I have found that I introduce fewer artifacts into the image if I apply the sharpening step now instead of later in the process.

convert -sharpen 92 S1999244172740.L1A_HNSG.left_edge_stretched.ppm S1999244172740.L1A_HNSG.left_edge_stretched.sharpened.ppm

sharpened version of stretched, true-color image

Previous Next

Norman Kuring <>

16 November 2000