Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
osl_edge_detector Struct Reference

#include <osl_edge_detector.h>

Inheritance diagram for osl_edge_detector:
Inheritance graph
[legend]

List of all members.

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_

Detailed Description

Definition at line 63 of file osl_edge_detector.h.


Constructor & Destructor Documentation

osl_edge_detector::osl_edge_detector ( osl_edge_detector_params const &  params)

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::Cluster_centre ( vcl_list< int > &  xc,
vcl_list< int > &  yc,
int &  x0,
int &  y0 
) [private]

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

Definition at line 977 of file osl_edge_detector.cxx.

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

Definition at line 80 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 590 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 882 of file osl_edge_detector.cxx.

void osl_edge_detector::Find_junctions ( ) [private]

Searches for the junctions in the image.

Definition at line 845 of file osl_edge_detector.cxx.

void osl_edge_detector::Follow ( int  x,
int  y,
vcl_list< int > *  xc,
vcl_list< int > *  yc,
vcl_list< float > *  grad,
int  reverse 
) [private]

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

Definition at line 773 of file osl_edge_detector.cxx.

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

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

Definition at line 620 of file osl_edge_detector.cxx.

void osl_edge_detector::Follow_junctions ( int  x,
int  y,
vcl_list< int > *  xc,
vcl_list< int > *  yc 
) [private]

Following routine looking for searching out junction clusters.

Definition at line 946 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 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 383 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 184 of file osl_edge_detector.cxx.

void osl_edge_detector::Thicken_threshold ( int  x,
int  y 
) [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 346 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 506 of file osl_edge_detector.cxx.


Member Data Documentation

Definition at line 112 of file osl_edge_detector.h.

int** osl_edge_detector::dist_ [private]

Definition at line 105 of file osl_edge_detector.h.

float** osl_edge_detector::dx_ [private]

Definition at line 95 of file osl_edge_detector.h.

float** osl_edge_detector::dy_ [private]

Definition at line 96 of file osl_edge_detector.h.

Definition at line 23 of file osl_edge_detector_params.h.

Definition at line 22 of file osl_edge_detector_params.h.

float** osl_edge_detector::grad_ [private]

Definition at line 97 of file osl_edge_detector.h.

Definition at line 117 of file osl_edge_detector.h.

Definition at line 119 of file osl_edge_detector.h.

Definition at line 106 of file osl_edge_detector.h.

float osl_edge_detector::jval_ [private]

Definition at line 111 of file osl_edge_detector.h.

int** osl_edge_detector::jx_ [private]

Definition at line 107 of file osl_edge_detector.h.

int ** osl_edge_detector::jy_ [private]

Definition at line 107 of file osl_edge_detector.h.

unsigned int osl_edge_detector::k_size_ [private]

Definition at line 89 of file osl_edge_detector.h.

float* osl_edge_detector::kernel_ [private]

Definition at line 90 of file osl_edge_detector.h.

float osl_edge_detector_params::low_ [inherited]

Definition at line 21 of file osl_edge_detector_params.h.

Definition at line 118 of file osl_edge_detector.h.

Definition at line 20 of file osl_edge_detector_params.h.

float** osl_edge_detector::smooth_ [private]

Definition at line 98 of file osl_edge_detector.h.

float** osl_edge_detector::theta_ [private]

Definition at line 102 of file osl_edge_detector.h.

float** osl_edge_detector::thin_ [private]

Definition at line 101 of file osl_edge_detector.h.

float** osl_edge_detector::thresh_ [private]

Definition at line 103 of file osl_edge_detector.h.

Definition at line 26 of file osl_edge_detector_params.h.

Definition at line 114 of file osl_edge_detector.h.

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

Definition at line 109 of file osl_edge_detector.h.

unsigned int osl_edge_detector::width_ [private]

Definition at line 88 of file osl_edge_detector.h.

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

Definition at line 108 of file osl_edge_detector.h.

unsigned int osl_edge_detector::xsize_ [private]

Definition at line 93 of file osl_edge_detector.h.

unsigned int osl_edge_detector::xstart_ [private]

Definition at line 92 of file osl_edge_detector.h.

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

Definition at line 108 of file osl_edge_detector.h.

unsigned int osl_edge_detector::ysize_ [private]

Definition at line 93 of file osl_edge_detector.h.

unsigned int osl_edge_detector::ystart_ [private]

Definition at line 92 of file osl_edge_detector.h.


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