bdgl_curve_algs Class Reference

#include <bdgl_curve_algs.h>

List of all members.


Detailed Description

Definition at line 20 of file bdgl_curve_algs.h.


Public Member Functions

 ~bdgl_curve_algs ()
 Destructor.

Static Public Member Functions

static int closest_point (vdgl_edgel_chain_sptr const &ec, const double x, const double y)
 Finds the index on a digital curve closest to the given point.
static double closest_point (vdgl_digital_curve_sptr const &dc, const double x, const double y)
 Finds the index on a digital curve closest to the given point.
static bool closest_point (vdgl_digital_curve_sptr const &dc, const double x, const double y, double &xc, double &yc)
 Finds the x-y coordinates on a digital curve closest to the given point.
static bool closest_point_near (vdgl_edgel_chain_sptr const &ec, const int index, const double x, const double y, double &xc, double &yc)
 Finds location on a digital curve closest to the given point at index.
static int closest_end (vdgl_edgel_chain_sptr const &ec, const double x, const double y)
 Finds the end of the edgel chain closest to the given point.
static vdgl_digital_curve_sptr reverse (vdgl_digital_curve_sptr const &dc)
 Reverses the edgel chain.
static bool intersect_bounding_box (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line)
 Intersect the bounding box of the digital curve with the line as a test.
static bool intersect_line_fast (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line, vcl_vector< double > &indices)
 Intersect the curve with an infinite line, return the index values.
static bool intersect_line_fast (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line, vcl_vector< vgl_point_2d< double > > &pts)
 Intersect the curve with an infinite line, return the points.
static bool intersect_line (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line, vcl_vector< double > &indices)
 Intersect the curve with an infinite line, return the index values.
static bool intersect_line (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line, vcl_vector< vgl_point_2d< double > > &pts)
 Intersect the curve with an infinite line, return the points.
static bool match_intersection (vdgl_digital_curve_sptr const &dc, vgl_line_2d< double > &line, vgl_point_2d< double > const &ref_point, double ref_gradient_angle, vgl_point_2d< double > &point)
 Intersect a curve with a line and match the reference edgel point.
static bool line_gen (float xs, float ys, float xe, float ye, bool &init, bool &done, float &x, float &y)
 Generate points along a digital straight line.
static int add_straight_edgels (vdgl_edgel_chain_sptr const &ec, const double x, const double y, bool debug=false)
 Add edgels to an edgel chain along a digital straight line.
static void smooth_curve (vcl_vector< vgl_point_2d< double > > &curve, double sigma=1.0)
static vdgl_digital_curve_sptr create_digital_curves (vcl_vector< vgl_point_2d< double > > &curve)

Static Public Attributes

static BDGL_DLL_DATA const
double 
tol
static BDGL_DLL_DATA const
double 
max_edgel_sep
static BDGL_DLL_DATA const
double 
synthetic

Private Member Functions

 bdgl_curve_algs ()

Constructor & Destructor Documentation

bdgl_curve_algs::~bdgl_curve_algs (  ) 

Destructor.

Definition at line 32 of file bdgl_curve_algs.cxx.

bdgl_curve_algs::bdgl_curve_algs (  )  [private]


Member Function Documentation

int bdgl_curve_algs::closest_point ( vdgl_edgel_chain_sptr const &  ec,
const double  x,
const double  y 
) [static]

Finds the index on a digital curve closest to the given point.

Later this routine can become a method on vdgl_edgel_chain.

Definition at line 60 of file bdgl_curve_algs.cxx.

double bdgl_curve_algs::closest_point ( vdgl_digital_curve_sptr const &  dc,
const double  x,
const double  y 
) [static]

Finds the index on a digital curve closest to the given point.

Definition at line 40 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::closest_point ( vdgl_digital_curve_sptr const &  dc,
const double  x,
const double  y,
double &  xc,
double &  yc 
) [static]

Finds the x-y coordinates on a digital curve closest to the given point.

Current implementation is not the best since it is discrete with the edgel_chain index. Ultimately it should use the interpolator to refine the location on the digital_curve.

