|
Hugin trunk 0.1
|
Classes | |
| class | InvertedMaskAccessor |
| struct | SingleLine |
| a single line extracted from image More... | |
| class | VerticalLine |
Typedefs | |
| typedef std::vector< VerticalLine > | VerticalLineVector |
| typedef std::vector< SingleLine > | Lines |
| 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 SrcImageIterator , class SrcAccessor , class DestImage > | |
| double | resize_image (const vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > src, DestImage &dest, int resize_dimension) |
| vigra::BImage * | detectEdges (const vigra::UInt8RGBImage &input, const double scale, const double threshold, const unsigned int resize_dimension, double &size_factor) |
| detect and mark edges in an edge image using Canny's algorithm | |
| vigra::BImage * | detectEdges (const vigra::BImage &input, const double scale, const double threshold, const 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. | |
| void | 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 | |
| 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 (const vigra::Point2D &p, const vigra::Point2D &p1, const vigra::Point2D &p2, double &u) |
| vigra::Point2D | GetFootpoint (const vigra::Point2D &p, const vigra::Point2D &p1, const vigra::Point2D &p2) |
| VerticalLine | FitLine (SingleLine line) |
| VerticalLineVector | FilterLines (Lines lines, double roll, const bool onlyVerticalLines) |
| bool | SortByError (const HuginBase::ControlPoint &cp1, const HuginBase::ControlPoint &cp2) |
| template<class ImageType > | |
| HuginBase::CPVector | _getFilteredLines (const HuginBase::Panorama &pano, const unsigned int imgNr, ImageType &image, vigra::BImage &mask, const unsigned int nrLines, const bool onlyVerticalLines) |
| HuginBase::CPVector | GetVerticalLines (const HuginBase::Panorama &pano, const unsigned int imgNr, vigra::UInt8RGBImage &image, vigra::BImage &mask, 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, vigra::BImage &mask, const unsigned int nrLines) |
| HuginBase::CPVector | GetLines (const HuginBase::Panorama &pano, const unsigned int imgNr, vigra::UInt8RGBImage &image, vigra::BImage &mask) |
| searches for all lines, the same as GetVerticalLines execpt that no filtering according to roll angle is done | |
| vigra::BImage | edgeMap2linePts (vigra::BImage &input) |
| marks line point | |
| float | ccdist (int dx, int dy) |
| float | eudist (int dx, int dy) |
| float | scurv (vigra::Point2D &l, vigra::Point2D &m, vigra::Point2D &r) |
| void | vcurv (vigra::Point2D &l, vigra::Point2D &m, vigra::Point2D &r, float &vx, float &vy) |
| static int | lineFilter (std::vector< vigra::Point2D > &pts, int lmin, double flpix, double xcen, double ycen) |
| int | linePts2lineList (vigra::BImage &img, int minsize, double flPix, Lines &lines) |
| converts a linePts image to a list of lines | |
| typedef std::vector<SingleLine> HuginLines::Lines |
vector of extracted lines from image
Definition at line 50 of file LinesTypes.h.
| typedef std::vector<VerticalLine> HuginLines::VerticalLineVector |
Definition at line 235 of file FindLines.cpp.
enumeration for different line status
| Enumerator | |
|---|---|
| valid_line | |
| valid_line_disabled | |
| bad_length | |
| bad_orientation | |
| bad_curvature | |
Definition at line 33 of file LinesTypes.h.
| HuginBase::CPVector HuginLines::_getFilteredLines | ( | const HuginBase::Panorama & | pano, |
| const unsigned int | imgNr, | ||
| ImageType & | image, | ||
| vigra::BImage & | mask, | ||
| const unsigned int | nrLines, | ||
| const bool | onlyVerticalLines | ||
| ) |
Definition at line 348 of file FindLines.cpp.
References HuginBase::Panorama::addImage(), HuginBase::CalculateCPStatisticsError::calcCtrlPntsErrorStats(), HuginBase::SrcPanoImage::calcFocalLength(), HuginBase::PTools::Transform::createTransform(), DEG_TO_RAD, HuginBase::SrcPanoImage::deleteAllMasks(), detectEdges(), HuginBase::PanoramaOptions::EQUIRECTANGULAR, FilterLines(), findLines(), HuginBase::PanoramaOptions::getHeight(), HuginBase::Panorama::getImage(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getROI(), HuginBase::Panorama::getSrcImage(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::ControlPoint::image1Nr, vigra_ext::INTERP_CUBIC, MAX_RESIZE_DIM, HuginBase::PTools::optimize(), HuginBase::PanoramaOptions::outputExposureValue, HuginBase::BaseSrcPanoImage::RECTILINEAR, hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::PanoramaOptions::setProjection(), HuginBase::PanoramaOptions::setWidth(), SortByError(), hugin_utils::sqr(), threshold(), HuginBase::PTools::Transform::transformImgCoord(), HuginBase::ControlPoint::X, and HuginBase::ControlPoint::Y.
Referenced by GetLines(), GetVerticalLines(), and GetVerticalLines().
Definition at line 271 of file FindN8Lines.cpp.
References threshold().
Referenced by linePts2lineList().
| IMPEX vigra::BImage * HuginLines::detectEdges | ( | const vigra::BImage & | input, |
| const double | scale, | ||
| const double | threshold, | ||
| const unsigned int | resize_dimension, | ||
| double & | size_factor | ||
| ) |
Definition at line 88 of file FindLines.cpp.
References resize_image(), and threshold().
| IMPEX vigra::BImage * HuginLines::detectEdges | ( | const vigra::UInt8RGBImage & | input, |
| const double | scale, | ||
| const double | threshold, | ||
| const unsigned int | resize_dimension, | ||
| double & | size_factor | ||
| ) |
detect and mark edges in an edge image using Canny's algorithm
| 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 |
Definition at line 76 of file FindLines.cpp.
References resize_image(), and threshold().
Referenced by _getFilteredLines(), and LensCalFrame::OnFindLines().
| vigra::BImage HuginLines::edgeMap2linePts | ( | vigra::BImage & | input | ) |
marks line point
| input | input image (should be black edges on white background) |
Definition at line 43 of file FindN8Lines.cpp.
References N8_bg, N8_end, N8_mid, and threshold().
Referenced by findLines().
Definition at line 278 of file FindN8Lines.cpp.
References threshold().
| VerticalLineVector HuginLines::FilterLines | ( | Lines | lines, |
| double | roll, | ||
| const bool | onlyVerticalLines | ||
| ) |
Definition at line 276 of file FindLines.cpp.
References DEG_TO_RAD, FitLine(), threshold(), and valid_line.
Referenced by _getFilteredLines().
| IMPEX 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).
| 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 |
Definition at line 115 of file FindLines.cpp.
References calculate_focal_length_pixels(), edgeMap2linePts(), linePts2lineList(), and threshold().
Referenced by _getFilteredLines(), and LensCalFrame::OnFindLines().
| VerticalLine HuginLines::FitLine | ( | SingleLine | line | ) |
Definition at line 238 of file FindLines.cpp.
References GetFootpoint(), HuginLines::SingleLine::line, and threshold().
Referenced by FilterLines().
| IMPEX 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
| 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 |
Definition at line 141 of file FindLines.cpp.
References HuginLines::SingleLine::line, and threshold().
| vigra::Point2D HuginLines::GetFootpoint | ( | const vigra::Point2D & | p, |
| const vigra::Point2D & | p1, | ||
| const vigra::Point2D & | p2 | ||
| ) |
Definition at line 167 of file FindLines.cpp.
References GetFootpoint(), and threshold().
| vigra::Point2D HuginLines::GetFootpoint | ( | const vigra::Point2D & | p, |
| const vigra::Point2D & | p1, | ||
| const vigra::Point2D & | p2, | ||
| double & | u | ||
| ) |
Definition at line 159 of file FindLines.cpp.
References hugin_utils::norm(), hugin_utils::sqr(), and threshold().
Referenced by FitLine(), HuginLines::VerticalLine::GetEstimatedDistance(), and GetFootpoint().
| IMPEX HuginBase::CPVector HuginLines::GetLines | ( | const HuginBase::Panorama & | pano, |
| const unsigned int | imgNr, | ||
| vigra::UInt8RGBImage & | image, | ||
| vigra::BImage & | mask | ||
| ) |
searches for all lines, the same as GetVerticalLines execpt that no filtering according to roll angle is done
Definition at line 611 of file FindLines.cpp.
References _getFilteredLines().
Referenced by PerspectivePanel::OnFindLines().
| IMPEX HuginBase::CPVector HuginLines::GetVerticalLines | ( | const HuginBase::Panorama & | pano, |
| const unsigned int | imgNr, | ||
| vigra::BImage & | image, | ||
| vigra::BImage & | mask, | ||
| const unsigned int | nrLines | ||
| ) |
Definition at line 606 of file FindLines.cpp.
References _getFilteredLines(), and threshold().
| IMPEX HuginBase::CPVector HuginLines::GetVerticalLines | ( | const HuginBase::Panorama & | pano, |
| const unsigned int | imgNr, | ||
| vigra::UInt8RGBImage & | image, | ||
| vigra::BImage & | mask, | ||
| const unsigned int | nrLines | ||
| ) |
searches for vertical control points in given image
| 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 |
Definition at line 601 of file FindLines.cpp.
References _getFilteredLines(), and threshold().
Referenced by LoadGrayImageAndFindLines(), LoadImageAndFindLines(), and PerspectivePanel::OnFindLines().
|
static |
Definition at line 316 of file FindN8Lines.cpp.
References threshold().
Referenced by linePts2lineList().
converts a linePts image to a list of lines
| 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 |
Definition at line 395 of file FindN8Lines.cpp.
References bad_curvature, bad_length, bad_orientation, ccdist(), HuginLines::SingleLine::line, lineFilter(), N8_bg, N8_end, HuginLines::SingleLine::status, threshold(), and valid_line.
Referenced by findLines().
| double HuginLines::resize_image | ( | const vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > | src, |
| DestImage & | dest, | ||
| int | resize_dimension | ||
| ) |
Definition at line 39 of file FindLines.cpp.
References threshold().
Referenced by detectEdges(), and detectEdges().
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 130 of file FindLines.cpp.
References threshold().
Referenced by ImageLineList::ScaleLines().
|
inline |
Definition at line 287 of file FindN8Lines.cpp.
References threshold().
| bool HuginLines::SortByError | ( | const HuginBase::ControlPoint & | cp1, |
| const HuginBase::ControlPoint & | cp2 | ||
| ) |
Definition at line 326 of file FindLines.cpp.
References threshold().
Referenced by _getFilteredLines().
|
inline |
Definition at line 296 of file FindN8Lines.cpp.
References threshold().