Hugintrunk
0.1
|
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_ext/impexalpha.hxx>
#include <vigra/cornerdetection.hxx>
#include <vigra/localminmax.hxx>
#include <hugin_utils/utils.h>
#include <hugin_math/hugin_math.h>
#include "vigra/stdimage.hxx"
#include "vigra/stdimagefunctions.hxx"
#include "vigra/functorexpression.hxx"
#include "vigra/transformimage.hxx"
#include <vigra_ext/Pyramid.h>
#include <vigra_ext/Correlation.h>
#include <vigra_ext/InterestPoints.h>
#include <vigra_ext/utils.h>
#include <panodata/Panorama.h>
#include <panodata/StandardImageVariableGroups.h>
#include <panotools/PanoToolsOptimizerWrapper.h>
#include <algorithms/optimizer/PTOptimizer.h>
#include <nona/Stitcher.h>
#include <foreign/levmar/levmar.h>
#include <hugin_utils/openmp_lock.h>
#include <lensdb/LensDB.h>
#include <getopt.h>
#include <unistd.h>
#include <tiff.h>
Go to the source code of this file.
Classes | |
struct | Parameters |
struct | OptimData |
Macros | |
#define | DEFAULT_OPTIMISATION_PARAMETER "abcvde" |
Typedefs | |
typedef std::multimap< double, vigra::Diff2D > | MapPoints |
Functions | |
void | get_optvars (HuginBase::OptimizeVector &_retval) |
static int | ptProgress (int command, char *argument) |
static int | ptinfoDlg (int command, char *argument) |
int | optimize_old (HuginBase::Panorama &pano) |
double | weightHuber (double x, double sigma) |
void | optGetError (double *p, double *x, int m, int n, void *data) |
int | optVis (double *p, double *x, int m, int n, int iter, double sqerror, void *data) |
void | optimize_new (HuginBase::PanoramaData &pano) |
static void | usage (const char *name) |
template<class ImageType > | |
void | createCtrlPoints (HuginBase::Panorama &pano, const ImageType &img, int imgRedNr, int imgGreenNr, int imgBlueNr, double scale, int nPoints, unsigned grid) |
int | main2 (HuginBase::Panorama &pano) |
template<class PixelType > | |
int | processImg (const char *filename) |
int | processPTO (const char *filename) |
void | resetValues (HuginBase::Panorama &pano) |
void | print_result (HuginBase::Panorama &pano) |
int | main (int argc, char *argv[]) |
Variables | |
Parameters | g_param |
static hugin_omp::Lock | lock |
program to align a set of well overlapping images (~90%)
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 tca_correct.cpp.
#define DEFAULT_OPTIMISATION_PARAMETER "abcvde" |
Definition at line 65 of file tca_correct.cpp.
Referenced by main().
typedef std::multimap<double, vigra::Diff2D> MapPoints |
Definition at line 440 of file tca_correct.cpp.
void createCtrlPoints | ( | HuginBase::Panorama & | pano, |
const ImageType & | img, | ||
int | imgRedNr, | ||
int | imgGreenNr, | ||
int | imgBlueNr, | ||
double | scale, | ||
int | nPoints, | ||
unsigned | grid | ||
) |
Definition at line 443 of file tca_correct.cpp.
References HuginBase::Panorama::addCtrlPoint(), vigra_ext::destImage(), HuginBase::ControlPoint::error, vigra_ext::findInterestPointsPartial(), celeste::max(), vigra_ext::CorrelationResult::maxi, vigra_ext::CorrelationResult::maxpos, vigra_ext::PointFineTune(), hugin_utils::roundi(), vigra_ext::srcImageRange(), vigra_ext::transformImage(), Parameters::verbose, hugin_utils::TDiff2D< T >::x, HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, hugin_utils::TDiff2D< T >::y, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.
void get_optvars | ( | HuginBase::OptimizeVector & | _retval | ) |
Definition at line 209 of file tca_correct.cpp.
References Parameters::optvars.
Referenced by main2(), optimize_new(), and optimize_old().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 903 of file tca_correct.cpp.
References Parameters::basename, Parameters::blue_name, Parameters::cpErrorThreshold, DEFAULT_OPTIMISATION_PARAMETER, Parameters::green_name, Parameters::grid, Parameters::load, Parameters::nPoints, Parameters::optMethod, Parameters::optvars, processPTO(), Parameters::ptoOutputFile, Parameters::red_name, Parameters::reset, Parameters::saveDB, Parameters::scale, hugin_utils::stripPath(), usage(), and Parameters::verbose.
int main2 | ( | HuginBase::Panorama & | pano | ) |
Definition at line 842 of file tca_correct.cpp.
References Parameters::cpErrorThreshold, fill_set(), get_optvars(), HuginBase::Panorama::getCtrlPoints(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), optimize_new(), optimize_old(), Parameters::optMethod, print_result(), HuginBase::Panorama::printPanoramaScript(), Parameters::ptoOutputFile, Parameters::reset, resetValues(), HuginBase::Panorama::setCtrlPoints(), and Parameters::verbose.
void optGetError | ( | double * | p, |
double * | x, | ||
int | m, | ||
int | n, | ||
void * | data | ||
) |
Definition at line 260 of file tca_correct.cpp.
References data, HuginBase::ControlPoint::error, OptimData::FromX(), HuginBase::PanoramaData::getCtrlPoint(), HuginBase::PanoramaData::getNrOfCtrlPoints(), OptimData::huberSigma, HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, OptimData::m_center, OptimData::m_dist, OptimData::m_hfov, OptimData::m_pano, OptimData::m_shift, celeste::min(), vigra_ext::pow(), HuginBase::PanoramaData::updateCtrlPointErrors(), weightHuber(), HuginBase::ControlPoint::x1, HuginBase::ControlPoint::x2, HuginBase::ControlPoint::y1, and HuginBase::ControlPoint::y2.
Referenced by optimize_new().
void optimize_new | ( | HuginBase::PanoramaData & | pano | ) |
Definition at line 344 of file tca_correct.cpp.
References data, get_optvars(), HuginBase::PanoramaData::getNrOfCtrlPoints(), OptimData::huberSigma, celeste::info(), OptimData::m_mapping, optGetError(), optVis(), OptimData::SaveToImgs(), OptimData::ToX(), and Parameters::verbose.
Referenced by main2().
int optimize_old | ( | HuginBase::Panorama & | pano | ) |
Definition at line 235 of file tca_correct.cpp.
References get_optvars(), HuginBase::PTools::optimize(), ptinfoDlg(), ptProgress(), HuginBase::Panorama::setOptimizeVector(), and Parameters::verbose.
Referenced by main2().
int optVis | ( | double * | p, |
double * | x, | ||
int | m, | ||
int | n, | ||
int | iter, | ||
double | sqerror, | ||
void * | data | ||
) |
Definition at line 330 of file tca_correct.cpp.
Referenced by optimize_new().
void print_result | ( | HuginBase::Panorama & | pano | ) |
Definition at line 725 of file tca_correct.cpp.
References Parameters::basename, HuginBase::LensDB::LensDB::Clean(), HuginBase::SrcPanoImage::getDBLensName(), HuginBase::LensDB::LensDB::GetSingleton(), HuginBase::Panorama::getSrcImage(), vigra_ext::pow(), HuginBase::SrcPanoImage::readEXIF(), hugin_utils::roundi(), Parameters::saveDB, HuginBase::LensDB::LensDB::SaveTCA(), shift, and hugin_utils::StrTrim().
Referenced by main2().
int processImg | ( | const char * | filename | ) |
Definition at line 568 of file tca_correct.cpp.
References HuginBase::Panorama::addImage(), Parameters::blue_name, createCtrlPoints(), vigra_ext::destImage(), HuginBase::StandardImageVariableGroups::getLenses(), Parameters::green_name, Parameters::grid, HuginBase::PanoramaOptions::huberSigma, vigra::importImageAlpha(), main2(), Parameters::nPoints, HuginBase::PanoramaOptions::outputFormat, HuginBase::BaseSrcPanoImage::RECTILINEAR, HuginBase::PanoramaOptions::RECTILINEAR, Parameters::red_name, Parameters::scale, HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), HuginBase::Panorama::setOptions(), HuginBase::PanoramaOptions::setProjection(), HuginBase::SrcPanoImage::setSize(), HuginBase::PanoramaOptions::setWidth(), HuginBase::ImageVariableGroup::switchParts(), HuginBase::PanoramaOptions::TIFF_m, HuginBase::PanoramaOptions::tiff_saveROI, HuginBase::ImageVariableGroup::unlinkVariablePart(), and HuginBase::ConstImageVariableGroup::updatePartNumbers().
int processPTO | ( | const char * | filename | ) |
Definition at line 691 of file tca_correct.cpp.
References hugin_utils::getPathPrefix(), main2(), and HuginBase::Panorama::ReadPTOFile().
Referenced by main().
|
static |
Definition at line 228 of file tca_correct.cpp.
Referenced by optimize_old().
|
static |
Definition at line 224 of file tca_correct.cpp.
Referenced by optimize_old().
void resetValues | ( | HuginBase::Panorama & | pano | ) |
Definition at line 704 of file tca_correct.cpp.
References HuginBase::Panorama::getSrcImage(), and HuginBase::Panorama::setSrcImage().
Referenced by main2().
|
static |
Definition at line 403 of file tca_correct.cpp.
References hugin_utils::GetHuginVersion().
|
inline |
Definition at line 251 of file tca_correct.cpp.
Referenced by optGetError().
Parameters g_param |
Definition at line 104 of file tca_correct.cpp.
|
static |
Definition at line 439 of file tca_correct.cpp.