Class ScharrFilter

  • All Implemented Interfaces:
    Filter, Serializable

    public class ScharrFilter
    extends Object
    implements Filter
    Edge detection filter similar to the sobel operator.
     
                     3     0   -3
     Gx :   10     0   -10
             3     0   -3
                    
                     3    10   3
     Gy:     0     0   0
                    -3   -10  -3
    
     G : sqrt(Gx^2+ Gy^2)
    
     
    Since:
    2.0.0
    Author:
    Kilian
    See Also:
    Sobel Operator, Serialized Form
    • Constructor Detail

      • ScharrFilter

        public ScharrFilter​(double threshold)
        Create a scharr filter
        Parameters:
        threshold - the cutoff beneath which gray values will be set to 0. [0 - 1].
    • Method Detail

      • filter

        public BufferedImage filter​(BufferedImage bi)
        Description copied from interface: Filter
        Apply the filter to the input image and return an altered copy
        Specified by:
        filter in interface Filter
        Parameters:
        bi - the input image to apply the filter on
        Returns:
        the altered image