FindN8Lines.cpp File Reference

implementation of find lines algorithm More...

#include <assert.h>
#include "FindN8Lines.h"
#include <vigra/copyimage.hxx>
#include <vigra/pixelneighborhood.hxx>

Include dependency graph for FindN8Lines.cpp:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  HuginLines

Defines

#define N8_bg   255
#define N8_end   1
#define N8_mid   96

Functions

BImage edgeMap2linePts (BImage &input)
 marks line point
float ccdist (int dx, int dy)
float eudist (int dx, int dy)
double CtoAcc (vector< Point2D > &pts, int start, int count, double &C, double &A)
double CtoAeu (vector< Point2D > &pts, int start, int count, double &C, double &A)
float scurv (Point2D &l, Point2D &m, Point2D &r)
void vcurv (Point2D &l, Point2D &m, Point2D &r, float &vx, float &vy)
int lineFilter (vector< Point2D > &pts, int lmin, double flpix, double xcen, double ycen)
int linePts2lineList (BImage &img, int minsize, double flpix, Lines &lines)
 converts a linePts image to a list of lines


Detailed Description

implementation of find lines algorithm

Author:
Thomas K. Sharpless
finds straightish, non-crossing lines in an edge map, using 8-neighborhood operations.

Definition in file FindN8Lines.cpp.


Define Documentation

#define N8_bg   255
 

Definition at line 44 of file FindN8Lines.cpp.

Referenced by HuginLines::edgeMap2linePts().

#define N8_end   1
 

Definition at line 45 of file FindN8Lines.cpp.

#define N8_mid   96
 

Definition at line 46 of file FindN8Lines.cpp.


Function Documentation

float ccdist int  dx,
int  dy
[inline]
 

Definition at line 276 of file FindN8Lines.cpp.

References celeste::max(), and celeste::min().

Referenced by HuginLines::CtoAcc(), and HuginLines::linePts2lineList().

double CtoAcc vector< Point2D > &  pts,
int  start,
int  count,
double &  C,
double &  A
[static]
 

Definition at line 290 of file FindN8Lines.cpp.

References HuginLines::ccdist().

double CtoAeu vector< Point2D > &  pts,
int  start,
int  count,
double &  C,
double &  A
[static]
 

Definition at line 312 of file FindN8Lines.cpp.

References HuginLines::eudist().

BImage edgeMap2linePts vigra::BImage &  input  ) 
 

marks line point

Parameters:
input input image (should be black edges on white background)
Returns:
image with marked lines (background = 0, end points = 1, interior points = 2)

Definition at line 48 of file FindN8Lines.cpp.

References N8_bg.

Referenced by HuginLines::findLines().

float eudist int  dx,
int  dy
[inline]
 

Definition at line 283 of file FindN8Lines.cpp.

Referenced by HuginLines::CtoAeu().

int lineFilter vector< Point2D > &  pts,
int  lmin,
double  flpix,
double  xcen,
double  ycen
[static]
 

Definition at line 365 of file FindN8Lines.cpp.

Referenced by HuginLines::linePts2lineList().

int linePts2lineList vigra::BImage &  img,
int  minsize,
double  flPix,
Lines lines
 

converts a linePts image to a list of lines

Parameters:
img lineimage
minsize minimum length of line given in
flPix focal length in pixel (determines the maximal allowed curvature of the line)
lines detected lines
Returns:
number of detected lines

Definition at line 445 of file FindN8Lines.cpp.

References HuginLines::ccdist(), HuginLines::SingleLine::line, HuginLines::lineFilter(), and HuginLines::SingleLine::status.

Referenced by HuginLines::findLines().

float scurv Point2D &  l,
Point2D &  m,
Point2D &  r
[inline]
 

Definition at line 336 of file FindN8Lines.cpp.

void vcurv Point2D &  l,
Point2D &  m,
Point2D &  r,
float &  vx,
float &  vy
[inline]
 

Definition at line 345 of file FindN8Lines.cpp.


Generated on Thu Apr 24 01:25:44 2014 for Hugintrunk by  doxygen 1.3.9.1