First Order Derivative Filters Overview

Sep 11, 2024

Lecture 17: First Order Derivative Filters

Introduction

  • Lecture presented by Anushri
  • Topic: First order derivative filters mainly used for edge detection

Edge Detection

  • Example of an image with a center pixel to detect edges towards the diagonal.
  • Robert's Operator:
    • First edge detector
    • Uses a 2x2 mask, also known as the cross gradient operator.
    • Operates on the concept of cross diagonal differences.
    • Focuses only on diagonal elements, ignoring neighboring pixels.

Limitations of Robert's Operator

  1. Implementation Complexity

    • 2x2 masks are not easy to implement.
    • Even order masks complicate convolution.
  2. High Calculation Demand

    • Smaller mask requires more calculations, increasing chances for errors and time consumption.
  3. Limited Pixel Consideration

    • Only considers diagonal neighboring pixels, ignoring horizontal and vertical pixels.

Improvements and New Operators

  • To address the limitations, modifications were made:
    1. Increase the size of the mask.
    2. Change the number of neighboring pixels considered.

New Operators Developed

  1. Sobel Operator

    • Emphasis on pixels closer to the center of the mask.
    • Example mask:
      [-1 -2 -1]
      [ 0  0  0]
      [ 1  2  1]
      
  2. Prewitt Operator

    • Similar to Sobel, but used specifically for detecting vertical and horizontal edges.
    • Example mask:
      [-1 -1 -1]
      [ 0  0  0]
      [ 1  1  1]
      

Example Calculation

  • Apply Robert's, Sobel, and Prewitt operators on pixel (1,1) in a given image.

Robert's Operator Calculation

  • Mask multiplication:
    • Result: 50

Sobel Operator Calculation

  • Mask multiplication:
    • Result: 0

Prewitt Operator Calculation

  • Mask multiplication:
    • Result: 0

Conclusion

  • Final values obtained from applying the operators:
    • Robert's: 50
    • Sobel: 0
    • Prewitt: 0
  • Closing statement and preview for the next lecture.