Main Page   Modules   Compound List   File List   Compound Members   File Members  

canny_edge.h File Reference

#include <gandalf/common/misc_defs.h>
#include <gandalf/vision/mask1D.h>
#include <gandalf/vision/camera.h>
#include <gandalf/vision/edge_feature.h>
#include <gandalf/image/image_defs.h>
#include <gandalf/linalg/2x3matrix.h>

Go to the source code of this file.

Functions

Gan_EdgeFeatureMapgan_canny_edge_q (Gan_Image *image, Gan_Image *mask, Gan_Mask1D *filter_y, Gan_Mask1D *filter_x, double lower_thres, double upper_thres, unsigned string_length_thres, Gan_Matrix23_f *A, Gan_Camera *camera, Gan_LocalFeatureMapParams *lpms, Gan_EdgeFeatureMap *edge_map)
 Computes edges in an image using the Canny algorithm.

Gan_EdgeFeatureMapgan_canny_edge_s (Gan_Image *image, Gan_Image *mask, Gan_Mask1D *filter_y, Gan_Mask1D *filter_x, double lower_thres, double upper_thres, unsigned string_length_thres, Gan_Matrix23_f *A, Gan_Camera *camera, Gan_LocalFeatureMapParams *lpms)
 Macro: Computes edges in an image using the Canny algorithm.


Detailed Description

Module: Canny edge detection algorithm

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited

Modified from original TINA implementation


Function Documentation

Gan_EdgeFeatureMap* gan_canny_edge_q Gan_Image   image,
Gan_Image   mask,
Gan_Mask1D   filter_y,
Gan_Mask1D   filter_x,
double    lower_thres,
double    upper_thres,
unsigned    string_length_thres,
Gan_Matrix23_f   A,
Gan_Camera   camera,
Gan_LocalFeatureMapParams   lpms,
Gan_EdgeFeatureMap   edge_map
 

Computes edges in an image using the Canny algorithm.

Parameters:
image The input image
mask Binary image indicating region to find edges or NULL
filter_y Image convolution filter in the y-direction or NULL
filter_x Image convolution filter in the x-direction or NULL
lower_thres Lower hysteresis threshold for string building
upper_thres Upper hysteresis threshold for string building
string_length_thres The smallest length of string allowed
A Affine transformation to apply to edgel coordinates or NULL
camera Pointer to the camera calibration or NULL
lpms Pointer to local feature map parameters or NULL
edge_map The edge map to fill with edges
Applies the Canny edge detector to find edges in the input image. The image is smoothed using the provided convolution masks. The image x/y gradients gx/gy and the RMS gradient sqrt(gx^2+gy^2) are computed. Non-maximum suppression is applied to compute the individual edge points (edgels). These are then joined into strings using a hysteresis procedure, wherein two thresholds are applied to keep weak edges so long as they are part of a string with strong edges.

An affine transformation A is applied to the edgel coordinates if the A pointer is not NULL.

If the camera calibration structure pointer is not NULL, distortion correction is applied to the edgel positions. camera should be the correct camera calibration for the image coordinates obtained after applying the affine transformation A.

Returns:
Non-NULL a pointer to the computed edge map structure, or NULL on failure.
See also:
gan_canny_edge_s().


Generated on Mon Oct 13 16:14:40 2003 by doxygen1.3-rc1