Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
verdandi.cpp File Reference

program to stitch images using the watershed algorithm More...

#include <stdio.h>
#include <iostream>
#include <getopt.h>
#include <vigra_ext/impexalpha.hxx>
#include <vigra_ext/StitchWatershed.h>
#include <vigra_ext/utils.h>
#include <hugin_utils/utils.h>
#include <hugin_utils/stl_utils.h>
Include dependency graph for verdandi.cpp:

Go to the source code of this file.

Functions

template<class ImageType , class MaskType >
bool SaveImage (ImageType &image, MaskType &mask, vigra::ImageExportInfo &exportImageInfo, std::string filetype, std::string pixelType, const vigra::Rect2D &roi, const int inputNumberBands)
 save image, when possible with alpha channel, take care of formats which does not support alpha channels More...
 
template<class ImageType , class MaskType >
bool SaveFinalImage (ImageType &image, MaskType &mask, const std::string &inputPixelType, const int inputNumBands, vigra::ImageExportInfo &output, const vigra::Rect2D &roi)
 save final image, take care of some supported pixel types and convert when necessary to smaller pixel type More...
 
void SetCompression (vigra::ImageExportInfo &output, const std::string &compression)
 set compression for jpeg or tiff More...
 
template<class ImageType >
bool LoadAndMergeImages (std::vector< vigra::ImageImportInfo > imageInfos, const std::string &filename, const std::string &compression, const bool wrap, const bool hardSeam, const bool useBigTiff)
 loads image one by one and merge with all previouly loaded images, saves the final results More...
 
static void usage (const char *name)
 prints help screen More...
 
template<class ImageType , class MaskType >
bool ResaveImageFill (const vigra::ImageImportInfo &importInfo, vigra::ImageExportInfo &exportInfo, bool fillEdges, bool doWrap)
 resave a single image LoadAndMergeImage would require the full canvas size for loading, so using this specialized version which is using the cropped intermediates images More...
 
int main (int argc, char *argv[])
 

Detailed Description

program to stitch images using the watershed algorithm

Author
T. Modes

Definition in file verdandi.cpp.

Function Documentation

template<class ImageType >
bool LoadAndMergeImages ( std::vector< vigra::ImageImportInfo >  imageInfos,
const std::string &  filename,
const std::string &  compression,
const bool  wrap,
const bool  hardSeam,
const bool  useBigTiff 
)

loads image one by one and merge with all previouly loaded images, saves the final results

Definition at line 137 of file verdandi.cpp.

References vigra_ext::destImage(), vigra::importImageAlpha(), vigra_ext::MergeImages(), SaveFinalImage(), and SetCompression().

int main ( int  argc,
char *  argv[] 
)
template<class ImageType , class MaskType >
bool ResaveImageFill ( const vigra::ImageImportInfo &  importInfo,
vigra::ImageExportInfo &  exportInfo,
bool  fillEdges,
bool  doWrap 
)

resave a single image LoadAndMergeImage would require the full canvas size for loading, so using this specialized version which is using the cropped intermediates images

Definition at line 206 of file verdandi.cpp.

References vigra_ext::destImage(), vigra_ext::destImageRange(), vigra::importImageAlpha(), celeste::max(), celeste::min(), vigra_ext::PoissonBlend(), SaveFinalImage(), vigra_ext::srcImageRange(), and vigra::omp::transformImage().

template<class ImageType , class MaskType >
bool SaveFinalImage ( ImageType image,
MaskType &  mask,
const std::string &  inputPixelType,
const int  inputNumBands,
vigra::ImageExportInfo &  output,
const vigra::Rect2D &  roi 
)

save final image, take care of some supported pixel types and convert when necessary to smaller pixel type

Definition at line 84 of file verdandi.cpp.

References celeste::max(), and SaveImage().

template<class ImageType , class MaskType >
bool SaveImage ( ImageType image,
MaskType &  mask,
vigra::ImageExportInfo &  exportImageInfo,
std::string  filetype,
std::string  pixelType,
const vigra::Rect2D &  roi,
const int  inputNumberBands 
)

save image, when possible with alpha channel, take care of formats which does not support alpha channels

Definition at line 38 of file verdandi.cpp.

References vigra::exportImageAlpha(), vigra_ext::srcImage(), and vigra_ext::srcImageRange().

void SetCompression ( vigra::ImageExportInfo &  output,
const std::string &  compression 
)

set compression for jpeg or tiff

Definition at line 119 of file verdandi.cpp.

References hugin_utils::getExtension(), and hugin_utils::toupper().

static void usage ( const char *  name)
static

prints help screen

Definition at line 183 of file verdandi.cpp.

References hugin_utils::GetHuginVersion().