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
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
void SetCompression (vigra::ImageExportInfo &output, const std::string &compression)
 set compression for jpeg or tiff
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
static void usage (const char *name)
 prints help screen
template<class ImageType, class MaskType>
bool ResaveImage (const vigra::ImageImportInfo &importInfo, vigra::ImageExportInfo &exportInfo)
 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
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 cout, vigra_ext::destImage(), vigra::importImageAlpha(), vigra_ext::MergeImages(), SaveFinalImage(), and SetCompression().

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

Definition at line 235 of file verdandi.cpp.

References cerr, cout, hugin_utils::EnforceExtension(), hugin_utils::FileExists(), hugin_utils::getExtension(), hugin_utils::IsFileTypeSupported(), SetCompression(), hugin_utils::stripPath(), hugin_utils::tolower(), hugin_utils::toupper(), and usage().

template<class ImageType, class MaskType>
bool ResaveImage ( const vigra::ImageImportInfo &  importInfo,
vigra::ImageExportInfo &  exportInfo 
)

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 cerr, vigra_ext::destImage(), vigra_ext::destImageRange(), vigra::importImageAlpha(), celeste::max(), and SaveFinalImage().

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 cerr, 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 cerr, cout, 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 cout, and hugin_utils::GetHuginVersion().


Generated on 23 Jan 2018 for Hugintrunk by  doxygen 1.4.7