46 static void usage(
const char* name)
48 std::cout << name <<
": change output parameters of project file" << std::endl
51 <<
"Usage: " << name <<
" [options] input.pto" << std::endl
53 <<
" Options:" << std::endl
54 <<
" -o, --output=file.pto Output Hugin PTO file. Default: <filename>_mod.pto" << std::endl
55 <<
" -p, --projection=x Sets the output projection to number x" << std::endl
56 <<
" --projection-parameter=x Sets the parameter of the projection" << std::endl
57 <<
" (Several parameters are separated by"<<std::endl
58 <<
" space or comma)" << std::endl
59 <<
" --fov=AUTO|HFOV|HFOVxVFOV Sets field of view" << std::endl
60 <<
" AUTO: calculates optimal fov" << std::endl
61 <<
" HFOV|HFOVxVFOV: set to given fov" << std::endl
62 <<
" -s, --straighten Straightens the panorama" << std::endl
63 <<
" -c, --center Centers the panorama" << std::endl
64 <<
" --canvas=AUTO|num%|WIDTHxHEIGHT Sets the output canvas size" << std::endl
65 <<
" AUTO: calculate optimal canvas size" << std::endl
66 <<
" num%: scales the optimal size by given percent" << std::endl
67 <<
" WIDTHxHEIGHT: set to given size" << std::endl
68 <<
" --crop=AUTO|AUTOHDR|AUTOOUTSIDE|left,right,top,bottom|left,right,top,bottom%" << std::endl
69 <<
" Sets the crop rectangle" << std::endl
70 <<
" AUTO: autocrop panorama" << std::endl
71 <<
" AUTOHDR: autocrop HDR panorama" << std::endl
72 <<
" AUTOOUTSIDE: autocrop outside of all images" << std::endl
73 <<
" left,right,top,bottom: to given size" << std::endl
74 <<
" left,right,top,bottom%: to size relative to canvas" << std::endl
75 <<
" --output-exposure=AUTO|num Sets the output exposure value to mean" << std::endl
76 <<
" exposure (AUTO) or to given value" << std::endl
77 <<
" Prefix number with r for relativ change" << std::endl
78 <<
" --output-range-compression=num Set range compression" << std::endl
79 <<
" Value should be a real in range 0..20" << std::endl
80 <<
" --output-cropped-tiff Output cropped tiffs as intermediate images" << std::endl
81 <<
" --output-uncropped-tiff Output uncropped tiffs as intermediate images" << std::endl
82 <<
" --output-type=str Sets the type of output" << std::endl
83 <<
" Valid items are" << std::endl
84 <<
" NORMAL|N: normal panorama" << std::endl
85 <<
" STACKSFUSEDBLENDED|BF: LDR panorama with" << std::endl
86 <<
" blended stacks" << std::endl
87 <<
" EXPOSURELAYERSFUSED|FB: LDR panorama with" << std::endl
88 <<
" fused exposure layers (any arrangement)" << std::endl
89 <<
" HDR: HDR panorama" << std::endl
90 <<
" REMAP: remapped images with corrected exposure" << std::endl
91 <<
" REMAPORIG: remapped images with" << std::endl
92 <<
" uncorrected exposure" << std::endl
93 <<
" HDRREMAP: remapped images in linear color space" << std::endl
94 <<
" FUSEDSTACKS: exposure fused stacks" << std::endl
95 <<
" HDRSTACKS: HDR stacks" << std::endl
96 <<
" EXPOSURELAYERS: blended exposure layers" << std::endl
97 <<
" and separated by a comma." << std::endl
98 <<
" --ldr-file=JPG|TIF|PNG Sets the filetype for LDR panorama output" << std::endl
99 <<
" --ldr-compression=str Sets the compression for LDR panorama output" << std::endl
100 <<
" For TIF: NONE|PACKBITS|LZW|DEFLATE" << std::endl
101 <<
" For JPEG: quality as number" << std::endl
102 <<
" --hdr-file=EXR|TIF Sets the filetype for HDR panorama output" << std::endl
103 <<
" --hdr-compression=str Sets the compression for HDR panorama output" << std::endl
104 <<
" For TIF: NONE|PACKBITS|LZW|DEFLATE" << std::endl
105 <<
" --blender=ENBLEND|INTERNAL Sets the blender to be used at stitching" << std::endl
106 <<
" stage." << std::endl
107 <<
" --blender-args=str Sets the arguments for the blender" << std::endl
108 <<
" --fusion-args=str Sets the arguments for the fusion program" << std::endl
109 <<
" --hdrmerge-args=str Setst the arguments for hdrmerge" << std::endl
110 <<
" --rotate=yaw,pitch,roll Rotates the whole panorama with the given angles" << std::endl
111 <<
" --translate=x,y,z Translate the whole panorama with the given values" << std::endl
112 <<
" --interpolation=int Sets the interpolation method" << std::endl
113 <<
" --ini=FILE Read the settings from the given FILE and apply it" << std::endl
114 <<
" --template=TEMPLATE Read the panorama options from the given TEMPLATE" << std::endl
115 <<
" and apply it" << std::endl
116 <<
" -h, --help Shows this help" << std::endl
120 int main(
int argc,
char* argv[])
123 const char* optstring =
"o:p:sch";
133 SWITCH_RANGE_COMPRESSION,
137 SWITCH_LDRCOMPRESSION,
139 SWITCH_HDRCOMPRESSION,
141 SWITCH_UNCROPPED_TIFF,
144 SWITCH_HDRMERGE_ARGS,
145 SWITCH_PROJECTION_PARAMETER,
146 SWITCH_INTERPOLATION,
150 static struct option longOptions[] =
152 {
"output", required_argument, NULL,
'o' },
153 {
"projection", required_argument, NULL,
'p' },
154 {
"projection-parameter", required_argument, NULL, SWITCH_PROJECTION_PARAMETER },
155 {
"fov", required_argument, NULL, SWITCH_FOV },
156 {
"straighten", no_argument, NULL,
's' },
157 {
"center", no_argument, NULL,
'c' },
158 {
"canvas", required_argument, NULL, SWITCH_CANVAS },
159 {
"crop", required_argument, NULL, SWITCH_CROP },
160 {
"output-cropped-tiff", no_argument, NULL, SWITCH_CROPPED_TIFF },
161 {
"output-uncropped-tiff", no_argument, NULL, SWITCH_UNCROPPED_TIFF },
162 {
"output-exposure", required_argument, NULL, SWITCH_EXPOSURE },
163 {
"output-range-compression", required_argument, NULL, SWITCH_RANGE_COMPRESSION },
164 {
"output-type", required_argument, NULL, SWITCH_OUTPUT_TYPE },
165 {
"blender", required_argument, NULL, SWITCH_BLENDER },
166 {
"blender-args", required_argument, NULL, SWITCH_BLENDER_ARGS },
167 {
"fusion-args", required_argument, NULL, SWITCH_FUSION_ARGS },
168 {
"hdrmerge-args", required_argument, NULL, SWITCH_HDRMERGE_ARGS },
169 {
"ldr-file", required_argument,NULL, SWITCH_LDRFILETYPE },
170 {
"ldr-compression", required_argument, NULL, SWITCH_LDRCOMPRESSION },
171 {
"hdr-file", required_argument, NULL, SWITCH_HDRFILETYPE },
172 {
"hdr-compression", required_argument, NULL, SWITCH_HDRCOMPRESSION },
173 {
"rotate", required_argument, NULL, SWITCH_ROTATE },
174 {
"translate", required_argument, NULL, SWITCH_TRANSLATE },
175 {
"interpolation", required_argument, NULL, SWITCH_INTERPOLATION},
176 {
"ini", required_argument, NULL, SWITCH_INI_FILE },
177 {
"template", required_argument, NULL, SWITCH_TEMPLATE },
178 {
"help", no_argument, NULL,
'h' },
183 std::vector<double> projParameter;
189 int outputCroppedTiff=-1;
190 vigra::Rect2D newROI(0,0,0,0);
194 bool doStraighten=
false;
196 bool doOptimalSize=
false;
198 { NONE, AUTO, AUTOHDR, AUTOOUTSIDE};
199 AutoCropMode doAutocrop=AutoCropMode::NONE;
207 double outputExposure = -1000;
208 double outputRangeCompression = -1;
209 bool relativeExposure =
false;
210 bool calcMeanExposure =
false;
211 std::string outputType;
212 std::string ldrfiletype;
213 std::string ldrcompression;
214 std::string hdrfiletype;
215 std::string hdrcompression;
219 #define EMPTYARG "(empty)"
224 std::string templateFile;
225 int interpolation = -1;
226 while ((c = getopt_long (argc, argv, optstring, longOptions,
nullptr)) != -1)
238 projection=atoi(optarg);
239 if((projection==0) && (strcmp(optarg,
"0")!=0))
244 if(projection>=panoProjectionFormatCount())
246 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": projection " << projection <<
" is an invalid projection number." << std::endl;
250 case SWITCH_PROJECTION_PARAMETER:
255 for(
const auto& p: parameter)
260 projParameter.push_back(d);
264 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Could not parse projection parameters \"" << optarg <<
"\"." << std::endl;
281 int n=sscanf(optarg,
"%lfx%lf", &hfov, &vfov);
333 int pos=param.find(
"%");
334 if(pos!=std::string::npos)
336 param=param.substr(0,pos);
337 scale=atoi(param.c_str());
348 int n=sscanf(optarg,
"%dx%d", &width, &height);
351 if(width>0 && height>0)
376 doAutocrop = AutoCropMode::AUTO;
380 if (param ==
"AUTOHDR")
382 doAutocrop = AutoCropMode::AUTOHDR;
386 if (param ==
"AUTOOUTSIDE")
388 doAutocrop = AutoCropMode::AUTOOUTSIDE;
392 const int pos = param.find(
"%");
393 if (pos != std::string::npos)
396 param = param.substr(0, pos);
397 double left, right, top, bottom;
398 const int n = sscanf(param.c_str(),
"%lf,%lf,%lf,%lf", &left, &right, &top, &bottom);
401 if (right > left && bottom > top && left >= 0.0 && top >= 0.0 && right <= 100.0 && bottom <= 100.0)
421 int left, right, top, bottom;
422 int n = sscanf(optarg,
"%d,%d,%d,%d", &left, &right, &top, &bottom);
425 if (right > left && bottom > top && left >= 0 && top >= 0)
427 newROI.setUpperLeft(vigra::Point2D(left, top));
428 newROI.setLowerRight(vigra::Point2D(right, bottom));
446 case SWITCH_CROPPED_TIFF:
447 outputCroppedTiff = 1;
449 case SWITCH_UNCROPPED_TIFF:
450 outputCroppedTiff = 0;
452 case SWITCH_EXPOSURE:
457 calcMeanExposure =
true;
464 relativeExposure = (param[0] ==
'R');
465 if (relativeExposure)
469 int n = sscanf(param.c_str(),
"%lf", &outputExposure);
483 case SWITCH_RANGE_COMPRESSION:
486 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Could not parse output range compression (" << optarg <<
")." << std::endl;
489 if (outputRangeCompression < 0.0 || outputRangeCompression > 20.0)
491 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": range compression must be a real between 0 and 20." << std::endl;
495 case SWITCH_OUTPUT_TYPE:
496 if (!outputType.empty())
498 outputType.append(
",");
500 outputType.append(optarg);
505 case SWITCH_LDRFILETYPE:
508 case SWITCH_LDRCOMPRESSION:
511 case SWITCH_HDRFILETYPE:
514 case SWITCH_HDRCOMPRESSION:
517 case SWITCH_BLENDER_ARGS:
518 blenderArgs = optarg;
520 case SWITCH_FUSION_ARGS:
523 case SWITCH_HDRMERGE_ARGS:
524 hdrMergeArgs = optarg;
528 int n=sscanf(optarg,
"%lf,%lf,%lf", &yaw, &pitch, &roll);
531 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Could not parse rotate angles values. Given: \"" << optarg <<
"\"" << std::endl;
536 case SWITCH_TRANSLATE:
538 int n=sscanf(optarg,
"%lf,%lf,%lf", &x, &y, &z);
541 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Could not parse translation values. Given: \"" << optarg <<
"\"" << std::endl;
546 case SWITCH_INTERPOLATION:
549 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Could not parse interpolation value. Given: \"" << optarg <<
"\"" << std::endl;
554 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Interpolator " << interpolation <<
" is not valid." << std::endl;
558 case SWITCH_INI_FILE:
566 case SWITCH_TEMPLATE:
567 templateFile = optarg;
570 std::cerr <<
hugin_utils::stripPath(argv[0]) <<
": Template file " << templateFile <<
" not found." << std::endl;
586 if (argc - optind != 1)
588 if (argc - optind < 1)
610 std::string input=argv[optind];
623 pano_projection_features proj;
624 if (panoProjectionFeaturesQuery(projection, &proj))
626 std::cout <<
"Setting projection to " << proj.name << std::endl;
631 if (!projParameter.empty())
636 std::cout <<
"Warning: Given " << projParameter.size() <<
" projection parameters, but projection supports" << std::endl
637 <<
" only " << opt.
m_projFeatures.numberOfParameters <<
". Ignoring surplus parameters." << std::endl;
638 while (projParameter.size() > opt.
m_projFeatures.numberOfParameters)
640 projParameter.pop_back();
643 if (!projParameter.empty())
646 std::copy(projParameter.begin(), projParameter.end(), newProjParameters.begin());
650 auto it = newProjParameters.begin();
651 std::cout <<
"Setting projection parameters to: " << *it;
653 while (it != newProjParameters.end())
655 std::cout <<
", " << *it;
658 std::cout << std::endl;
663 std::cout <<
"Warning: Current projection does not support projection parameters." << std::endl;
667 if (outputExposure > -1000 || calcMeanExposure)
670 if (calcMeanExposure)
676 if (relativeExposure)
689 if (outputRangeCompression >= 0.0)
697 if (!outputType.empty())
718 for (
size_t i = 0; i < tokens.size(); i++)
721 if (s ==
"NORMAL" || s==
"N")
724 std::cout <<
"Activate output of normal panorama." << std::endl;
728 if (s ==
"STACKSFUSEDBLENDED" || s ==
"FB")
731 std::cout <<
"Activate output of LDR panorama: Exposure fused from stacks." << std::endl;
735 if (s ==
"EXPOSURELAYERSFUSED" || s ==
"BF")
738 std::cout <<
"Activate output of LDR panorama: Exposure fused from any arrangement." << std::endl;
745 std::cout <<
"Activate output of hdr panorama." << std::endl;
753 std::cout <<
"Activate output of remapped, exposure corrected images." << std::endl;
757 if (s ==
"REMAPORIG")
760 std::cout <<
"Activate output of remapped images with unmodified exposure." << std::endl;
767 std::cout <<
"Activate output of remapped hdr images." << std::endl;
772 if (s ==
"FUSEDSTACKS")
775 std::cout <<
"Activate output of exposure fused stacks." << std::endl;
779 if (s ==
"HDRSTACKS")
782 std::cout <<
"Activate output of HDR stacks." << std::endl;
787 if (s ==
"EXPOSURELAYERS")
790 std::cout <<
"Activate output of exposure layers." << std::endl;
794 std::cout <<
"Unknown parameter \"" << s <<
"\" found in --output-type." << std::endl
795 <<
"Ignoring this parameter." << std::endl;
803 std::cout <<
"No matching output type given. The whole output-type is ignored." << std::endl;
807 if (outputCroppedTiff != -1)
811 std::cout <<
"Setting support for cropped images: " << ((outputCroppedTiff == 1) ?
"yes" :
"no") << std::endl;
815 if (!blender.empty())
818 if (blender ==
"enblend")
821 std::cout <<
"Setting blender type to \"ENBLEND\"." << std::endl;
825 if (blender ==
"internal" || blender ==
"verdandi")
828 std::cout <<
"Setting blender type to \"INTERNAL\"." << std::endl;
832 std::cout <<
"Blender \"" << blender <<
"\" is not a valid blender ." << std::endl
833 <<
"Ignoring parameter." << std::endl;
845 std::cout <<
"Setting enblend arguments to " << blenderArgs << std::endl;
849 std::cout <<
"Setting verdandi arguments to " << blenderArgs << std::endl;
852 std::cout <<
"Unknown blender in pto file." << std::endl;
861 std::cout <<
"Setting enfuse arguments to " << fusionArgs << std::endl;
868 std::cout <<
"Setting hugin_hdrdmerge arguments to " << hdrMergeArgs << std::endl;
872 if (!ldrfiletype.empty())
875 if (ldrfiletype ==
"jpg" || ldrfiletype ==
"png" || ldrfiletype ==
"tif")
878 std::cout <<
"Setting ldr output to filetype \"" << ldrfiletype <<
"\"." << std::endl;
883 std::cout <<
"LDR file format \"" << ldrfiletype <<
"\" is not a valid LDR output filetype." << std::endl
884 <<
"Ignoring parameter." << std::endl;
888 if (!ldrcompression.empty())
893 if (ldrcompression ==
"NONE" || ldrcompression ==
"PACKBITS" || ldrcompression ==
"LZW" || ldrcompression ==
"DEFLATE")
896 std::cout <<
"Setting TIF compression to \"" << ldrcompression <<
"\"." << std::endl;
901 std::cout <<
"LDR compression \"" << ldrcompression <<
"\" is not a valid compression value for TIF files." << std::endl
902 <<
"Ignoring compression." << std::endl;
910 quality = atoi(ldrcompression.c_str());
913 if (quality>0 && quality <=100)
916 std::cout <<
"Setting JPEG quality to " << quality <<
"." << std::endl;
920 std::cout <<
"Given value for JPEG quality is outside the valid range 1..100." << std::endl
921 <<
"Ignoring value." << std::endl;
926 std::cout <<
"Could not parse \"" << ldrcompression <<
"\" as a valid JPEG quality number." << std::endl
927 <<
"Ignoring value." << std::endl;
934 std::cout <<
"Setting compression for PNG images is not supported." << std::endl;
939 std::cout <<
"Unknown image format" << std::endl;
946 if (!hdrfiletype.empty())
949 if (hdrfiletype ==
"exr" || hdrfiletype ==
"tif")
952 std::cout <<
"Setting hdr output to filetype \"" << hdrfiletype <<
"\"." << std::endl;
957 std::cout <<
"HDR file format \"" << hdrfiletype <<
"\" is not a valid HDR output filetype." << std::endl
958 <<
"Ignoring parameter." << std::endl;
962 if (!hdrcompression.empty())
967 if (hdrcompression ==
"NONE" || hdrcompression ==
"PACKBITS" || hdrcompression ==
"LZW" || hdrcompression ==
"DEFLATE")
970 std::cout <<
"Setting HDR-TIF compression to \"" << hdrcompression <<
"\"." << std::endl;
974 std::cout <<
"HDR compression \"" << hdrcompression <<
"\" is not a valid compression value for TIF files." << std::endl
975 <<
"Ignoring compression." << std::endl;
982 std::cout <<
"Setting compression for EXR images is not supported." << std::endl;
987 std::cout <<
"Unknown HDR image format" << std::endl;
993 if (std::abs(yaw) + std::abs(pitch) + std::abs(roll) > 0.0)
995 std::cout <<
"Rotate panorama (yaw=" << yaw <<
", pitch= " << pitch <<
", roll=" << roll <<
")" << std::endl;
999 if(std::abs(x) + std::abs(y) + std::abs(z) > 0.0)
1001 std::cout <<
"Translate panorama (x=" << x <<
", y=" << y <<
", z=" << z <<
")" << std::endl;
1007 std::cout <<
"Straighten panorama" << std::endl;
1014 std::cout <<
"Center panorama" << std::endl;
1020 std::cout <<
"Fit panorama field of view to best size" << std::endl;
1026 std::cout <<
"Setting field of view to " << opt.
getHFOV() <<
" x " << opt.
getVFOV() << std::endl;
1038 std::cout <<
"Setting field of view to " << opt.
getHFOV() <<
" x " << opt.
getVFOV() << std::endl;
1044 std::cout <<
"Calculate optimal size of panorama" << std::endl;
1048 std::cout <<
"Setting canvas size to " << opt.
getWidth() <<
" x " << opt.
getHeight() << std::endl;
1052 if(newWidth>0 && newHeight>0)
1057 std::cout <<
"Setting canvas size to " << opt.
getWidth() <<
" x " << opt.
getHeight() << std::endl;
1061 if (doAutocrop != AutoCropMode::NONE)
1063 std::cout <<
"Searching for best crop rectangle" << std::endl;
1066 if (doAutocrop == AutoCropMode::AUTOOUTSIDE)
1075 if (doAutocrop == AutoCropMode::AUTOHDR)
1087 std::cout <<
"Set crop size to " << roi.left() <<
"," << roi.top() <<
"," << roi.right() <<
"," << roi.bottom() << std::endl;
1092 std::cout <<
"Could not find best crop rectangle" << std::endl;
1096 if(newROI.right() != 0 && newROI.bottom() != 0)
1100 std::cout <<
"Set crop size to " << opt.
getROI().left() <<
"," << opt.
getROI().right() <<
"," << opt.
getROI().top() <<
"," << opt.
getROI().bottom() << std::endl;
1103 if (newRoiRelativeLeftTop.
x > -1 && newRoiRelativeRightBottom.
x > -1)
1106 opt.
setROI(vigra::Rect2D(
1107 opt.
getWidth() * newRoiRelativeLeftTop.
x / 100.0,
1108 opt.
getHeight() * newRoiRelativeLeftTop.
y / 100.0,
1109 opt.
getWidth() * newRoiRelativeRightBottom.
x / 100.0,
1110 opt.
getHeight() * newRoiRelativeRightBottom.
y / 100.0
1112 std::cout <<
"Set crop size to " << opt.
getROI().left() <<
"," << opt.
getROI().right() <<
"," << opt.
getROI().top() <<
"," << opt.
getROI().bottom() << std::endl;
1116 if (interpolation>=0)
1120 std::cout <<
"Set interpolation method to " << interpolation << std::endl;
1124 if (!iniFile.empty())
1126 std::cout <<
"Reading panorama options from " << iniFile << std::endl;
1131 if (!templateFile.empty())
1139 std::cout <<
"Applying settings from " << templateFile << std::endl;
1147 std::cout << std::endl <<
"Written output to " << output << std::endl;
PanoramaOptions::ProjectionFormat getProjection() const
std::vector< UIntSet > getHDRStacks(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output stacks
bool FileExists(const std::string &filename)
checks if file exists
Dummy progress display, without output.
declaration of functions to handle stacks and layers
double outputRangeCompression
void setHeight(unsigned int h)
set panorama height
pano_projection_features m_projFeatures
std::string StrTrim(const std::string &str)
remove trailing and leading white spaces and tabs
static double calcMeanExposure(const PanoramaData &pano)
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...
bool outputLDRLayers
save remapped layers (LDR)
bool fovCalcSupported(ProjectionFormat f) const
true, if FOV calcuations are supported for projection f
std::string outputImageTypeHDRCompression
bool outputHDRLayers
save remapped layers (HDR)
unsigned int getHeight() const
get panorama height
std::string enfuseOptions
HuginBase::PanoramaOptions ReadPanoramaOptionsFromIni(const std::string &iniFile, HuginBase::Panorama &pano)
read settings from given ini file and apply wished settings if they are applicable ...
void setProjectionParameters(const std::vector< double > ¶ms)
set the optional parameters (they need to be of the correct size)
virtual void run()
runs the algorithm.
std::string outputImageTypeCompression
std::string toupper(const std::string &s)
bool outputLDRExposureBlended
< save exposure fused stacks (no exposure adjustment)
void setStacks(std::vector< UIntSet > hdr_stacks)
sets the stack vector
const vigra::Rect2D & getROI() const
bool outputLDRBlended
save blended panorama (LDR)
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
vigra_ext::Interpolator interpolator
static double calcOptimalScale(PanoramaData &panorama)
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...
virtual vigra::Rect2D getResultOptimalROI()
return the ROI structure?, for now area
virtual double getResultHeight()
bool outputHDRBlended
save blended panorama (HDR)
TDiff2D< double > FDiff2D
bool stringToInt(const std::string &s, int &val)
convert string to integer value, returns true, if sucessful
bool stringToDouble(const STR &str_, double &dest)
convert a string to a double, ignore localisation.
void setROI(const vigra::Rect2D &val)
UIntSet getActiveImages() const
get active images
std::string tiffCompression
std::string verdandiOptions
bool outputLDRExposureLayers
save blended exposure layers, do not perform fusion (no exposure adjustment)
void setHFOV(double h, bool keepView=true)
set the horizontal field of view.
unsigned int getWidth() const
std::string enblendOptions
const PanoramaOptions & getOptions() const
returns the options for this panorama
virtual double getResultHorizontalFOV()
virtual vigra::Rect2D getResultOptimalROI()
returns the found crop rect
bool outputLDRExposureRemapped
save remapped layers (no exposure adjustment)
const std::vector< double > & getProjectionParameters() const
Get the optional projection parameters.
bool outputLDRExposureLayersFused
save blended exposure layers which are then fused (no exposure adjustment)
std::string outputImageType
std::string outputImageTypeHDR
std::string GetHuginVersion()
return a string with version numbers
read settings from ini file and apply only applicable values
bool WritePTOFile(const std::string &filename, const std::string &prefix="")
write data to given pto file
std::string hdrmergeOptions
void setOptions(const PanoramaOptions &opt)
set new output settings This is not used directly for optimizing/stiching, but it can be feed into ru...
ProjectionFormat
Projection of final panorama.
Interpolator
enum with all interpolation methods
std::vector< std::string > SplitString(const std::string &s, const std::string &sep)
split string s at given sep, returns vector of strings
void setProjection(ProjectionFormat f)
set the Projection format and adjust the hfov/vfov if nessecary
bool outputHDRStacks
save image stacks (HDR)
BlendingMechanism blendMode
std::string tolower(const std::string &s)
convert a string to lowercase
std::string stripPath(const std::string &filename)
remove the path of a filename (mainly useful for gui display of filenames)
void setWidth(unsigned int w, bool keepView=true)
set panorama width keep the HFOV, if keepView=true
double outputExposureValue
int main(int argc, char *argv[])