Class SobelEdgeDetector
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.GaussianEdgeDetector
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.SobelEdgeDetector
-
public class SobelEdgeDetector extends GaussianEdgeDetector
This class detects the edges of grayscale images using Sobel convolution kernel.
Note: The final matrix of edges is slightly smaller than the original image. The difference depends on the size of the kernel matrix.- Author:
- Jason Altschuler, modified by Azim Ahmadzadeh and Dustin Kempton of Data Mining Lab, Georgia State University
- See Also:
ImageConvolution
-
-
Field Summary
-
Fields inherited from class edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.GaussianEdgeDetector
edges, L1norm, threshold
-
-
Constructor Summary
Constructors Constructor Description SobelEdgeDetector(double[][] image)
All work is done in constructor.SobelEdgeDetector(double[][] image, boolean L1norm)
All work is done in constructor.SobelEdgeDetector(String filePath)
All work is done in constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
getXkernel()
Abstract methods to implementdouble[][]
getYkernel()
-
Methods inherited from class edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.GaussianEdgeDetector
findEdges, getEdges, getL1norm, getThreshold
-
-
-
-
Constructor Detail
-
SobelEdgeDetector
public SobelEdgeDetector(String filePath)
All work is done in constructor.- Parameters:
filePath
- path to image
-
SobelEdgeDetector
public SobelEdgeDetector(double[][] image)
All work is done in constructor.Uses L2 norm by default.
- Parameters:
image
-
-
SobelEdgeDetector
public SobelEdgeDetector(double[][] image, boolean L1norm)
All work is done in constructor.Gives option to use L1 or L2 norm.
-
-
Method Detail
-
getXkernel
public double[][] getXkernel()
Description copied from class:GaussianEdgeDetector
Abstract methods to implement- Specified by:
getXkernel
in classGaussianEdgeDetector
-
getYkernel
public double[][] getYkernel()
- Specified by:
getYkernel
in classGaussianEdgeDetector
-
-