Class AlgorithmSobel

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmSobel
    extends AlgorithmBase
    • Field Detail

      • kernelSize

        private int kernelSize
        5 x 5 Sobel template found in Feature Extraction & Image Processing for Computer Vision Third Edition by Mark S. Nixon and Alberto S. Aguado Section 4.2.1.4. Sobel edge-detection operator pp. 146-153. Formulas for deriving 7 x 7 Sobel template also found there. smoothx_win = (winsize - 1)!/((winsize - 1 - x_win)! * x_win!) Pascal(k, n) = n!/((n-k)! * k!) if ((k >= 0) && (k <= n)) 0 otherwise diffx_win = Pascal(x_win, winsize-2) - Pascal(x_win - 1, winsize-2) Sobel x template = sum from xwin = 0 to winsize-1 sum from ywin = 0 to winsize-1 of smoothy_win * diffx_win Sobel y template = sum from xwin = 0 to winsize-1 sum from ywin = 0 to winsize-1 of smoothx_win * diffy_win
    • Constructor Detail

      • AlgorithmSobel

        public AlgorithmSobel​(ModelImage destImg,
                              ModelImage srcImg,
                              boolean image25D,
                              int kernelSize)
    • Method Detail

      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • run2D

        public void run2D()
      • run3D

        public void run3D()