Class NavigationOffsetEstimator

java.lang.Object
noaa.coastwatch.util.NavigationOffsetEstimator

public class NavigationOffsetEstimator extends Object
The NavigationOffsetEstimator class uses image and land mask data to estimate the navigation error in a small tile of coastal image data. Success of the estimation is largely dependent on the separability of the image data into two classes: land and water. A good class separation is achieved when the pixels in each class differ significantly, such as for a daytime scene of low albedo water pixels and high albedo land pixels, or a high thermal contrast scene at night. The class separation is done using a histogram splitting method, and then the navigation error is determined by "shifting" the image data around to find the maximum correlation with a precomputed land mask.
Since:
3.1.9
Author:
Peter Hollemans
  • Constructor Details

    • NavigationOffsetEstimator

      public NavigationOffsetEstimator()
  • Method Details

    • setMinStdevDist

      public void setMinStdevDist(double dist)
      Sets the minimum distance in standard deviation units for successful histogram splitting. The histogram splitting step divides the image data into two classes, c1 and c2, with mean and standard deviations (u1, s1) and (u2, s2) respectively. The threshold value t divides the classes, where all pixels in c1 are less than t and all pixels in c2 are greater than t. The measure of class separation is given by the distance d(t) in standard deviation units, d(t) = min ((t-u1)/s1, (u2-t)/s2). The optimal histogram splitting threshold topt is the value of t that maximizes d(t), dmax = d(topt). By default, histogram splitting fails if dmax is less than 2.5, as this indicates that the classes are not sufficiently "distinct" for a reliable navigation offset estimation.
      Parameters:
      dist - the new minimum distance in standard deviation units.
    • setMinCorrelation

      public void setMinCorrelation(double corr)
      Sets the minimum image correlation value for successful offset estimation. By default, image pixels separated into land and water classes by the histogram splitting step must match the precomputed land mask with a correlation of at least 0.95 at some offset value in order to for the offset to be reported.
      Parameters:
      corr - the new minimum correlation value in the range [0..1].
    • setMinFraction

      public void setMinFraction(double frac)
      Sets the minimum class pixels as a fraction of total image pixels. Be default, image pixels in either the land or water classes must make up at least 5% of the image pixels in order for the navigation box to be used in the correlation.
      Parameters:
      frac - the new minimum class fraction in the range [0..1].
    • setVerbose

      public void setVerbose(boolean flag)
      Sets the verbose flag to print verbose output during estimation.
    • getOffset

      public int[] getOffset(Grid grid, EarthTransform trans, EarthLocation earthLoc, int boxHeight, int boxWidth, int searchLevel)
      Gets the offset estimate for the specified earth location.
      Parameters:
      grid - the grid to use for data values.
      trans - the earth transform for the data grid.
      earthLoc - the center location for the navigation box.
      boxHeight - the navigation box height in data dimensions.
      boxWidth - the navigation box width in data dimensions.
      searchLevel - the search level, starting from 0. A search level of 0 searches using only image data inside the navigation box. A search level of n increases the search area to (n+1)^2 times the size of the navigation box, with a corresponding increase in algorithm run time.
      Returns:
      the offset estimate, or null if the class separation or image correlation failed.