firevision::FilterSobel Class Reference

Sobel filter. More...

#include <filters/sobel.h>

Inheritance diagram for firevision::FilterSobel:

[legend]
List of all members.

Public Member Functions

 FilterSobel (orientation_t ori=ORI_HORIZONTAL)
 Constructor.
virtual void generate_kernel (int *kernel, orientation_t ori)
 Generate a sobel kernel for the given orientation.
virtual void apply ()
 Apply the filter.

Detailed Description

Sobel filter.

Author:
Tim Niemueller

Definition at line 38 of file sobel.h.


Constructor & Destructor Documentation

firevision::FilterSobel::FilterSobel ( orientation_t  ori = ORI_HORIZONTAL  ) 

Constructor.

Parameters:
ori edge orientation

Definition at line 44 of file sobel.cpp.


Member Function Documentation

void firevision::FilterSobel::apply (  )  [virtual]

Apply the filter.

Apply the filter to the given source and destination buffers with given width and height and orientation (ori may be ignored for some filters).

Implements firevision::Filter.

Definition at line 109 of file sobel.cpp.

References firevision::Filter::dst, firevision::Filter::dst_roi, generate_kernel(), firevision::ROI::height, firevision::ROI::line_step, firevision::Filter::ori, firevision::ORI_DEG_0, firevision::ORI_DEG_135, firevision::ORI_DEG_180, firevision::ORI_DEG_225, firevision::ORI_DEG_270, firevision::ORI_DEG_315, firevision::ORI_DEG_360, firevision::ORI_DEG_45, firevision::ORI_DEG_90, firevision::ORI_HORIZONTAL, firevision::ORI_VERTICAL, firevision::ROI::pixel_step, firevision::Filter::shrink_region(), firevision::Filter::src, firevision::Filter::src_roi, firevision::ROI::start, firevision::ROI::width, fawkes::point_t::x, and fawkes::point_t::y.

void firevision::FilterSobel::generate_kernel ( int *  k,
orientation_t  ori 
) [virtual]

Generate a sobel kernel for the given orientation.

Parameters:
k matrix for the kernel of size 3x3, contains three lines concatenated into an one dimensional array.
ori requested orientation of the filter

Definition at line 56 of file sobel.cpp.

References firevision::ORI_DEG_0, firevision::ORI_DEG_135, firevision::ORI_DEG_180, firevision::ORI_DEG_225, firevision::ORI_DEG_270, firevision::ORI_DEG_315, firevision::ORI_DEG_360, firevision::ORI_DEG_45, and firevision::ORI_DEG_90.

Referenced by apply().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:32:59 2011 for Fawkes API by  doxygen 1.4.7