Class Whistles2Image
java.lang.Object
org.jamdev.jdl4pam.transforms.SimpleTransform
org.jamdev.jdl4pam.transforms.FreqTransform
rawDeepLearningClassifier.dlClassification.delphinID.Whistles2Image
- All Implemented Interfaces:
org.jamdev.jdl4pam.transforms.DLTransform
public class Whistles2Image
extends org.jamdev.jdl4pam.transforms.FreqTransform
Transform whistles to an image.
Here we extend the FreqTransform class because it contains lots of image
transforms that are useful once the whistles have been converted into an
image.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jamdev.jdl4pam.transforms.DLTransform
org.jamdev.jdl4pam.transforms.DLTransform.DLTransformType
-
Constructor Summary
ConstructorDescriptionWhistles2Image
(SegmenterDetectionGroup whistleGroup, Whistles2Image.Whistle2ImageParams params) Create an image transform from a whistleGroup. -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
makeScatterImage
(ArrayList<double[][]> points, double[] size, double[] xlims, double[] ylims, double markerSize) Create a scatter image from pointsstatic ArrayList<double[][]>
whistContours2Points
(SegmenterDetectionGroup whistleGroup) Convert a list of whistle contours to a list of time and frequency points.Methods inherited from class org.jamdev.jdl4pam.transforms.FreqTransform
getDLTransformType, getFreqlims, getSpecTransfrom, setFreqlims, setSpecTransfrom, transformData
Methods inherited from class org.jamdev.jdl4pam.transforms.SimpleTransform
equals, getParams, setParams
-
Constructor Details
-
Whistles2Image
public Whistles2Image(SegmenterDetectionGroup whistleGroup, Whistles2Image.Whistle2ImageParams params) Create an image transform from a whistleGroup.- Parameters:
whistleGroup
- - the whistle groupparams
- - the paramters for whsilte image - min. freq., max. freq., width in pixels and height in pixels.
-
-
Method Details
-
whistContours2Points
Convert a list of whistle contours to a list of time and frequency points.- Parameters:
whistleGroup
- - list of whistle contours within a detection group.- Returns:
- an array with time (seconds from start of group) and frequency (Hz)
-
makeScatterImage
public static BufferedImage makeScatterImage(ArrayList<double[][]> points, double[] size, double[] xlims, double[] ylims, double markerSize) Create a scatter image from points- Parameters:
points
- - list of time frequency points - the points are time (milliseconds from 0) and frequencysize
- - the width and height of the image in pixelsxlims
- - the minimum and maximum time in milliseconds from 0;ylims
- - the minimum and maximum frequency in HzmarkerSize
- - the marker size in pixels- Returns:
- an image with y axis as frequency and x axis as time.
-