Image & Raster Processing Tools (image)

The image subsystem (code/image/) provides 52 command-line utilities for manipulating, reprojecting, mosaicking, filtering, classifying, and converting 8-bit greyscale and 32-bit floating-point (.r4) OMG1 (JHC_header / ACRES) raster arrays, multibeam water-column echograms (.vert_prof, .wcim), and satellite/airborne remote sensing imagery.

Tool Categories

1. Contrast Stretching, Color Composites & Radial/Cloud Filtering

  • stretchacres — Stretches 8-bit OMG1 arrays (.vert_prof, .8bit, .mos), applies piecewise-linear or dB curves, draws borders/fixes, and exports Netpbm .pgm or .ppm images.
  • makecolcomp — Combines three 8-bit OMG1 band files (-red, -green, -blue) into an 8-bit 3-3-2 RGB composite or exports the 256-entry RGB colormap.
  • removeRadial — Compensates radial illumination drop-off (vignetting/hotspot) around a specified pixel center using additive or multiplicative power laws.
  • removecloud & replacecloud — Extracts and restores bright cloud pixels (> thresh) around spatial filtering operations.

2. Resampling, Cropping & Geometric Transformation

  • subimage — Extracts rectangular sub-grids by pixel coordinates (-left_x, -top_y) or geographic center (-geocentre) from 8-bit or .r4 OMG1 rasters.
  • decimate & decr4 — Downsamples 8-bit (decimate) or 32-bit float (decr4) OMG1 grids by integer factors using boxcar mean, minimum (-lowest), or shoal-biased (-shoal_bias) rules.
  • expand & expandr4 — Upsamples (or decimates) 8-bit (expand) or 32-bit float (expandr4) OMG1 grids using block replication or masked bilinear interpolation (-interp -mask).
  • changeAspect — Rescales horizontal and vertical dimensions of 8-bit or .r4 grids independently (-xfactor, -yfactor, -xdim, -ydim).
  • rotateimage — Rotates 8-bit OMG1 images by 90° clockwise, flips horizontally (-hflip), or rotates by an arbitrary angle (-rotate_angle).
  • distortImage — Warps and registers an 8-bit OMG1 image onto a reference image (-ref) or Mercator grid (-geo) using a 2-point control file.
  • shoalBias & removeOverplot — Downsamples .r4 bathymetric DTMs to shoal-biased hydrographic bins while tracking exact sub-bin (lat, lon) sounding offsets.
  • getShifts — Computes per-column vertical valid-data bounds for compacting oblique strip mosaics.

3. Mosaicking, Map Patching & Tiling

  • patchArea & patchArea_MercOnly — Reprojects and patches multiple georeferenced 8-bit or .r4 (.gz) OMG1 mapsheets across projections with automatic anti-alias downsampling.
  • pastemos & paster4 — Pastes 8-bit (pastemos) or .r4 float (paster4) sub-images onto a composite canvas, including 24-bit .ppm Magnitude/Azimuth color wheels and Temperature/Salinity encoding.

4. Polygon Masking & Stenciling

  • mask_make, jb_mask_make & mask_ray — Generates 8-bit filled polygon mask files from ASCII vertex lists using scanline parity or 4-way ray-casting.
  • stencil & stencilIPV — Masks 8-bit, .r4 float, or multi-plane .ipv images using an 8-bit mask and optional underlay image (-under).

5. Multibeam Water Column & Acoustic Coverage Modeling

  • TAtoXZ — Projects SM2000 water-column Time-Angle (.TA_inten, .TA_phase) frames into Cartesian across-track/depth (.XZ_inten, .XZ_phase) fan coordinates.
  • comboTAs, comboVPs & patchTA — Combines and resamples .time_angle, .vert_prof, and .wcim water-column files into unified along-track echograms.
  • stackPIEs — Stacks and averages sliding windows of .wcim water-column fan images with graticules, timestamps, tide shifts, and curtain slices.
  • projectForwardVideo — Orthorectifies shipboard forward-looking video frames onto a sea-surface Mercator grid for correlation with water-column data.
  • embedBeamSpacing & showCoverage — Simulates multibeam beam footprints, dual-swath/multi-sector spacing, and 2D sonar equation SNR coverage.

6. Spectral, Histogram & Backscatter Classification Analysis

  • fft2dimage — Performs single-window or sliding-window 2D FFT spectral sandwave analysis on .r4 bathymetric DTMs, outputting wavelength (.wav.r4), azimuth (.azi.r4), and amplitude (.mag.r4) maps.
  • MSpecBS_Xplot — Cross-plots multi-frequency backscatter mosaics (*.mos) constrained by bathymetry (-dep) and maps 2D spectral clusters (-class_mask).
  • classify — Classifies seafloor backscatter from three angular-sector mosaics (.nad, .mea, .tai) into intensity (.int), slope (.slp), and 16-class (.cls) maps.
  • histimage — Extracts normalized 256-bin histograms across up to 10 rectangular sub-regions.

7. Format Conversion & Satellite / SAR Processing


Table of contents