Class CannyEdgeDetectorOpenImaj

  • All Implemented Interfaces:
    IEdgeDetector

    public class CannyEdgeDetectorOpenImaj
    extends Object
    implements IEdgeDetector
    This class is only a wrapper for the external class org.openimaj.image.processing.edges.CannyEdgeDetector.CannyEdgeDetector. This is needed since in our library any edge detector class must implement IEdgeDetector interface.
    Author:
    Azim Ahmadzadeh, Data Mining Lab, Georgia State University
    • Constructor Detail

      • CannyEdgeDetectorOpenImaj

        public CannyEdgeDetectorOpenImaj​(float lt,
                                         float ht,
                                         float s)
    • Method Detail

      • getEdges

        public double[][] getEdges​(double[][] sourceImg,
                                   double[] colors)
        Description copied from interface: IEdgeDetector
        This method extracts the edges of the given image by following the following three steps: 1) Compute gradient, 2) Perform Hysteresis, 3) Thresholding.
        Specified by:
        getEdges in interface IEdgeDetector
        Parameters:
        sourceImg - The source image whose edges are to be extracted.
        colors - An array of length two that specofies the background and edge color of the finla results. The first cell carries the background color intensity and its second cell carries the foreground color intensity. (Examples: new double{0.0, 255.0})
        Returns:
        A 2D binary array representing the edges and the background.
      • convertFloatToDouble

        public double[][] convertFloatToDouble​(float[][] input)
        Converts a 2D array of floats to doubles
        Parameters:
        input -
        Returns: