Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
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 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
 
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

◆ LoadAndMergeImages()

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::importImageAlpha(), vigra_ext::MergeImages(), SaveFinalImage(), SetCompression(), and threshold().

◆ main()

int main ( int  argc,
char argv[] 
)

◆ ResaveImageFill()

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::importImageAlpha(), vigra_ext::PoissonBlend(), SaveFinalImage(), threshold(), and vigra::omp::transformImage().

◆ 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 SaveImage(), and threshold().

Referenced by LoadAndMergeImages(), and ResaveImageFill().

◆ 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(), and threshold().

Referenced by SaveFinalImage().

◆ SetCompression()

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(), threshold(), and hugin_utils::toupper().

Referenced by LoadAndMergeImages(), and main().

◆ usage()

static void usage ( const char name)
static

prints help screen

Definition at line 183 of file verdandi.cpp.

References hugin_utils::GetHuginVersion().