Class OverheadView<T extends ImageBase<T>>


public class OverheadView<T extends ImageBase<T>>
extends Object

Data structure for an overhead orthogonal view with known metric properties. Each pixel in the overhead view corresponds to a square of known size and location in the world. The each size of the square regions is specified by cellSize and the origin by (centerX,centerY).

The overhead +x axis corresponds to the world's +z axis and the image's +y axis corresponds to the world's -x axis. The user specify the origin by changing centerX and centerY parameters. It is common to set centerX = 0 , centerY = output.height*cellSize/2.0.

overhead pixels to world coordinates: (x,y) = (x_p,y_p)*cellSize - (centerX,centerY)
world coordinates to overhead pixels: (x_p,y_p) = [(x,y) - (centerX,centerY)]/cellSize


  • When rendering the overhead image objects to the left will appear on the right and the other way around. This is an artifact that in image's it's standard for +y to point down (clock-wise of +x), while on 2D maps the standard is +y being counter-clock-wise of +x.

  • Field Details

    • image

      public T extends ImageBase<T> image
      Image containing the overhead view.
    • centerX

      public double centerX
      X-coordinate of camera center in the overhead image in world units.
    • centerY

      public double centerY
      Y-coordinate of camera center in the overhead image in world units.
    • cellSize

      public double cellSize
      Size of each cell in the overhead image in world units.
  • Constructor Details

    • OverheadView

      public OverheadView()
    • OverheadView

      public OverheadView​(T image, double centerX, double centerY, double cellSize)
  • Method Details

    • getImage

      public T getImage()
    • setImage

      public void setImage​(T image)
    • getCenterX

      public double getCenterX()
    • setCenterX

      public void setCenterX​(double centerX)
    • getCenterY

      public double getCenterY()
    • setCenterY

      public void setCenterY​(double centerY)
    • getCellSize

      public double getCellSize()
    • setCellSize

      public void setCellSize​(double cellSize)