Class 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
    • 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 process
        L1norm - indicates whether to use L1 norm, L2 will be used if false