Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
image_variables.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
35 /* This is free software; you can redistribute it and/or
36  * modify it under the terms of the GNU General Public
37  * License as published by the Free Software Foundation; either
38  * version 2 of the License, or (at your option) any later version.
39  *
40  * This software is distributed in the hope that it will be useful,
41  * but WITHOUT ANY WARRANTY; without even the implied warranty of
42  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
43  * Lesser General Public License for more details.
44  *
45  * You should have received a copy of the GNU General Public
46  * License along with this software. If not, see
47  * <http://www.gnu.org/licenses/>.
48  *
49  */
50 
51 /* Hmmm... I'ld like commas in template arguments, but < and > aren't real
52  * brackets so the template arguments will be interprated as separate macro
53  * arguments instead.
54  * Solution: Have an object in ImageVariableTranslate.h which handles all the
55  * pto conversion code. We can generate the code in SrcPanoImg.h automatically
56  * as ImageVariableTranslate.h typedefs PTOVariableConverterFor[name] for each
57  * variable.
58  * So we don't have a parameter that specifies the codes to use in a PTO file.
59  */
60 
61 // file variables
62 image_variable( Filename, std::string, "" )
63 image_variable( Size, vigra::Size2D , vigra::Size2D(0,0) )
64 // projection variables
65 image_variable( Projection, HuginBase::BaseSrcPanoImage::Projection, RECTILINEAR )
66 image_variable( HFOV, double, 50.0 )
67 image_variable( CropFactor, double, 0.0 )
68 
69 // colour response variables
70 image_variable( ResponseType, HuginBase::BaseSrcPanoImage::ResponseType, RESPONSE_EMOR )
71 image_variable( EMoRParams, std::vector<float>, std::vector<float>(5, 0.0f) )
72 image_variable( ExposureValue, double, 0.0 )
73 image_variable( Gamma, double, 1.0 )
74 image_variable( WhiteBalanceRed, double, 1.0 )
75 image_variable( WhiteBalanceBlue, double, 1.0 )
76 
77 // orientation in degrees
78 image_variable( Roll, double , 0.0 )
79 image_variable( Pitch, double , 0.0 )
80 image_variable( Yaw, double, 0.0 )
81 
82 image_variable( X, double , 0.0 )
83 image_variable( Y, double , 0.0 )
84 image_variable( Z, double, 0.0 )
85 
86 image_variable( TranslationPlaneYaw, double, 0.0)
87 image_variable( TranslationPlanePitch, double, 0.0)
88 // stack information
89 // Currently only the link information is used, the value means nothing.
90 image_variable( Stack, double, 0.0 )
91 
92 // radial lens distortion
93 image_variable( RadialDistortion, std::vector<double>, std::vector<double>({ 0.0, 0.0, 0.0, 1.0 }))
94 
95 // radial lens distortion (red, blue channel), for TCA correction
96 image_variable( RadialDistortionRed, std::vector<double>, std::vector<double>({ 0.0, 0.0, 0.0, 1.0 }))
97 image_variable( RadialDistortionBlue, std::vector<double>, std::vector<double>({ 0.0, 0.0, 0.0, 1.0 }))
98 
99 // Center shift
101 
102 // shear
103 image_variable( Shear, hugin_utils::FDiff2D, hugin_utils::FDiff2D(0, 0) )
104 
105 // crop description
106 image_variable( CropMode, HuginBase::BaseSrcPanoImage::CropMode, NO_CROP )
107 image_variable( CropRect, vigra::Rect2D, vigra::Rect2D(0, 0, 0, 0) )
108 image_variable( AutoCenterCrop, bool, true )
109 
110 // vignetting correction
111 image_variable( VigCorrMode, int, VIGCORR_RADIAL|VIGCORR_DIV )
112 
113 // coefficients for vignetting correction (even degrees: 0,2,4,6, ...)
114 image_variable( FlatfieldFilename, std::string, "" )
115 image_variable(RadialVigCorrCoeff, std::vector<double>, std::vector<double>({ 1.0, 0.0, 0.0, 0.0 }))
117 
118 // linear pixel transform
119 // (doesn't seem to be used, removing with #if 0)
120 #if 0
121 image_variable( ka, std::vector<double>, , )
122 image_variable( kb, std::vector<double>, , )
123 #endif
124 
125 // store camera information from exif tags...
126 image_variable( ExifModel, std::string, "" )
127 image_variable( ExifMake, std::string, "" )
128 image_variable( ExifLens, std::string, "" )
129 image_variable( ExifFocalLength, double, 0.0 )
130 image_variable( ExifOrientation, double, 0.0 )
131 image_variable( ExifAperture, double, 0.0 )
132 image_variable( ExifISO, double, 0.0 )
133 image_variable( ExifDistance, double, 0.0 )
134 image_variable( ExifFocalLength35, double, 0.0)
135 image_variable( ExifCropFactor, double, 0.0)
136 image_variable( ExifExposureTime, double, 0.0)
137 image_variable( ExifDate, std::string, "")
138 image_variable( ExifExposureMode, int, 0.0)
139 image_variable( ExifRedBalance, double, 1.0)
140 image_variable( ExifBlueBalance, double, 1.0)
141 image_variable( FileMetadata, HuginBase::FileMetaData, HuginBase::FileMetaData())
142 
143 #if 0
144 //
145 // panotools options, currently not used
146 //
147 // width of feather for stitching.
148 image_variable( FeatherWidth, unsigned int, 10 )
149 // Morph-to-fit using control points.
150 image_variable( Morph, bool, false )
151 #endif
152 
153 // mask handling
154 // Masks is list of loaded or created textures
156 // ActiveMasks contains list of all negative masks, which should be applied to
157 // a given image, this is used to propagate positive masks
158 image_variable( ActiveMasks, HuginBase::MaskPolygonVector, HuginBase::MaskPolygonVector())
159 
160 // If the image is selected to be used in the preview and for optimisation.
161 image_variable( Active, bool, true )
162 
std::string FlatfieldFilename
double ExifOrientation
double ExifCropFactor
bool AutoCenterCrop
double ExifFocalLength
std::vector< float > EMoRParams
double Gamma
double X
double CropFactor
HuginBase::BaseSrcPanoImage::ResponseType ResponseType
hugin_utils::FDiff2D RadialVigCorrCenterShift
std::vector< double > RadialVigCorrCoeff
std::string ExifLens
std::vector< double > RadialDistortion
double WhiteBalanceBlue
std::string Filename
double TranslationPlanePitch
bool Active
double ExifDistance
std::string ExifMake
double HFOV
double TranslationPlaneYaw
std::string ExifModel
double ExifFocalLength35
int ExifExposureMode
vigra::Size2D Size
std::map< std::string, std::string > FileMetaData
typedef for general map for storing metadata in files
Definition: SrcPanoImage.h:55
double WhiteBalanceRed
double Yaw
hugin_utils::FDiff2D Shear
TDiff2D< double > FDiff2D
Definition: hugin_math.h:150
double ExifRedBalance
HuginBase::MaskPolygonVector ActiveMasks
HuginBase::MaskPolygonVector Masks
std::vector< MaskPolygon > MaskPolygonVector
Definition: Mask.h:147
double ExifAperture
hugin_utils::FDiff2D RadialDistortionCenterShift
double Y
int VigCorrMode
std::vector< double > RadialDistortionRed
double Z
double Roll
double ExifBlueBalance
std::string ExifDate
HuginBase::BaseSrcPanoImage::Projection Projection
HuginBase::BaseSrcPanoImage::CropMode CropMode
vigra::Rect2D CropRect
double ExifISO
std::vector< double > RadialDistortionBlue
HuginBase::FileMetaData FileMetadata
double Stack
double ExposureValue
double ExifExposureTime
double Pitch