Package tritechgemini.detect
Class DetectedRegion
java.lang.Object
tritechgemini.detect.TwoThresholdDetector
tritechgemini.detect.DetectedRegion
- All Implemented Interfaces:
RegionDetector
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 Summary
ConstructorsConstructorDescriptionDetectedRegion(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 viewerDetectedRegion(SonarImageRecordI geminiRecord, int pointIndex) During detection -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(int pointIndex) Add a point to the growing regionvoidCalled when the image stops growing to measure a few parameters about the image, such as min and max bearings and ranges.intAverage intensity in the region.doubledoubleintdoubledoubleintthe number of pixels which went into the regiondoubleThe biggest diagonal measurement of length and breadth.doubledoubledoubledoublegetPeakX()Get X coordinate of peakdoublegetPeakY()Get Y coordinate of peakintGet the total number of pixels making up the region.intlongintThe sum of all pixes in the detected regionvoidmerge(DetectedRegion other) booleanoverlaps(DetectedRegion other) check to see if another region overlaps this one in bearing or range.toString()Methods inherited from class tritechgemini.detect.TwoThresholdDetector
detectRegions, detectRegions, getConnectionTypes, getMaxObjectSize, getMinObjectSize, setMaxObjectSize, setMinObjectSize
-
Constructor Details
-
DetectedRegion
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
- Returns:
- the geminiRecord
-
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
-
overlaps
check to see if another region overlaps this one in bearing or range.- Parameters:
other-- Returns:
- true if overlapping
-
toString
-