HuginLines Namespace Reference


Classes

struct  HuginLines::VerticalLine
struct  HuginLines::SingleLine
 a single line extracted from image More...

Typedefs

typedef std::vector< VerticalLineVerticalLineVector
typedef std::vector< SingleLineLines
 vector of extracted lines from image

Enumerations

enum  LineStatus {
  valid_line = 0, valid_line_disabled, bad_length, bad_orientation,
  bad_curvature
}
 enumeration for different line status More...

Functions

template<class ImageType>
double resize_image (ImageType &in, ImageType &out, int resize_dimension)
vigra::BImage * detectEdges (UInt8RGBImage input, double scale, double threshold, unsigned int resize_dimension, double &size_factor)
 detect and mark edges in an edge image using Canny's algorithm
vigra::BImage * detectEdges (BImage input, double scale, double threshold, unsigned int resize_dimension, double &size_factor)
double calculate_focal_length_pixels (double focal_length, double cropFactor, double width, double height)
Lines findLines (vigra::BImage &edge, double length_threshold, double focal_length, double crop_factor)
 find straightish non-crossing lines find straightish non-crossing lines in an edge map using 8-neighborhood operations. (Points on the edges of the image cannot be line points).
void ScaleLines (Lines &lines, const double scale)
 scales the given lines with given factor use in conjugation with HuginLines::detectEdges to scale the lines to image space because edge image to scaled to smaller size for faster computation
HuginBase::CPVector GetControlPoints (const SingleLine line, const unsigned int imgNr, const unsigned int lineNr, const unsigned int numberOfCtrlPoints)
 returns a HuginBase::CPVector with cps_per_lines
vigra::Point2D GetFootpoint (vigra::Point2D p, vigra::Point2D p1, vigra::Point2D p2)
VerticalLine FitLine (SingleLine line)
VerticalLineVector FilterLines (Lines lines, double roll)
bool SortByError (const HuginBase::ControlPoint &cp1, const HuginBase::ControlPoint &cp2)
template<class ImageType>
HuginBase::CPVector _getVerticalLines (const HuginBase::Panorama &pano, const unsigned int imgNr, ImageType &image, const unsigned int nrLines)
HuginBase::CPVector GetVerticalLines (const HuginBase::Panorama &pano, const unsigned int imgNr, vigra::UInt8RGBImage &image, const unsigned int nrLines)
 searches for vertical control points in given image
HuginBase::CPVector GetVerticalLines (const HuginBase::Panorama &pano, const unsigned int imgNr, vigra::BImage &image, const unsigned int nrLines)
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


Typedef Documentation

typedef std::vector<SingleLine> HuginLines::Lines
 

vector of extracted lines from image

Definition at line 50 of file LinesTypes.h.

Referenced by _getVerticalLines(), and findLines().

typedef std::vector<VerticalLine> HuginLines::VerticalLineVector
 

Definition at line 173 of file FindLines.cpp.

Referenced by _getVerticalLines(), and FilterLines().


Enumeration Type Documentation

enum LineStatus
 

enumeration for different line status

Enumeration values:
valid_line 
valid_line_disabled 
bad_length 
bad_orientation 
bad_curvature 

Definition at line 33 of file LinesTypes.h.


Function Documentation

template<class ImageType>
HuginBase::CPVector _getVerticalLines const HuginBase::Panorama pano,
const unsigned int  imgNr,
ImageType image,
const unsigned int  nrLines
 

Definition at line 256 of file FindLines.cpp.

