osl_edge_detector Struct Reference

#include <osl_edge_detector.h>

Inheritance diagram for osl_edge_detector:

osl_edge_detector_params List of all members.

Detailed Description

Definition at line 65 of file osl_edge_detector.h.


Public Member Functions

 osl_edge_detector (osl_edge_detector_params const &)
 ~osl_edge_detector ()
void detect_edges (vil1_image const &image, vcl_list< osl_edge * > *edges, bool maintain_topology=true)

Public Attributes

float sigma_
float low_
float gauss_tail_
bool fill_gaps_
bool verbose_

Private Member Functions

void Sub_pixel_interpolation ()
 A procedure that performs sub-pixel interpolation for all edges greater than the threshold by parabolic fitting.
void Thicken_threshold (int, int)
 Thickens the threshold image around each good pixel to take account for the smoothing kernel (almost a dilation with a square structuring element).
void Set_thresholds ()
 Takes the thresh_ image that contains threshold values near to where non-maximal suppression succeeded, and zero elsewhere, and extend the values to all areas of the image.
void Fill_holes ()
 Finds all pixels that are surrounded by four edgels, but which are themselves not edgels.
void Thin_edges ()
 Method to thin the image using the variation of Tsai-Fu thinning used by Van-Duc Nguyen in Geo-Calc.
void Follow_curves (vcl_list< osl_edge * > *)
 Follow all edgel chains that have pixel values above their corresponding threshold values (thin_[x][y] > thresh_[x][y]).
void Follow (int, int, vcl_list< int > *, vcl_list< int > *, vcl_list< float > *, int)
 Following routine looking for connectiveness of edgel chains, and accounts for single pixel gaps in the chains.
void Find_junctions ()
 Searches for the junctions in the image.
void Find_junction_clusters ()
 Locate junction clusters using the following method of hysteresis.
void Follow_junctions (int, int, vcl_list< int > *, vcl_list< int > *)
 Following routine looking for searching out junction clusters.
void Cluster_centre (vcl_list< int > &, vcl_list< int > &, int &, int &)
 Finds which member of the lists lies closest to the centre of the list.

Private Attributes

unsigned int width_
unsigned int k_size_
float * kernel_
unsigned int xstart_
unsigned int ystart_
unsigned int xsize_
unsigned int ysize_
float ** dx_
float ** dy_
float ** grad_
float ** smooth_
float ** thin_
float ** theta_
float ** thresh_
int ** dist_
int ** junction_
int ** jx_
int ** jy_
vcl_list< int > * xjunc_
vcl_list< int > * yjunc_
vcl_list< osl_Vertex * > * vlist_
float jval_
int chain_no_
int vertidcount_
bool gradient_histogram_
float max_gradient_
int histogram_resolution_

Constructor & Destructor Documentation

osl_edge_detector::osl_edge_detector ( osl_edge_detector_params const &   ) 

Definition at line 33 of file osl_edge_detector.cxx.

osl_edge_detector::~osl_edge_detector (  ) 

Definition at line 55 of file osl_edge_detector.cxx.


Member Function Documentation

void osl_edge_detector::detect_edges ( vil1_image const &  image,
vcl_list< osl_edge * > *  edges,
bool  maintain_topology = true 
)

Definition at line 79 of file osl_edge_detector.cxx.

void osl_edge_detector::Sub_pixel_interpolation (  )  [private]

A procedure that performs sub-pixel interpolation for all edges greater than the threshold by parabolic fitting.

Writes edges into the thresh_ image if they are maxima and above low_. This gives a good indication of the local edge strengths. Stores sub-pixel positions in dx_ and dy_, and set the orientations in theta_.

Definition at line 183 of file osl_edge_detector.cxx.

void osl_edge_detector::Thicken_threshold ( int  ,
int   
) [private]

Thickens the threshold image around each good pixel to take account for the smoothing kernel (almost a dilation with a square structuring element).

Definition at line 344 of file osl_edge_detector.cxx.

void osl_edge_detector::Set_thresholds (  )  [private]

Takes the thresh_ image that contains threshold values near to where non-maximal suppression succeeded, and zero elsewhere, and extend the values to all areas of the image.

This is done using chamfer masks so that the final threshold assigned at any one point (ie. a point that was initially zero) is functionally dependent on the the strengths of the nearest good edges. At present we linearly interpolate between the two (approximately) closest edges.

Try to do the same process using Delauney triangulation (CAR, March 1995), in an attempt to image the efficiency from a memory management point of view. However, the triangulation becomes so complex that the computation time becomes incredibly long. Therefore putting up with the Chamfer method for the moment.

The histogram calculation was added to support edgel change detection-JLM May 1995

Definition at line 380 of file osl_edge_detector.cxx.

void osl_edge_detector::Fill_holes (  )  [private]

Finds all pixels that are surrounded by four edgels, but which are themselves not edgels.

