PC Conversion Tools

PC-based MSTAR conversion tools (Version: 1.0). The MS-DOS executables and libraries were generated on a Pentium II 266MHz PC running Windows 95 using Borland C/C++ v5.02. They can be used on any Windows 95, Windows 98, or Windows NT PC.

NOTE: Both executables require that 'cw3230.dll', a (provided) dynamically-linked library (dll) be placed in the directory where the executables will reside.

EXECUTABLES:

SDMS currently provides two PC-based tools for MSTAR conversion:

  1. mstar2jpg.exe : MS-DOS executable. Converts the magnitude portion of MSTAR files to 8-bit JPEG.
  2. mstar2tiff.exe : MS-DOS executable. Converts the magnitude portion of MSTAR files to 8-bit TIFF.

Both executables include code to automatically byteswap the big-endian MSTAR data to little-endian (PC) before linear downsampling to 8-bit. Both also include options to automatically enhance the MSTAR data, to dump the Phoenixheader to an output file, and to operate in verbose or quiet mode.

SYNTAX/USAGE:

[mstar2jpg]:

Usage: mstar2jpg -i <MSTAR File> -o <JPEG File> [-e] [-q] qf [-h] [-v]
  • [-e] = Contrast Enhancement Factor [Def: none]
  • [-q] = Compression Quality Factor [5-95, Def:75]
  • [-h] = Dump Phoenix (ASCII) header [Def: none]
  • [-v] = Verbose mode [Def: Quiet]
Example 1: mstar2jpg -i hb00001.0000 -o hb00001.0000.jpg
This creates an 8-bit JPEG file called 'hb00001.0000.jpg' from the magnitude portion of MSTAR input file 'hb00001.0000'. It does not enhance the image, operates in the quiet mode, does not dump the Phoenix header, and uses the default JPEG quality factor (75).

NOTE: JPEG Quality Factor

  • Larger factors result in better output picture quality but also larger output size (i.e. less compression).
  • Smaller factors result in lower output picture quality but also smaller output size (i.e. more compression).
  • MSTAR respond well to quality factors as low as 25-30 before picture degradation is too acute.
Example 2: mstar2jpg -i hb00001 -o hb00001.jpg -e -q 30.0 -h -v
This creates an 8-bit JPEG file called 'hb00001.jpg' from the magnitude portion of MSTAR input file 'hb00001'. It auto-enhances the output image, operates in the verbose mode, dumps the ASCII Phoenix header to an output file (hb00001.hdr), and JPEG compresses the output using a quality factor of 30.0.

NOTE: Auto-Enhancement

  • The enhancement algorithm does a pretty good job of enhancing the MSTAR files. However, it may not work well on all images. You may need to adjust the contrast yourself using an appropriate image processing tool.

[mstar2tiff]:

Usage: mstar2tiff -i <MSTAR File> -o <TIFF File> [-e] [-h] [-v]
  • [-e] = Auto-contrast enhance [Def: none]
  • [-h] = Dump Phoenix (ASCII) header [Def: none]
  • [-v] = Verbose mode [Def: Quiet]
Example 1: mstar2tiff -i hb00001.0000 -o hb00001.0000.tif
This creates an 8-bit TIFF file called 'hb00001.0000.tif' from the magnitude portion of MSTAR input file 'hb00001.0000'. It does not enhance the image, operates in the quiet mode, and does not dump the Phoenix header.
Example 2: mstar2tiff -i hb00001 -o hb00001.tif -e -h -v
This creates an 8-bit TIFF file called 'hb00001.tif' from the magnitude portion of MSTAR input file 'hb00001'. It auto-enhances the output image, operates in the verbose mode, and dumps the ASCII Phoenix header to an output file (hb00001.hdr).

JPEG & TIFF LIBRARIES

Borland C/C++ v5.02 versions of the 'libtiff' (Sam Leffler) and 'libjpeg' libraries are available upon request. These are MS-DOS libraries.