Hugin trunk 0.1
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions | Variables
align_image_stack.cpp File Reference

program to align a set of well overlapping images (~90%) More...

#include <hugin_config.h>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vigra/error.hxx>
#include <vigra/cornerdetection.hxx>
#include <vigra/localminmax.hxx>
#include <hugin_utils/utils.h>
#include <vigra_ext/Pyramid.h>
#include <vigra_ext/Correlation.h>
#include <vigra_ext/InterestPoints.h>
#include <vigra_ext/impexalpha.hxx>
#include <panodata/Panorama.h>
#include <panotools/PanoToolsOptimizerWrapper.h>
#include <panodata/StandardImageVariableGroups.h>
#include <algorithms/optimizer/PTOptimizer.h>
#include <nona/Stitcher.h>
#include <algorithms/basic/CalculateOptimalROI.h>
#include <lensdb/LensDB.h>
#include <getopt.h>
#include <hugin_utils/openmp_lock.h>
#include <tiff.h>
Include dependency graph for align_image_stack.cpp:

Go to the source code of this file.

Classes

struct  Parameters
 
struct  SortImageVectorEV
 

Namespaces

namespace  detail
 

Typedefs

typedef std::multimap< double, vigra::Diff2D > MapPoints
 

Functions

static void usage (const char *name)
 
template<class ImageType >
vigra_ext::CorrelationResult detail::FineTunePoint (const ImageType &leftImg, const vigra::Diff2D templPos, const int templSize, const ImageType &rightImg, const vigra::Diff2D searchPos, const int searchWidth, vigra::VigraTrueType)
 
template<class ImageType >
vigra_ext::CorrelationResult detail::FineTunePoint (const ImageType &leftImg, const vigra::Diff2D templPos, const int templSize, const ImageType &rightImg, const vigra::Diff2D searchPos, const int searchWidth, vigra::VigraFalseType)
 
template<class ImageType >
void FineTuneInterestPoints (HuginBase::Panorama &pano, int img1, const ImageType &leftImg, const ImageType &leftImgOrig, int img2, const ImageType &rightImg, const ImageType &rightImgOrig, const MapPoints &points, unsigned nPoints, int pyrLevel, int templWidth, int sWidth, double scaleFactor, double corrThresh, bool stereo)
 
template<class ImageType >
void detail::FindInterestPointsPartial (const ImageType &image, const vigra::Rect2D &rect, double scale, unsigned nPoints, std::multimap< double, vigra::Diff2D > &points, vigra::VigraTrueType)
 
template<class ImageType >
void detail::FindInterestPointsPartial (const ImageType &image, const vigra::Rect2D &rect, double scale, unsigned nPoints, std::multimap< double, vigra::Diff2D > &points, vigra::VigraFalseType)
 
template<class ImageType >
void createCtrlPoints (HuginBase::Panorama &pano, int img1, const ImageType &leftImg, const ImageType &leftImgOrig, int img2, const ImageType &rightImg, const ImageType &rightImgOrig, int pyrLevel, double scale, unsigned nPoints, unsigned grid, double corrThresh=0.9, bool stereo=false)
 
void alignStereoWindow (HuginBase::Panorama &pano, bool pop_out)
 
void autoCrop (HuginBase::Panorama &pano)
 
static int ptProgress (int command, char *argument)
 
static int ptinfoDlg (int command, char *argument)
 
template<class PixelType >
int main2 (std::vector< std::string > files, Parameters param)
 
int main (int argc, char *argv[])
 

Variables

int g_verbose = 0
 
static hugin_omp::Lock lock
 

Detailed Description

program to align a set of well overlapping images (~90%)

Author
Pablo d'Angelo pablo.nosp@m..dan.nosp@m.gelo@.nosp@m.web..nosp@m.de
Id
align_image_stack.cpp 2493 2007-10-24 20:26:26Z dangelo

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software. If not, see http://www.gnu.org/licenses/.

Definition in file align_image_stack.cpp.

Typedef Documentation

◆ MapPoints

typedef std::multimap<double, vigra::Diff2D> MapPoints

Definition at line 117 of file align_image_stack.cpp.

Function Documentation

◆ alignStereoWindow()

void alignStereoWindow ( HuginBase::Panorama &  pano,
bool  pop_out 
)

◆ autoCrop()

void autoCrop ( HuginBase::Panorama &  pano)

◆ createCtrlPoints()

