Class PrewittEdgeDetector
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.GaussianEdgeDetector
-
- edu.gsu.cs.dmlab.imageproc.edgedetection.detectors.PrewittEdgeDetector
-
public class PrewittEdgeDetector extends GaussianEdgeDetector
This class detects the edges of grayscale images using Prewitt 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 PrewittEdgeDetector(double[][] image)
All work is done in constructor.PrewittEdgeDetector(double[][] image, boolean L1norm)
All work is done in constructor.PrewittEdgeDetector(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
-
PrewittEdgeDetector
public PrewittEdgeDetector(String filePath)
All work is done in constructor.- Parameters:
filePath
- path to image
-
PrewittEdgeDetector
public PrewittEdgeDetector(double[][] image)
All work is done in constructor.Uses L2 norm by default.
- Parameters:
image
- the image to process
-
PrewittEdgeDetector
public PrewittEdgeDetector(double[][] image, boolean L1norm)
All work is done in constructor.Gives option to use L1 or L2 norm.
- Parameters:
image
- image to processL1norm
- indicates whether to use L1 norm, L2 will be used if false
-
-
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
-
-