Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

canny_Filter Class Reference
[Image Processing FiltersSingle FrameEdge Detection]

#include <canny_Filter.h>

Inheritance diagram for canny_Filter:

phFilter phMutex phObject List of all members.

Detailed Description

Canny Edge Detection.

This filter uses the canny method to detect the edges of an image.

The process includes the following steps:

  1. 5x5 Gaussian mask for noise removal
  2. Use Sobel masks to approximate gradient
  3. Find orientation of gradient
  4. Implement non-maximum suppression to assign edges
  5. Hysteresis thresholding (2 thresholds: low and high)

An edge from this filter is a 0 value and a non-edge is 255.

The Gaussian mask can be turned on or off using canny_Filter::enableGaussian() or canny_Filter::disableGaussian().

The Sobel approximation can also be turned off, but this turns of the canny computation as well. Toggling the Sobel/Canny code is done with canny_Filter::enableSobelApprox() and canny_Filter::disableSobelApprox().

Supports the following formats:

The canny_Filter is a custom filter for Phission that outputs thicker lines than the OpenCV canny filter does.

Gaussian Ref: http://www.cee.hw.ac.uk/hipr/html/gsmooth.html

Sobel Ref: www.cee.hw.ac.uk/hipr/html/sobel.html

Todo:
add timing back into the filter

Make timing part of the phFilter class ???

verify all the algorithms in the canny_Filter

Output thin lines? or ar ethe thick ones good ?

When > 8bit channels are supported, make sure that the edge/non-edge values are appropriate minimum/maximum values

add example application code that shows how the processed images were output

Todo:
add example image inputs and processed image outputs
canny_Filter_before.jpg
canny_Filter_after.jpg

Definition at line 93 of file canny_Filter.h.

Public Member Functions

 canny_Filter (uint32_t lowThreshold=40, uint32_t highThreshold=120)
 ~canny_Filter ()
int set (uint32_t lowThreshold=40, uint32_t highThreshold=120)
void enableGaussian (int enable=1)
void disableGaussian (int disable=1)
void enableSobelApprox (int enable=1)
void disableSobelApprox (int disable=1)
phFiltercloneFilter ()

Protected Member Functions

int filter ()

Private Attributes

uint32_t m_lowThreshold
uint32_t m_highThreshold
uint8_tm_gauss
uint8_tm_edge
uint32_t m_gaussSize
uint32_t m_edgeSize
int m_useGaussian
int m_useSobelApprox


The documentation for this class was generated from the following files:



Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:31 2007 for phission by  doxygen 1.4.4