References HuginBase::Panorama::addCtrlPoint(), HuginBase::Panorama::addImage(), HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::SrcPanoImage::calcFocalLength(), HuginBase::PTools::Transform::createTransform(), DEG_TO_RAD, HuginBase::SrcPanoImage::deleteAllMasks(), detectEdges(), HuginBase::ControlPoint::error, FilterLines(), findLines(), HuginBase::Panorama::getCtrlPoints(), HuginBase::SrcPanoImage::getHeight(), HuginBase::Panorama::getImage(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getROI(), HuginBase::Panorama::getSrcImage(), HuginBase::SrcPanoImage::getWidth(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, ImageType, Lines, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_image, celeste::max(), MAX_RESIZE_DIM, celeste::min(), HuginBase::ControlPoint::mode, HuginBase::PTools::optimize(), HuginBase::PanoramaOptions::outputExposureValue, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), HuginBase::PanoramaAlgorithm::run(), HuginBase::BaseSrcPanoImage::setActive(), HuginBase::BaseSrcPanoImage::setEMoRParams(), HuginBase::BaseSrcPanoImage::setExposureValue(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage(), HuginBase::BaseSrcPanoImage::setPitch(), HuginBase::PanoramaOptions::setProjection(), HuginBase::BaseSrcPanoImage::setRoll(), HuginBase::PanoramaOptions::setWidth(), HuginBase::BaseSrcPanoImage::setX(), HuginBase::BaseSrcPanoImage::setY(), HuginBase::BaseSrcPanoImage::setYaw(), HuginBase::BaseSrcPanoImage::setZ(), HuginBase::PTools::Transform::transformImgCoord(), VerticalLineVector, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.

Referenced by GetVerticalLines().

double calculate_focal_length_pixels double  focal_length,
double  cropFactor,
double  width,
double  height
 

Definition at line 109 of file FindLines.cpp.

Referenced by findLines().

float ccdist int  dx,
int  dy
[inline]
 

Definition at line 276 of file FindN8Lines.cpp.

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

Referenced by CtoAcc(), and linePts2lineList().

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

Definition at line 290 of file FindN8Lines.cpp.

References ccdist().

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

Definition at line 312 of file FindN8Lines.cpp.

References eudist().

vigra::BImage* detectEdges BImage  input,
double  scale,
double  threshold,
unsigned int  resize_dimension,
double &  size_factor
 

Definition at line 96 of file FindLines.cpp.

References vigra_ext::destImage(), resize_image(), vigra_ext::srcImageRange(), and threshold().

Referenced by _getVerticalLines().

vigra::BImage* detectEdges vigra::UInt8RGBImage  input,
double  scale,
double  threshold,
unsigned int  resize_dimension,
double &  size_factor
 

detect and mark edges in an edge image using Canny's algorithm

Parameters:
input input image, on which the algorithm should run
scale scale factor in pixel (precondition: scale > 0)
threshold threshold for edge detection algorithm (precondition: threshold > 0)
resize_dimension maximum dimension on which the algorithm should work
size_factor contains the scale factor for transform from edge image to input image
Returns:
image with the marked edges

Definition at line 79 of file FindLines.cpp.

References vigra_ext::destImage(), resize_image(), vigra_ext::srcImageRange(), and threshold().

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 findLines().

float eudist int  dx,
int  dy
[inline]
 

Definition at line 283 of file FindN8Lines.cpp.

Referenced by CtoAeu().

VerticalLineVector FilterLines Lines  lines,
double  roll
 

Definition at line 225 of file FindLines.cpp.

References DEG_TO_RAD, HuginLines::VerticalLine::end, FitLine(), HuginLines::VerticalLine::start, valid_line, and VerticalLineVector.

Referenced by _getVerticalLines().

LINESIMPEX HuginLines::Lines HuginLines::findLines vigra::BImage &  edge,
double  length_threshold,
double  focal_length,
double  crop_factor
 

find straightish non-crossing lines find straightish non-crossing lines in an edge map using 8-neighborhood operations. (Points on the edges of the image cannot be line points).

Parameters:
edge edge image (e.g. created with HuginLines::detectEdges
length_threshold minimum length of a line, given in ratio to longest images dimension (0<length_threshold<1)
focal_length focal length of the lens (used for estimate which curvature the lines can have)
crop_factor crop factor of the camera/lens
Returns:
the found lines as HuginLines::Lines, contains also the invalid lines (e.g. too short, too curved), use Lines[].status to get result

Definition at line 124 of file FindLines.cpp.

References calculate_focal_length_pixels(), edgeMap2linePts(), linePts2lineList(), and Lines.

Referenced by _getVerticalLines().

VerticalLine FitLine SingleLine  line  ) 
 

Definition at line 185 of file FindLines.cpp.

References HuginLines::VerticalLine::end, GetFootpoint(), HuginLines::SingleLine::line, and HuginLines::VerticalLine::start.

Referenced by FilterLines().

LINESIMPEX HuginBase::CPVector HuginLines::GetControlPoints const SingleLine  line,
const unsigned int  imgNr,
const unsigned int  lineNr,
const unsigned int  numberOfCtrlPoints
 

returns a HuginBase::CPVector with cps_per_lines

Parameters:
line line from which the control points should be created
imgNr number of the image in the HuginBase::Panorama class
lineNr number of the line to be created (must be >=3, line 1 and 2 are horizontal and vertical lines)
numberOfCtrlPoints number of control points to create
Returns:
HuginBase::CPVector with all control points

Definition at line 150 of file FindLines.cpp.

References HuginLines::SingleLine::line.

Referenced by LensCalFrame::GetPanorama().

vigra::Point2D GetFootpoint vigra::Point2D  p,
vigra::Point2D  p1,
vigra::Point2D  p2
 

Definition at line 176 of file FindLines.cpp.

References hugin_utils::FDiff2D, and hugin_utils::sqr().

Referenced by FitLine().

LINESIMPEX HuginBase::CPVector HuginLines::GetVerticalLines const HuginBase::Panorama pano,
const unsigned int  imgNr,
vigra::BImage &  image,
const unsigned int  nrLines
 

Definition at line 466 of file FindLines.cpp.

References _getVerticalLines().

LINESIMPEX HuginBase::CPVector HuginLines::GetVerticalLines const HuginBase::Panorama pano,
const unsigned int  imgNr,
vigra::UInt8RGBImage &  image,
const unsigned int  nrLines
 

searches for vertical control points in given image

Parameters:
pano panorama object in which is searched
imgNr number of image in which should be searched
image vigra image in which should be searched
nrLine maximal number of lines to return
Returns:
HuginBase::CPVector with all vertical control points

Definition at line 461 of file FindLines.cpp.

References _getVerticalLines().

Referenced by LoadGrayImageAndFindLines(), and LoadImageAndFindLines().

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

Definition at line 365 of file FindN8Lines.cpp.

Referenced by 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 ccdist(), HuginLines::SingleLine::line, lineFilter(), and HuginLines::SingleLine::status.

Referenced by findLines().

template<class ImageType>
double resize_image ImageType in,
ImageType out,
int  resize_dimension
 

Definition at line 43 of file FindLines.cpp.

References vigra_ext::destImage(), vigra_ext::destImageRange(), out, and vigra_ext::srcImageRange().

Referenced by detectEdges().

LINESIMPEX void HuginLines::ScaleLines HuginLines::Lines lines,
const double  scale
 

scales the given lines with given factor use in conjugation with HuginLines::detectEdges to scale the lines to image space because edge image to scaled to smaller size for faster computation

Definition at line 139 of file FindLines.cpp.

Referenced by ImageLineList::ScaleLines().

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

Definition at line 336 of file FindN8Lines.cpp.

bool SortByError const HuginBase::ControlPoint cp1,
const HuginBase::ControlPoint cp2
 

Definition at line 250 of file FindLines.cpp.

References HuginBase::ControlPoint::error.

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

Definition at line 345 of file FindN8Lines.cpp.


Generated on Mon Sep 1 01:25:53 2014 for Hugintrunk by  doxygen 1.3.9.1