Table Of Contents

Previous topic

Image algorithms

Next topic

Close

Canny

Description

Performs a Canny edge detection. Two parameters for upper and lower threshold have to be given to the constructor (normalized between 0 and 1).

Examples

C++

#include <ost/io/load_map.hh>
#include <iplt/alg/canny.hh>


int main()
{
  ImageHandle img = ost::io::LoadImage("lena.tif");
  img.ApplyIP( iplt::alg::Canny(0.4,0.1) );

  return 0;
}

Python

from ost.io import *
from iplt import *
img = LoadImage("lena.tif")
img.ApplyIP( alg.Canny(0.4,0.1) )

Example image

../_images/canny.png

Figure 1: left: original image, right image after edge detection

Python interface

class iplt.alg.Canny((object)arg1, (float)arg2, (float)arg3)
__init__((object)arg1, (float)arg2, (float)arg3) → None :
C++ signature :
void __init__(_object*,float,float)

C++ interface