Class AbstractVRMethod

java.lang.Object
videoRangePanel.vrmethods.AbstractVRMethod
All Implemented Interfaces:
VRMethod
Direct Known Subclasses:
AddCalibrationMethod, IMUMethod, VRHorizonMethod, VRLandMarkMethod, VRShoreMethod

public abstract class AbstractVRMethod extends Object implements VRMethod
AbstractVRMethod provides a significant amount of the basic functionality required to determine the range of an animal from an image. It also contains generic components, such as calibration lists, generic instructions and image location indicators for making a vrMethod
Author:
Jamie Macaulay
  • Field Details

    • MEASURE_ANIMAL

      public static final int MEASURE_ANIMAL
      Flag to indicate that all information is present to measure an animal
      See Also:
    • MEASURE_DONE

      public static final int MEASURE_DONE
      Flag to show that measurment is done.
      See Also:
    • vrControl

      public VRControl vrControl
  • Constructor Details

    • AbstractVRMethod

      public AbstractVRMethod(VRControl vrControl)
  • Method Details

    • getGPSinfo

      public LatLong getGPSinfo(long timeMillis)
      Get the lat long from the location mnanager for a given time.
      Parameters:
      timeMillis -
      Returns:
      the co-ordinates of the camera location at timeMillis
    • getGPSinfo

      public LatLong getGPSinfo()
      Get the current image co-ordinates based on the image time stamp.
      Returns:
      the co-ordinates the current image was taken from.
    • update

      public void update(int updateType)
      Description copied from interface: VRMethod
      Called from other parts of the module whenever a method panel may needed updated e.g. when new calibration data is manually added in the settings dialog.
      Specified by:
      update in interface VRMethod
      Parameters:
      updateType - - the update flag.
    • getHorizonPixel

      public Double getHorizonPixel(int x)
      Get's the Y coordinate of the horizon at a given X.
      Parameters:
      x -
      Returns:
    • calculateHorizonTilt

      public void calculateHorizonTilt()
      Gets called when a second horizon point is added and then calculates the horizon tilt, based on the two points.
    • newAnimalMeasurement_Horizon

      public boolean newAnimalMeasurement_Horizon(Point animalPoint)
      Measure an animnal based on two points defining the horizon in a picture. Note this method is not just used in the direct horizon method but any method which can reconstruct the horizon, such as using shore points.
      Parameters:
      animalPoint -
      Returns:
    • getCandidateMeasurement

      public VRMeasurement getCandidateMeasurement()
    • getHorizonTilt

      public double getHorizonTilt()
    • setHorizonTilt

      public void setHorizonTilt(double horizonTilt)
    • getImageHeading

      public Double getImageHeading()
    • getImagePitch

      public Double getImagePitch()
    • calcLocLatLong

      public void calcLocLatLong(VRMeasurement vrMeasurment)
      Calculates the lat long of an animal based on heading, range and the image origin.
      Parameters:
      vrMeasurment - - the lat long is added to a the imageLatLong field in the measurment.