Search Results for

    Show / Hide Table of Contents

    Class Oblong

    Inheritance
    Object
    Oblong
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: TowseyLibrary
    Assembly: TowseyLibrary.dll
    Syntax
    public class Oblong

    Constructors

    | Improve this Doc View Source

    Oblong(Int32, Int32, Int32, Int32)

    Initializes a new instance of the Oblong class. CONSTRUCTOR.

    Declaration
    public Oblong(int row1, int col1, int row2, int col2)
    Parameters
    Type Name Description
    Int32 row1
    Int32 col1
    Int32 row2
    Int32 col2
    | Improve this Doc View Source

    Oblong(Int32, Int32, Int32, Int32, ISet<Point>)

    Initializes a new instance of the Oblong class. CONSTRUCTOR.

    Declaration
    public Oblong(int row1, int col1, int row2, int col2, ISet<Point> hitElements)
    Parameters
    Type Name Description
    Int32 row1
    Int32 col1
    Int32 row2
    Int32 col2
    ISet<SixLabors.ImageSharp.Point> hitElements

    Properties

    | Improve this Doc View Source

    Category

    Declaration
    public int Category { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ColCentroid

    Gets location of Oblong's centre column in parent matrix.

    Declaration
    public int ColCentroid { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ColumnLeft

    Gets or sets the location of Oblong's left most column in parent matrix.

    Declaration
    public int ColumnLeft { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ColumnRight

    Gets or sets the location of Oblong's right most column in parent matrix.

    Declaration
    public int ColumnRight { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    ColWidth

    Declaration
    public int ColWidth { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    HitElements

    Gets or sets the collection of points that form the perimeter of the oblong.

    Declaration
    public ISet<Point> HitElements { get; set; }
    Property Value
    Type Description
    ISet<SixLabors.ImageSharp.Point>
    | Improve this Doc View Source

    MaxCol

    Declaration
    public static int MaxCol { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RandomNumber

    Declaration
    public int RandomNumber { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RowBottom

    Gets or sets the location of Oblong's bottom row in parent matrix.

    Declaration
    public int RowBottom { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RowTop

    Gets or sets the location of Oblong's top row in parent matrix.

    Declaration
    public int RowTop { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RowWidth

    Declaration
    public int RowWidth { get; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc View Source

    AdjacentRows(Oblong)

    Declaration
    public bool AdjacentRows(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Area()

    Declaration
    public int Area()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    AssignCategories(List<Oblong>, Int32[])

    Declaration
    public static void AssignCategories(List<Oblong> shapes, int[] categories)
    Parameters
    Type Name Description
    List<Oblong> shapes
    Int32[] categories
    | Improve this Doc View Source

    CategoryShapes(List<Oblong>, Int32[], Int32)

    returns a list of shapes that represent the averages of shapes in each category dervied from FuzzyART clustering.

    Declaration
    public static List<Oblong> CategoryShapes(List<Oblong> shapes, int[] categories, int categoryCount)
    Parameters
    Type Name Description
    List<Oblong> shapes
    Int32[] categories
    Int32 categoryCount
    Returns
    Type Description
    List<Oblong>
    | Improve this Doc View Source

    Centroid()

    Declaration
    public int[] Centroid()
    Returns
    Type Description
    Int32[]
    | Improve this Doc View Source

    CentroidDistance(Oblong)

    Declaration
    public double CentroidDistance(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Double
    | Improve this Doc View Source

    Clone(Oblong)

    Declaration
    public static Oblong Clone(Oblong s)
    Parameters
    Type Name Description
    Oblong s
    Returns
    Type Description
    Oblong
    | Improve this Doc View Source

    colCentroid()

    Declaration
    public int colCentroid()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    ColumnOverlap(Oblong, Oblong)

    Declaration
    public static int ColumnOverlap(Oblong o1, Oblong o2)
    Parameters
    Type Name Description
    Oblong o1
    Oblong o2
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    ColumnShift(Oblong)

    Declaration
    public int ColumnShift(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    ColumnWidth(Double[,], Int32, Int32, out Int32)

    Declaration
    public static void ColumnWidth(double[, ] m, int col, int row, out int colWidth)
    Parameters
    Type Name Description
    Double[,] m
    Int32 col
    Int32 row
    Int32 colWidth
    | Improve this Doc View Source

    Distribution(List<Oblong>, Int32)

    Reurns the distribution of the column-centroids. The rectangular shapes are assumed to exist in a matrix whose rows are time frames and whose columns are freq bins. The returned distribution is therefore over freq domain.

    Declaration
    public static int[] Distribution(List<Oblong> shapes, int binCount)
    Parameters
    Type Name Description
    List<Oblong> shapes
    Int32 binCount
    Returns
    Type Description
    Int32[]
    | Improve this Doc View Source

    Encloses(Oblong)

    Declaration
    public bool Encloses(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    FeatureMatrix(List<Oblong>)

    Declaration
    public static double[, ] FeatureMatrix(List<Oblong> shapes)
    Parameters
    Type Name Description
    List<Oblong> shapes
    Returns
    Type Description
    Double[,]
    | Improve this Doc View Source

    Features()

    Declaration
    public double[] Features()
    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    FeaturesNormalised()

    Declaration
    public double[] FeaturesNormalised()
    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    GetShape(Int32, Int32, ArrayList)

    Declaration
    public static Oblong GetShape(int row, int col, ArrayList shapes)
    Parameters
    Type Name Description
    Int32 row
    Int32 col
    ArrayList shapes
    Returns
    Type Description
    Oblong
    | Improve this Doc View Source

    IncludesColumn(Int32)

    Declaration
    public bool IncludesColumn(int colNumber)
    Parameters
    Type Name Description
    Int32 colNumber
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    IncludesRow(Int32)

    Declaration
    public bool IncludesRow(int rowNumber)
    Parameters
    Type Name Description
    Int32 rowNumber
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    InExistingShape(Int32, Int32, ArrayList)

    Declaration
    public static bool InExistingShape(int row, int col, ArrayList shapes)
    Parameters
    Type Name Description
    Int32 row
    Int32 col
    ArrayList shapes
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    MergeCloseShapes(ArrayList)

    Declaration
    public static ArrayList MergeCloseShapes(ArrayList shapes)
    Parameters
    Type Name Description
    ArrayList shapes
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    MergeShapesWhoseEndsOverlap(ArrayList, Int32)

    Declaration
    public static ArrayList MergeShapesWhoseEndsOverlap(ArrayList shapes, int dyThreshold)
    Parameters
    Type Name Description
    ArrayList shapes
    Int32 dyThreshold
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    MergeShapesWithAdjacentRows(ArrayList, Int32, Double)

    Declaration
    public static ArrayList MergeShapesWithAdjacentRows(ArrayList shapes, int dxThreshold, double ratio)
    Parameters
    Type Name Description
    ArrayList shapes
    Int32 dxThreshold
    Double ratio
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    OverlapArea(Oblong)

    Declaration
    public int OverlapArea(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    Overlaps(Oblong)

    Declaration
    public bool Overlaps(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    PointInside(Int32, Int32)

    Declaration
    public bool PointInside(int rowNumber, int colNumber)
    Parameters
    Type Name Description
    Int32 rowNumber
    Int32 colNumber
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    ProcessShapes(ArrayList)

    Declaration
    public static ArrayList ProcessShapes(ArrayList shapes)
    Parameters
    Type Name Description
    ArrayList shapes
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    RemoveEnclosedShapes(ArrayList)

    Declaration
    public static ArrayList RemoveEnclosedShapes(ArrayList shapes)
    Parameters
    Type Name Description
    ArrayList shapes
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    RemoveOverlappingShapes(ArrayList)

    Declaration
    public static ArrayList RemoveOverlappingShapes(ArrayList shapes)
    Parameters
    Type Name Description
    ArrayList shapes
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    RemoveSmall(ArrayList, Int32)

    Declaration
    public static ArrayList RemoveSmall(ArrayList shapes, int minArea)
    Parameters
    Type Name Description
    ArrayList shapes
    Int32 minArea
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    RemoveSmallShapes(ArrayList)

    Declaration
    public static ArrayList RemoveSmallShapes(ArrayList shapes)
    Parameters
    Type Name Description
    ArrayList shapes
    Returns
    Type Description
    ArrayList
    | Improve this Doc View Source

    RotateOblongForStandardSpectrogram(Oblong, Int32, Int32)

    Declaration
    public static Oblong RotateOblongForStandardSpectrogram(Oblong oblong, int rowCount, int colCount)
    Parameters
    Type Name Description
    Oblong oblong
    Int32 rowCount
    Int32 colCount
    Returns
    Type Description
    Oblong
    | Improve this Doc View Source

    Row_Width(Double[,], Int32, Int32, out Int32)

    Declaration
    public static void Row_Width(double[, ] m, int col, int row, out int rowWidth)
    Parameters
    Type Name Description
    Double[,] m
    Int32 col
    Int32 row
    Int32 rowWidth
    | Improve this Doc View Source

    RowCentroid()

    Declaration
    public int RowCentroid()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    RowOverlap(Oblong, Oblong)

    Declaration
    public static int RowOverlap(Oblong o1, Oblong o2)
    Parameters
    Type Name Description
    Oblong o1
    Oblong o2
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    RowShift(Oblong)

    Declaration
    public int RowShift(Oblong s2)
    Parameters
    Type Name Description
    Oblong s2
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    SaveImageOfCentroids(Double[,], List<Oblong>, Color, String)

    Declaration
    public static void SaveImageOfCentroids(double[, ] matrix, List<Oblong> shapes, Color colour, string opPath)
    Parameters
    Type Name Description
    Double[,] matrix
    List<Oblong> shapes
    SixLabors.ImageSharp.Color colour
    String opPath
    | Improve this Doc View Source

    ShapesDetect(Double[,])

    assume that the input matrix is purely binary, i.e. zeros and ones.

    Declaration
    public static ArrayList ShapesDetect(double[, ] matrix)
    Parameters
    Type Name Description
    Double[,] matrix
    Returns
    Type Description
    ArrayList

    The ArrayList.

    | Improve this Doc View Source

    SortByColumnCentroid(List<Oblong>)

    Declaration
    public static List<Oblong> SortByColumnCentroid(List<Oblong> list1)
    Parameters
    Type Name Description
    List<Oblong> list1
    Returns
    Type Description
    List<Oblong>
    | Improve this Doc View Source

    WriteBounds()

    Declaration
    public void WriteBounds()
    | Improve this Doc View Source

    WriteData2File(List<Oblong>, String)

    Declaration
    public static void WriteData2File(List<Oblong> shapes, string shapesDataFname)
    Parameters
    Type Name Description
    List<Oblong> shapes
    String shapesDataFname
    | Improve this Doc View Source

    WriteDistribution(Int32[], Double)

    Declaration
    public static void WriteDistribution(int[] distribution, double binWidth)
    Parameters
    Type Name Description
    Int32[] distribution
    Double binWidth
    | Improve this Doc View Source

    WriteProperties()

    Declaration
    public void WriteProperties()

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top