Canny edge detectiom is popular edge detection algorithm. This project is implementation that algorithm in 3 ways to compare the performance of each implementation. The 3 ways are:
- Sequential
- Parallel using OpenMP
- Parallel using OpenCL
- Orginal image
- Convert the image to grayscale
- Apply Gaussian filter to smooth the image in order to remove the noise
- Sobel filter
Sobel x
Sobel y
Sobel intensity
Sobel direction
- Non-maximum suppression
- Hysteresis thresholding
- CPU: AMD Ryzen 5 2500U
- GPU: Radeon Vega 8 Gfx
Images used for creating algorithm (from images folder):
Image Size | Sequential | OpenMP | OpenCL |
---|---|---|---|
512x512 | 0.14s | 0.07s | 0.05s |
512x512 | 0.13s | 0.06s | 0.04s |
800x600 | 0.19s | 0.11s | 0.06s |
1920x1080 | 0.90s | 0.46s | 0.29s |
4032x2264 | 4.18s | 1.99s | 1.40s |
Performence testing on diffrent size the same image, only canny time (without image loading and saving):
Image Size | Sequential | OpenMP | OpenCL | OpenCV |
---|---|---|---|---|
240x240 | 0.02s | 0.00s | 0.00s | 0.46s |
320x320 | 0.04s | 0.01s | 0.00s | 0.47s |
400x400 | 0.06s | 0.02s | 0.00s | 0.46s |
640x640 | 0.17s | 0.05s | 0.01s | 0.46s |
800x800 | 0.27s | 0.08s | 0.02s | 0.46s |
1024x1024 | 0.58s | 0.11s | 0.02s | 0.47s |
1600x1600 | 1.09s | 0.25s | 0.04s | 0.47s |
2048x2048 | 3.49s | 0.52s | 0.05s | 0.50s |
3072x3072 | 7.41s | 1.13s | 0.11s | 0.54s |
4096x4096 | 13.50s | 2.79s | 0.24s | 0.60s |
5120x5120 | 35.28s | 4.06s | 0.35s | 0.60s |
6144x6144 | 47.03s | 12.55s | 0.51s | 0.74s |