Class DetectedRegion

java.lang.Object
tritechgemini.detect.TwoThresholdDetector
tritechgemini.detect.DetectedRegion
All Implemented Interfaces:
RegionDetector

public class DetectedRegion extends TwoThresholdDetector
A connected region of points found by the detector. Point data consist of a list of index pointers back into the original record.
Author:
Doug Gillespie
  • Constructor Details

    • DetectedRegion

      public DetectedRegion(SonarImageRecordI geminiRecord, int pointIndex)
      During detection
      Parameters:
      geminiRecord -
      pointIndex -
    • DetectedRegion

      public DetectedRegion(long timeMilliseconds, int sonarId, double minB, double maxB, double peakB, double minR, double maxR, double peakR, double objectSize, int meanV, int totV, int maxV, double occupancy)
      With viewer
      Parameters:
      timeMilliseconds -
      sonarId -
      minB -
      maxB -
      minR -
      maxR -
      meanV -
      totV -
      maxV -
  • Method Details

    • getOccupancy

      public double getOccupancy()
      Returns:
      the occupancy
    • getSonarId

      public int getSonarId()
      Returns:
      the sonarId
    • getTimeMilliseconds

      public long getTimeMilliseconds()
      Returns:
      the timeMilliseconds
    • getObjectSize

      public double getObjectSize()
      The biggest diagonal measurement of length and breadth.
      Returns:
      the objectSize in metres.
    • getnPoints

      public int getnPoints()
      the number of pixels which went into the region
      Returns:
      the nPoints
    • addPoint

      public void addPoint(int pointIndex)
      Add a point to the growing region
      Parameters:
      pointIndex -
    • completeRegion

      public void completeRegion()
      Called when the image stops growing to measure a few parameters about the image, such as min and max bearings and ranges.
    • getGeminiRecord

      public SonarImageRecordI getGeminiRecord()
      Returns:
      the geminiRecord
    • getPointIndexes

      public ArrayList<Integer> getPointIndexes()
      Returns:
      the pointIndexes
    • getMinBearing

      public double getMinBearing()
      Returns:
      the minimum bearing in radians
    • getMaxBearing

      public double getMaxBearing()
      Returns:
      the maximum bearing in radians
    • getMinRange

      public double getMinRange()
      Returns:
      the minimum range in metres
    • getMaxRange

      public double getMaxRange()
      Returns:
      the maximum range in metres
    • getTotalValue

      public int getTotalValue()
      The sum of all pixes in the detected region
      Returns:
      the totalValue
    • getAverageValue

      public int getAverageValue()
      Average intensity in the region.
      Returns:
    • getRegionSize

      public int getRegionSize()
      Get the total number of pixels making up the region.
      Returns:
      number of pixels in region
    • getMaxValue

      public int getMaxValue()
      Returns:
      the maxValue
    • getPeakRange

      public double getPeakRange()
      Returns:
      the peakRange
    • getPeakBearing

      public double getPeakBearing()
      Returns:
      the peakBearing
    • getPeakX

      public double getPeakX()
      Get X coordinate of peak
      Returns:
    • getPeakY

      public double getPeakY()
      Get Y coordinate of peak
      Returns:
    • merge

      public void merge(DetectedRegion other)
    • overlaps

      public boolean overlaps(DetectedRegion other)
      check to see if another region overlaps this one in bearing or range.
      Parameters:
      other -
      Returns:
      true if overlapping
    • toString

      public String toString()
      Overrides:
      toString in class Object