Class CannyEdgeDetectorOpenImaj
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.CannyEdgeDetectorOpenImaj
-
- All Implemented Interfaces:
IEdgeDetector
public class CannyEdgeDetectorOpenImaj extends Object implements IEdgeDetector
This class is only a wrapper for the external classorg.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 Summary
Constructors Constructor Description CannyEdgeDetectorOpenImaj(float lt, float ht, float s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
convertFloatToDouble(float[][] input)
Converts a 2D array of floats to doublesdouble[][]
getEdges(double[][] sourceImg, double[] colors)
This method extracts the edges of the given image by following the following three steps: 1) Compute gradient, 2) Perform Hysteresis, 3) Thresholding.
-
-
-
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 interfaceIEdgeDetector
- 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:
-
-