Sobel

Description

Performs a Sobel edge detection. The result is returned as complex image, where the edge direction is encoded in the phase information.

Full scope is iplt::alg::Sobel in C++, resp iplt.alg.Sobel in Python.

Examples

C++

#include <iplt/image.hh>
#include <iplt/alg/sobel.hh>

using namespace iplt;

int main() 
{
  ImageHandle img = LoadImage("lena.tif");
  img.ApplyIP( alg::Sobel() );

  return 0;
}

Python

from iplt import *
img = LoadImage("lena.tif")
img.ApplyIP( alg.Sobel() )

Example images

original image after edge detection after edge detecton (phase color mode)

Back to Algorithm List

Attachments