|
Binary Image Library
|
#include <stdlib.h>#include <string.h>#include <math.h>Data Structures | |
| struct | CANNY |
Functions | |
| unsigned char * | canny (unsigned char *grey, int width, int height) |
| unsigned char * | cannyparam (unsigned char *grey, int width, int height, float lowThreshold, float highthreshold, float gaussiankernelradius, int gaussiankernelwidth, int contrastnormalised) |
The code detects edges in greyscale images. The method was developed by John F Canny and is generally considered to be the best edge detection method currently available.
C version. Based on Java code by Tom Gibara
| unsigned char * canny | ( | unsigned char * | grey, |
| int | width, | ||
| int | height | ||
| ) |
Canny edge detection with default parameters
| grey | - the greyscale image |
| width | - image width |
| height | - image height |
| unsigned char * cannyparam | ( | unsigned char * | grey, |
| int | width, | ||
| int | height, | ||
| float | lowthreshold, | ||
| float | highthreshold, | ||
| float | gaussiankernelradius, | ||
| int | gaussiankernelwidth, | ||
| int | contrastnormalised | ||
| ) |
Canny edge detection with parameters passed in by user.
| grey | - the greyscale image |
| width | - image width |
| height | - image height |
| lowthreshold | - default 2.5 |
| highthreshold | - default 7.5 |
| gaussiankernelradius | - radius of edge detection Gaussian, in standard deviations (default 2.0) |
| gaussiankernelwidth | - width of Gaussian kernel, in pixels (default 16) |
| contrastnormalised | - flag to normalise image before edge detection (defualt 0) |
1.8.11