Hugin trunk 0.1
Loading...
Searching...
No Matches
Classes | Functions | Variables
linefind.cpp File Reference

program to find vertical lines in project More...

#include <fstream>
#include <sstream>
#include <getopt.h>
#include <panodata/Panorama.h>
#include <panodata/StandardImageVariableGroups.h>
#include <lines/FindLines.h>
#include <vigra/impex.hxx>
#include <vigra_ext/impexalpha.hxx>
#include <vigra/functorexpression.hxx>
#include <vigra_ext/utils.h>
#include <hugin_utils/openmp_lock.h>
#include <algorithms/optimizer/PTOptimizer.h>
#include <pano13/filter.h>
Include dependency graph for linefind.cpp:

Go to the source code of this file.

Classes

struct  SortVectorByExposure
 

Functions

static void usage (const char *name)
 
static int ptProgress (int command, char *argument)
 
static int ptinfoDlg (int command, char *argument)
 
template<class SrcIMG >
void convertToUInt8 (SrcIMG &src, const std::string &origType, vigra::UInt8RGBImage &dest)
 converts the given image to UInt8RGBImage only this image is correctly processed by linefind
 
template<class SrcIMG >
void convertGrayToUInt8 (SrcIMG &src, const std::string &origType, vigra::BImage &dest)
 
template<class SrcIMG >
vigra::BImage LoadGrayImageAndConvert (vigra::ImageImportInfo &info, vigra::BImage &mask)
 
template<class SrcIMG >
vigra::UInt8RGBImage LoadImageAndConvert (vigra::ImageImportInfo &info, vigra::BImage &mask)
 
HuginBase::CPVector LoadGrayImageAndFindLines (vigra::ImageImportInfo info, HuginBase::Panorama &pano, size_t imgNr, int nrLines)
 
HuginBase::CPVector LoadImageAndFindLines (vigra::ImageImportInfo info, HuginBase::Panorama &pano, size_t imgNr, int nrLines)
 
int main (int argc, char *argv[])
 

Variables

static hugin_omp::Lock lock
 

Detailed Description

program to find vertical lines in project

Author
T. Modes

Definition in file linefind.cpp.

Function Documentation

◆ convertGrayToUInt8()

template<class SrcIMG >
void convertGrayToUInt8 ( SrcIMG src,
const std::string &  origType,
vigra::BImage dest 
)

@TODO this convert routine scale the input values range into the full scale of UInt16 this is not fully correct

Definition at line 102 of file linefind.cpp.

References vigra_ext::applyMapping(), vigra_ext::getMaxValForPixelType(), and threshold().

Referenced by LoadGrayImageAndConvert().

◆ convertToUInt8()

template<class SrcIMG >
void convertToUInt8 ( SrcIMG src,
const std::string &  origType,
vigra::UInt8RGBImage dest 
)

converts the given image to UInt8RGBImage only this image is correctly processed by linefind

Parameters
srcinput image
origTypepixel type of input image
destconverted image

@TODO this convert routine scale the input values range into the full scale of UInt8 this is not fully correct

Definition at line 78 of file linefind.cpp.

References vigra_ext::applyMapping(), vigra_ext::getMaxValForPixelType(), and threshold().

Referenced by LoadImageAndConvert().

◆ LoadGrayImageAndConvert()

template<class SrcIMG >
vigra::BImage LoadGrayImageAndConvert ( vigra::ImageImportInfo info,
vigra::BImage mask 
)

Definition at line 126 of file linefind.cpp.

References convertGrayToUInt8(), vigra::importImageAlpha(), and threshold().

◆ LoadGrayImageAndFindLines()

HuginBase::CPVector LoadGrayImageAndFindLines ( vigra::ImageImportInfo  info,
HuginBase::Panorama pano,
size_t  imgNr,
int  nrLines 
)

Definition at line 164 of file linefind.cpp.

References HuginLines::GetVerticalLines(), vigra::importImageAlpha(), and threshold().

Referenced by main().

◆ LoadImageAndConvert()

template<class SrcIMG >
vigra::UInt8RGBImage LoadImageAndConvert ( vigra::ImageImportInfo info,
vigra::BImage mask 
)

Definition at line 145 of file linefind.cpp.

References convertToUInt8(), vigra::importImageAlpha(), and threshold().

◆ LoadImageAndFindLines()

HuginBase::CPVector LoadImageAndFindLines ( vigra::ImageImportInfo  info,
HuginBase::Panorama pano,
size_t  imgNr,
int  nrLines 
)

Definition at line 216 of file linefind.cpp.

References HuginLines::GetVerticalLines(), vigra::importImageAlpha(), and threshold().

Referenced by main().

◆ main()

int main ( int  argc,
char argv[] 
)

◆ ptinfoDlg()

static int ptinfoDlg ( int  command,
char argument 
)
static

Definition at line 65 of file linefind.cpp.

Referenced by main().

◆ ptProgress()

static int ptProgress ( int  command,
char argument 
)
static

Definition at line 61 of file linefind.cpp.

Referenced by main().

◆ usage()

static void usage ( const char name)
static

Definition at line 45 of file linefind.cpp.

References hugin_utils::GetHuginVersion().

Variable Documentation

◆ lock

hugin_omp::Lock lock
static

Definition at line 278 of file linefind.cpp.

Referenced by main().