Flatten Illumination Home

Enhancement Demo Instructions
  • Load the Betsy shipwreck.tiff image in the Demo_images folder with the {MLx - Image files - TIFF - read} command.
  • Display the image by clicking the zoom box. This is at the right end of the title bar, which is all that is visible of the image at the moment.

    If the image looks blotchy it is because your system palette (which MacLispix uses) has only a few gray levels. Use the Monitors control panel to change the screen to 256 gray levels, or thousands or millions of colors if available. You are looking ae the bottom of the inside of the wooden hull of a Revolutionary War boat. The white squares are part of a foot long ruler.

  • (optional) Transpose the image using the transpose.. command via the Pixel Ops button. The image will revert to the title bar. Click on the grow square to display it again.

    This is needed to make the image upright, and is not done with the 8 bit fast TIFF reader used for this file. The transposed image is an example of the way images are often read from other programs such as NIH Image and has to do with the the way various programming languages naturally read images - either by rows or by collumns.

  • Smooth the image with a large kernel with the ..Mean.. pixel op command. Use a kernel size of 40-80, and 'Int' (integer) for the resulting data type. The larger the kernel size, the larger the features that are NOT flattened. For this image, kernel sizes of 40 - 105 seem to work well (and look about the same), while 200 is too large, not leaving much image left and 10 is too small.
  • Display the smoothed result if desired by clicking on the zoom box. The image will be very fuzzy, representing mostly the gradation of shading from light to dark going down the image. There is not much to look at, really.
  • Subtract the smoothed version from the original using the int_array_subtract pixel op. The original image should be the minuend, and the filtered version (..._mean) should be the subtrahend. (This is actually a variation of 'unsharp masking' - the sharpen command found in NIH Image and Adobe Photoshop.) Display the result. Note that the image is flattened. And the contrast can now be enhanced.

    Note that not all of the array name (window title) is visible. To see the entire name:

  • Enhance the contrast. There are several ways to do this. A manual way is to use the contrast slider, Slider...contrast button and adjust as desired. An automatic way is to use clipped scaling with the scale...clip button select the difference image (the top one in the list) and use 1% or 0.5% as the percentage of the areas to force to black and white. The Scale...equalize button yields about the same results.

    Histogram equalized difference image. Original image. Mean filtered (smoothed) image.

  • The image may be saved to a file as is - with {MLx - Images - Save As TIFF}. Note that what is displayed is the difference image (which has low contrast), which was enhanced with the look up table. If the image is saved as a gray scale image, the low contrast version (origional) will be saved, without the look up table. If the Indexed (false) color version is saved - then the look up table is stored along with the image.

    For more details, see the MAS Journal Tutorial article.


    Background on Betsy Shipwreck.tiff Top | Home

    This image is of the inside of the hull (a bow ceiling) of the Betsy, a British ship that sunk off Yorktown, Va. in 1781. General Cornwallis scuttled this ship and a number of others just off shore to protect a beach from the French navy, which was going to attack him to stop his siege of yorktown. See John O. Sands, Yorktown's Captive Fleet, Univ. Press of Va., 1983.

    The image shows the bottom interior of the hull, made of wood planking. The image is bright at the top because the diver that took the image held the flash unit above his head, and the water is cloudy. The white squares are marks on a foot long ruler.

    Photograph courtesy of:

    John D. Broadwater Sanctuary Manager Monitor National Marine Sanctuary NOAA/Building 1519Ft. Eustis, VA 23604-5544

    and

    The Yorktown Shipwreck Archeological Project.