34 static void usage(
const char* name)
36 std::cout << name <<
": merges several project files" << std::endl
39 <<
"Usage: " << name <<
" [options] input.pto input2.pto ..." << std::endl
41 <<
" Options:" << std::endl
42 <<
" -o, --output=file.pto Output Hugin PTO file." << std::endl
43 <<
" Default: <filename>_merge.pto" << std::endl
44 <<
" -h, --help Shows this help" << std::endl
48 int main(
int argc,
char* argv[])
51 const char* optstring =
"o:h";
53 static struct option longOptions[] =
55 {
"output", required_argument, NULL,
'o' },
56 {
"help", no_argument, NULL,
'h' },
62 while ((c = getopt_long (argc, argv, optstring, longOptions,
nullptr)) != -1)
83 if (argc - optind < 2)
85 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": at least 2 project files needed" << std::endl << std::endl;
89 std::string input=argv[optind];
101 const std::string input2=argv[optind];
122 std::cout << std::endl <<
"Written project file " << output << std::endl;
std::string GetOutputFilename(const std::string &out, const std::string &in, const std::string &suffix)
construct output filename, if ouput is known return this value otherwise use the input filename and a...
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
std::size_t getNrOfImages() const
number of images.
bool ReadPTOFile(const std::string &filename, const std::string &prefix="")
read pto file from the given filename into Panorama object it does some checks on the file and issues...
bool readEXIF()
try to fill out information about the image, by examining the exif data
std::string GetHuginVersion()
return a string with version numbers
bool WritePTOFile(const std::string &filename, const std::string &prefix="")
write data to given pto file
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
void setSrcImage(unsigned int nr, const SrcPanoImage &img)
set input image parameters
All variables of a source image.
void mergePanorama(const Panorama &newPano)
merges the panorama with the given pano
std::string stripPath(const std::string &filename)
remove the path of a filename (mainly useful for gui display of filenames)
int main(int argc, char *argv[])