Definition at line 91 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::closest_point_near ( vdgl_edgel_chain_sptr const &  ec,
const int  index,
const double  x,
const double  y,
double &  xc,
double &  yc 
) [static]

Finds location on a digital curve closest to the given point at index.

We assume that the nearest point is on the interval [index, index+1].

Definition at line 137 of file bdgl_curve_algs.cxx.

int bdgl_curve_algs::closest_end ( vdgl_edgel_chain_sptr const &  ec,
const double  x,
const double  y 
) [static]

Finds the end of the edgel chain closest to the given point.

Definition at line 691 of file bdgl_curve_algs.cxx.

vdgl_digital_curve_sptr bdgl_curve_algs::reverse ( vdgl_digital_curve_sptr const &  dc  )  [static]

Reverses the edgel chain.

Definition at line 176 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::intersect_bounding_box ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line 
) [static]

Intersect the bounding box of the digital curve with the line as a test.

Definition at line 191 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::intersect_line_fast ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line,
vcl_vector< double > &  indices 
) [static]

Intersect the curve with an infinite line, return the index values.

This is a recursive implementation for faster computation

Definition at line 448 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::intersect_line_fast ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line,
vcl_vector< vgl_point_2d< double > > &  pts 
) [static]

Intersect the curve with an infinite line, return the points.

This is a recursive implementation for faster computation

Definition at line 273 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::intersect_line ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line,
vcl_vector< double > &  indices 
) [static]

Intersect the curve with an infinite line, return the index values.

If there is no intersection return false. Note that the line can intersect multiple times. The curve parameter indices at the intersection points are returned

Definition at line 500 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::intersect_line ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line,
vcl_vector< vgl_point_2d< double > > &  pts 
) [static]

Intersect the curve with an infinite line, return the points.

If there is no intersection return false. Note that the line can intersect multiple times. All the intersections are returned.

Definition at line 323 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::match_intersection ( vdgl_digital_curve_sptr const &  dc,
vgl_line_2d< double > &  line,
vgl_point_2d< double > const &  ref_point,
double  ref_gradient_angle,
vgl_point_2d< double > &  point 
) [static]

Intersect a curve with a line and match the reference edgel point.

Definition at line 546 of file bdgl_curve_algs.cxx.

bool bdgl_curve_algs::line_gen ( float  xs,
float  ys,
float  xe,
float  ye,
bool &  init,
bool &  done,
float &  x,
float &  y 
) [static]

Generate points along a digital straight line.

Advance along a line and generate contiguous pixels on a straight line defined by (xs, ys) : (xe, ye). The samples are generated as values of (x, y). The routine is called in a loop that generates the points, e.g.,

   while (line_gen(xs, ys, xe, ye, init, done, x, y))
   { ...
The routine needs two internal state variables, init and done. init should be set to true done should be set to false when the routine is first called.

Definition at line 606 of file bdgl_curve_algs.cxx.

int bdgl_curve_algs::add_straight_edgels ( vdgl_edgel_chain_sptr const &  ec,
const double  xe,
const double  ye,
bool  debug = false 
) [static]

Add edgels to an edgel chain along a digital straight line.

The number of edgels added is returned

Definition at line 663 of file bdgl_curve_algs.cxx.

void bdgl_curve_algs::smooth_curve ( vcl_vector< vgl_point_2d< double > > &  curve,
double  sigma = 1.0 
) [static]

Definition at line 717 of file bdgl_curve_algs.cxx.

vdgl_digital_curve_sptr bdgl_curve_algs::create_digital_curves ( vcl_vector< vgl_point_2d< double > > &  curve  )  [static]

Definition at line 748 of file bdgl_curve_algs.cxx.


Member Data Documentation

const double bdgl_curve_algs::tol [static]

Definition at line 23 of file bdgl_curve_algs.h.

const double bdgl_curve_algs::max_edgel_sep [static]

Definition at line 24 of file bdgl_curve_algs.h.

const double bdgl_curve_algs::synthetic [static]

Definition at line 25 of file bdgl_curve_algs.h.


The documentation for this class was generated from the following files:
Generated on Sat Sep 6 05:20:52 2008 for contrib/brl/bbas/bdgl by  doxygen 1.5.1