template<class ImageType >
void createCtrlPoints ( HuginBase::Panorama &  pano,
int  img1,
const ImageType &  leftImg,
const ImageType &  leftImgOrig,
int  img2,
const ImageType &  rightImg,
const ImageType &  rightImgOrig,
int  pyrLevel,
double  scale,
unsigned  nPoints,
unsigned  grid,
double  corrThresh = 0.9,
bool  stereo = false 
)

◆ FineTuneInterestPoints()

template<class ImageType >
void FineTuneInterestPoints ( HuginBase::Panorama &  pano,
int  img1,
const ImageType &  leftImg,
const ImageType &  leftImgOrig,
int  img2,
const ImageType &  rightImg,
const ImageType &  rightImgOrig,
const MapPoints &  points,
unsigned  nPoints,
int  pyrLevel,
int  templWidth,
int  sWidth,
double  scaleFactor,
double  corrThresh,
bool  stereo 
)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ main2()

template<class PixelType >
int main2 ( std::vector< std::string >  files,
Parameters  param 
)

Definition at line 539 of file align_image_stack.cpp.

References HuginBase::Panorama::activateImage(), HuginBase::Panorama::addImage(), Parameters::alignedPrefix, alignStereoWindow(), Parameters::alignToFirst, autoCrop(), Parameters::corrThresh, Parameters::cpErrorThreshold, createCtrlPoints(), Parameters::crop, Parameters::dontRemapRef, Parameters::fisheye, HuginBase::PanoramaOptions::FULL_FRAME_FISHEYE, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, g_verbose, HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getCtrlPoints(), HuginBase::Panorama::getCtrlPointsForImage(), HuginBase::Panorama::getImage(), HuginBase::getImagesinROI(), HuginBase::Panorama::getNrOfCtrlPoints(), HuginBase::Panorama::getOptimizeVector(), HuginBase::Panorama::getOptions(), HuginBase::Panorama::getSrcImage(), Parameters::gpu, Parameters::grid, HuginBase::PanoramaOptions::HDR, Parameters::hdrFile, Parameters::hfov, HuginBase::PanoramaOptions::huberSigma, vigra::importImageAlpha(), Parameters::linear, Parameters::loadDistortion, Parameters::nPoints, Parameters::optCenter, Parameters::optDistortion, Parameters::optHFOV, HuginBase::PTools::optimize(), Parameters::optX, Parameters::optY, Parameters::optZ, HuginBase::PanoramaOptions::OUTPUT_HDR, HuginBase::PanoramaOptions::OUTPUT_LDR, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputFormat, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputPixelType, Parameters::pop_out, ptinfoDlg(), Parameters::ptoFile, ptProgress(), Parameters::pyrLevel, HuginBase::SrcPanoImage::readEXIF(), HuginBase::PanoramaOptions::RECTILINEAR, vigra_ext::reduceNTimes(), HuginBase::PanoramaOptions::remapUsingGPU, HuginBase::BaseSrcPanoImage::RESPONSE_LINEAR, HuginBase::Nona::SetAdvancedOption(), HuginBase::Panorama::setCtrlPoints(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptimizeVector(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setProjection(), HuginBase::PanoramaOptions::setWidth(), Parameters::sortImagesByEv, Parameters::stereo, Parameters::stereo_window, HuginBase::Nona::stitchPanorama(), threshold(), HuginBase::PanoramaOptions::TIFF_m, HuginBase::PanoramaOptions::tiff_saveROI, HuginBase::Panorama::WritePTOFile(), and HuginBase::ControlPoint::X.

◆ ptinfoDlg()

static int ptinfoDlg ( int  command,
char *  argument 
)
static

Definition at line 521 of file align_image_stack.cpp.

Referenced by main2().

◆ ptProgress()

static int ptProgress ( int  command,
char *  argument 
)
static

Definition at line 517 of file align_image_stack.cpp.

Referenced by main2().

◆ usage()

static void usage ( const char *  name)
static

Definition at line 64 of file align_image_stack.cpp.

References hugin_utils::GetHuginVersion().

Variable Documentation

◆ g_verbose

int g_verbose = 0

Definition at line 62 of file align_image_stack.cpp.

Referenced by createCtrlPoints(), FineTuneInterestPoints(), main(), and main2().

◆ lock

hugin_omp::Lock lock
static

Definition at line 118 of file align_image_stack.cpp.

Referenced by FineTuneInterestPoints().