Hugintrunk
0.1
|
Classes | |
class | VerticalLine |
class | InvertedMaskAccessor |
struct | SingleLine |
a single line extracted from image More... | |
Typedefs | |
typedef std::vector< VerticalLine > | VerticalLineVector |
typedef std::vector< SingleLine > | Lines |
vector of extracted lines from image More... | |
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 More... | |
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. More... | |
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 More... | |
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 More... | |
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) |
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, vigra::BImage &mask, const unsigned int nrLines) |
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 More... | |
HuginBase::CPVector | GetVerticalLines (const HuginBase::Panorama &pano, const unsigned int imgNr, vigra::BImage &image, vigra::BImage &mask, const unsigned int nrLines) |
vigra::BImage | edgeMap2linePts (vigra::BImage &input) |
marks line point More... | |
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 More... | |
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 231 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::_getVerticalLines | ( | const HuginBase::Panorama & | pano, |
const unsigned int | imgNr, | ||
ImageType & | image, | ||
vigra::BImage & | mask, | ||
const unsigned int | nrLines | ||
) |
Definition at line 344 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(), vigra_ext::destImageRange(), detectEdges(), HuginBase::PanoramaOptions::EQUIRECTANGULAR, HuginBase::ControlPoint::error, FilterLines(), findLines(), HuginBase::Panorama::getCtrlPoints(), HuginBase::SrcPanoImage::getHeight(), HuginBase::PanoramaOptions::getHeight(), HuginBase::Panorama::getImage(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getROI(), HuginBase::Panorama::getSrcImage(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::SrcPanoImage::getWidth(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, vigra_ext::INTERP_CUBIC, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_image, vigra_ext::ROIImage< RemapImage, AlphaImage >::m_mask, celeste::max(), MAX_RESIZE_DIM, celeste::min(), HuginBase::ControlPoint::mode, HuginBase::PTools::optimize(), HuginBase::PanoramaOptions::outputExposureValue, HuginBase::BaseSrcPanoImage::RECTILINEAR, HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::setPanoImage(), HuginBase::PanoramaOptions::setProjection(), HuginBase::PanoramaOptions::setWidth(), SortByError(), hugin_utils::sqr(), vigra_ext::srcImage(), vigra_ext::srcImageRange(), HuginBase::PTools::Transform::transformImgCoord(), HuginBase::ControlPoint::X, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.
Referenced by GetVerticalLines().
double HuginLines::calculate_focal_length_pixels | ( | double | focal_length, |
double | cropFactor, | ||
double | width, | ||
double | height | ||
) |
Definition at line 100 of file FindLines.cpp.
Referenced by findLines().
|
inline |
Definition at line 271 of file FindN8Lines.cpp.
References celeste::max(), and celeste::min().
Referenced by linePts2lineList().
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 vigra_ext::destImage(), resize_image(), and vigra_ext::srcImageRange().
Referenced by _getVerticalLines(), and LensCalFrame::OnFindLines().
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 vigra_ext::destImage(), resize_image(), and vigra_ext::srcImageRange().
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 vigra::omp::copyImage(), celeste::line, N8_bg, N8_end, and N8_mid.
Referenced by findLines().
|
inline |
Definition at line 278 of file FindN8Lines.cpp.
VerticalLineVector HuginLines::FilterLines | ( | Lines | lines, |
double | roll | ||
) |
Definition at line 272 of file FindLines.cpp.
References DEG_TO_RAD, FitLine(), HuginLines::VerticalLine::GetAngle(), HuginLines::VerticalLine::GetEnd(), HuginLines::VerticalLine::GetEstimatedDistance(), HuginLines::VerticalLine::GetLineLength(), HuginLines::VerticalLine::GetStart(), and valid_line.
Referenced by _getVerticalLines().
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(), and linePts2lineList().
Referenced by _getVerticalLines(), and LensCalFrame::OnFindLines().
VerticalLine HuginLines::FitLine | ( | SingleLine | line | ) |
Definition at line 234 of file FindLines.cpp.
References GetFootpoint(), HuginLines::SingleLine::line, HuginLines::VerticalLine::SetEnd(), and HuginLines::VerticalLine::SetStart().
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.
Referenced by LensCalFrame::GetPanorama().
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(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by FitLine(), HuginLines::VerticalLine::GetEstimatedDistance(), and GetFootpoint().
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().
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 574 of file FindLines.cpp.
References _getVerticalLines().
Referenced by LoadGrayImageAndFindLines(), and LoadImageAndFindLines().
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 579 of file FindLines.cpp.
References _getVerticalLines().
|
static |
Definition at line 316 of file FindN8Lines.cpp.
Referenced by linePts2lineList().
int HuginLines::linePts2lineList | ( | vigra::BImage & | img, |
int | minsize, | ||
double | flPix, | ||
Lines & | lines | ||
) |
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, celeste::line, lineFilter(), N8_bg, N8_end, HuginLines::SingleLine::status, 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 vigra::omp::copyImage(), vigra_ext::destImage(), and vigra_ext::destImageRange().
Referenced by detectEdges().
IMPEX void HuginLines::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
Definition at line 130 of file FindLines.cpp.
Referenced by ImageLineList::ScaleLines().
|
inline |
Definition at line 287 of file FindN8Lines.cpp.
bool HuginLines::SortByError | ( | const HuginBase::ControlPoint & | cp1, |
const HuginBase::ControlPoint & | cp2 | ||
) |
Definition at line 322 of file FindLines.cpp.
References HuginBase::ControlPoint::error.
Referenced by _getVerticalLines().
|
inline |
Definition at line 296 of file FindN8Lines.cpp.