These `holes' cause the construction of complex topological descriptions. To simplify matters, we raise the thin_ value of the central pixel and so force it to be an edgel.

Definition at line 586 of file osl_edge_detector.cxx.

void osl_edge_detector::Thin_edges (  )  [private]

Method to thin the image using the variation of Tsai-Fu thinning used by Van-Duc Nguyen in Geo-Calc.

This relies on computing the genus of an edge location, and removing it if it is not a dangling chain as has genus zero. We also order the edges by strength and try to remove the weaker ones first. This accounts for non-maximal suppression, and does it in a topology preserving way. Note that we are creating a vcl_list with a large number of elements, and then sorting it - this is likely to be quite slow. An alternative implementation would be better.

Definition at line 502 of file osl_edge_detector.cxx.

void osl_edge_detector::Follow_curves ( vcl_list< osl_edge * > *   )  [private]

Follow all edgel chains that have pixel values above their corresponding threshold values (thin_[x][y] > thresh_[x][y]).

Definition at line 615 of file osl_edge_detector.cxx.

void osl_edge_detector::Follow ( int  ,
int  ,
vcl_list< int > *  ,
vcl_list< int > *  ,
vcl_list< float > *  ,
int   
) [private]

Following routine looking for connectiveness of edgel chains, and accounts for single pixel gaps in the chains.

Definition at line 768 of file osl_edge_detector.cxx.

void osl_edge_detector::Find_junctions (  )  [private]

Searches for the junctions in the image.

Definition at line 840 of file osl_edge_detector.cxx.

void osl_edge_detector::Find_junction_clusters (  )  [private]

Locate junction clusters using the following method of hysteresis.

Definition at line 876 of file osl_edge_detector.cxx.

void osl_edge_detector::Follow_junctions ( int  ,
int  ,
vcl_list< int > *  ,
vcl_list< int > *   
) [private]

Following routine looking for searching out junction clusters.

Definition at line 940 of file osl_edge_detector.cxx.

void osl_edge_detector::Cluster_centre ( vcl_list< int > &  ,
vcl_list< int > &  ,
int &  ,
int &   
) [private]

Finds which member of the lists lies closest to the centre of the list.

Definition at line 971 of file osl_edge_detector.cxx.


Member Data Documentation

unsigned int osl_edge_detector::width_ [private]

Definition at line 90 of file osl_edge_detector.h.

unsigned int osl_edge_detector::k_size_ [private]

Definition at line 91 of file osl_edge_detector.h.

float* osl_edge_detector::kernel_ [private]

Definition at line 92 of file osl_edge_detector.h.

unsigned int osl_edge_detector::xstart_ [private]

Definition at line 94 of file osl_edge_detector.h.

unsigned int osl_edge_detector::ystart_ [private]

Definition at line 94 of file osl_edge_detector.h.

unsigned int osl_edge_detector::xsize_ [private]

Definition at line 95 of file osl_edge_detector.h.

unsigned int osl_edge_detector::ysize_ [private]

Definition at line 95 of file osl_edge_detector.h.

float** osl_edge_detector::dx_ [private]

Definition at line 97 of file osl_edge_detector.h.

float** osl_edge_detector::dy_ [private]

Definition at line 98 of file osl_edge_detector.h.

float** osl_edge_detector::grad_ [private]

Definition at line 99 of file osl_edge_detector.h.

float** osl_edge_detector::smooth_ [private]

Definition at line 100 of file osl_edge_detector.h.

float** osl_edge_detector::thin_ [private]

Definition at line 103 of file osl_edge_detector.h.

float** osl_edge_detector::theta_ [private]

Definition at line 104 of file osl_edge_detector.h.

float** osl_edge_detector::thresh_ [private]

Definition at line 105 of file osl_edge_detector.h.

int** osl_edge_detector::dist_ [private]

Definition at line 107 of file osl_edge_detector.h.

int** osl_edge_detector::junction_ [private]

Definition at line 108 of file osl_edge_detector.h.

int** osl_edge_detector::jx_ [private]

Definition at line 109 of file osl_edge_detector.h.

int ** osl_edge_detector::jy_ [private]

Definition at line 109 of file osl_edge_detector.h.

vcl_list<int>* osl_edge_detector::xjunc_ [private]

Definition at line 110 of file osl_edge_detector.h.

vcl_list<int> * osl_edge_detector::yjunc_ [private]

Definition at line 110 of file osl_edge_detector.h.

vcl_list<osl_Vertex*>* osl_edge_detector::vlist_ [private]

Definition at line 111 of file osl_edge_detector.h.

float osl_edge_detector::jval_ [private]

Definition at line 113 of file osl_edge_detector.h.

int osl_edge_detector::chain_no_ [private]

Definition at line 114 of file osl_edge_detector.h.

int osl_edge_detector::vertidcount_ [private]

Definition at line 116 of file osl_edge_detector.h.

bool osl_edge_detector::gradient_histogram_ [private]

Definition at line 119 of file osl_edge_detector.h.

float osl_edge_detector::max_gradient_ [private]

Definition at line 120 of file osl_edge_detector.h.

int osl_edge_detector::histogram_resolution_ [private]

Definition at line 121 of file osl_edge_detector.h.

float osl_edge_detector_params::sigma_ [inherited]

Definition at line 20 of file osl_edge_detector_params.h.

float osl_edge_detector_params::low_ [inherited]

Definition at line 21 of file osl_edge_detector_params.h.

float osl_edge_detector_params::gauss_tail_ [inherited]

Definition at line 22 of file osl_edge_detector_params.h.

bool osl_edge_detector_params::fill_gaps_ [inherited]

Definition at line 23 of file osl_edge_detector_params.h.

bool osl_edge_detector_params::verbose_ [inherited]

Definition at line 26 of file osl_edge_detector_params.h.


The documentation for this struct was generated from the following files:
Generated on Tue Dec 2 05:14:16 2008 for contrib/oxl/osl by  doxygen 1.5.1