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
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.jamdev.jdl4pam.transforms.DLTransform

    org.jamdev.jdl4pam.transforms.DLTransform.DLTransformType
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an image transform from a whistleGroup.
  • Method Summary

    Modifier and Type
    Method
    Description
    makeScatterImage(ArrayList<double[][]> points, double[] size, double[] xlims, double[] ylims, double markerSize)
    Create a scatter image from points
    static ArrayList<double[][]>
    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

    Methods inherited from class java.lang.Object

    getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Whistles2Image

      public Whistles2Image(SegmenterDetectionGroup whistleGroup, Whistles2Image.Whistle2ImageParams params)
      Create an image transform from a whistleGroup.
      Parameters:
      whistleGroup - - the whistle group
      params - - the paramters for whsilte image - min. freq., max. freq., width in pixels and height in pixels.
  • Method Details

    • whistContours2Points

      public static ArrayList<double[][]> whistContours2Points(SegmenterDetectionGroup whistleGroup)
      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 frequency
      size - - the width and height of the image in pixels
      xlims - - the minimum and maximum time in milliseconds from 0;
      ylims - - the minimum and maximum frequency in Hz
      markerSize - - the marker size in pixels
      Returns:
      an image with y axis as frequency and x axis as time.