# Canny Edge Detector

This code snippet shows how to highlight edges by means of the Canny edge detector algorithm.

## C++

```cpp
#include <eVision/EasyImage/ECannyEdgeDetector.h>
```

```cpp
using namespace eVision;
// Images constructor
EImageBW8 srcImage;
EImageBW8 dstImage;
// ...
// Canny edge detector
ECannyEdgeDetector canny;
// Source and destination images must have the same size
dstImage.SetSize(&srcImage);
// Perform the edges detection
canny.Apply(srcImage, dstImage);
```

#### SEE ALSO
[`ECannyEdgeDetector::Apply`](../../../../../doxygen_cpp/classeVision_1_1ECannyEdgeDetector.html#a7ea4559d8fe21fec3c7b9742d0d22835) [<sub>.NET</sub>](../../../../../doxygen_cs/classeVision_1_1ECannyEdgeDetector.html#a26d881378dcd2c60483779230c7b5a88) [<sub>Python</sub>](../../../../../doxygen_python/classeVision_1_1ECannyEdgeDetector.html#a7e2427903cc64582b1f290e732877a3e)

## C#

```cs
using eVision;
```

```cs
// Images constructor
EImageBW8 srcImage = new EImageBW8();
EImageBW8 dstImage = new EImageBW8();
// ...
// Canny edge detector
ECannyEdgeDetector canny = new ECannyEdgeDetector();
// Source and destination images must have the same size
dstImage.SetSize(srcImage);
// Perform the edges detection
canny.Apply(srcImage, dstImage);
```

#### SEE ALSO
[`ECannyEdgeDetector.Apply`](../../../../../doxygen_cs/classeVision_1_1ECannyEdgeDetector.html#a26d881378dcd2c60483779230c7b5a88) [<sub>C++</sub>](../../../../../doxygen_cpp/classeVision_1_1ECannyEdgeDetector.html#a7ea4559d8fe21fec3c7b9742d0d22835) [<sub>Python</sub>](../../../../../doxygen_python/classeVision_1_1ECannyEdgeDetector.html#a7e2427903cc64582b1f290e732877a3e)

## Python

```py
import eVision
# Images constructor
src_image = eVision.EImageBW8()
dst_image = eVision.EImageBW8()
# ...
# Canny edge detector
canny = eVision.ECannyEdgeDetector()
# Source and destination images must have the same size
dst_image.SetSize(src_image)
# Perform the edges detection
canny.Apply(src_image, dst_image)
```

#### SEE ALSO
[`ECannyEdgeDetector.Apply`](../../../../../doxygen_python/classeVision_1_1ECannyEdgeDetector.html#a7e2427903cc64582b1f290e732877a3e) [<sub>C++</sub>](../../../../../doxygen_cpp/classeVision_1_1ECannyEdgeDetector.html#a7ea4559d8fe21fec3c7b9742d0d22835) [<sub>.NET</sub>](../../../../../doxygen_cs/classeVision_1_1ECannyEdgeDetector.html#a26d881378dcd2c60483779230c7b5a88)
