1. Home
  2. Docs
  3. Computer Vision
  4. Image Processing Function...
  5. Prewitt Edge Detection Algorithm

Prewitt Edge Detection Algorithm

  • The Prewitt edge detection operator is used in image processing to detect edges by calculating the gradient of image intensity at each pixel.
  • It works by convolving the image with Prewitt filters (kernels) that approximate the gradient in the horizontal and vertical directions.
  • The operator uses two 3*3 kernels which are convolved with the original image to calculate approximations of the derivatives – one for horizontal changes and one for vertical

Gx is given as: (Horizontal Kernel)

-101
-101
-101

Gy is given as: (Vertical Kernel)

-1-1-1
000
111
Gradient represents change in color or intensity

Problem

Detect the edges for the image shown as:

    • Apply prewitt operators at the position (0,0) (0,4)(4,2)
    • Apply prewitt operators for all the non border cells
      • Detect vertical edges
      • Detect horizontal edges
      • Compute gradient magnitude
      • Compute gradient angle
    12452
    52562
    54271
    11356
    24647

    Loading

    Views: 3

    How can we help?

    0 0 votes
    Article Rating
    Subscribe
    Notify of
    guest

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments