Hugin trunk 0.1
Loading...
Searching...
No Matches
LensTools.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
10/* This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This software is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public
21 * License along with this software. If not, see
22 * <http://www.gnu.org/licenses/>.
23 *
24 */
25
26#include "panoinc_WX.h"
27#include <wx/msgdlg.h>
28#include "panoinc.h"
29#include "LensTools.h"
31#include <algorithm>
34#include "base_wx/PanoCommand.h"
35#include "wxutils.h"
36
38{
39 list->Clear();
41 for (auto& lensInfo : lensInfoVector)
42 {
43 list->Append(lensInfo.name, (void*)lensInfo.id);
44 };
45 list->SetSelection(0);
46}
47
49{
50 // add all lens types to vector
54 lensInfo.name = _("Normal (rectilinear)");
55 lensInfoVector.push_back(lensInfo);
57 lensInfo.name = _("Panoramic (cylindrical)");
58 lensInfoVector.push_back(lensInfo);
60 lensInfo.name = _("Circular fisheye");
61 lensInfoVector.push_back(lensInfo);
63 lensInfo.name = _("Full frame fisheye");
64 lensInfoVector.push_back(lensInfo);
66 lensInfo.name = _("Equirectangular");
67 lensInfoVector.push_back(lensInfo);
69 lensInfo.name = _("Orthographic");
70 lensInfoVector.push_back(lensInfo);
72 lensInfo.name = _("Stereographic");
73 lensInfoVector.push_back(lensInfo);
75 lensInfo.name = _("Equisolid");
76 lensInfoVector.push_back(lensInfo);
78 lensInfo.name = _("Fisheye Thoby");
79 lensInfoVector.push_back(lensInfo);
80 return lensInfoVector;
81}
82
84{
85 list->Clear();
86 list->Append(_("enblend"), (void*)HuginBase::PanoramaOptions::ENBLEND_BLEND);
87 list->Append(_("builtin"), (void*)HuginBase::PanoramaOptions::INTERNAL_BLEND);
88 list->SetSelection(0);
89}
90
92{
93 list->Clear();
94 list->Append(_("Poly3 (Bicubic)"), (void*)vigra_ext::INTERP_CUBIC);
95 list->Append(_("Spline 16"), (void*)vigra_ext::INTERP_SPLINE_16);
96 list->Append(_("Spline 36"), (void*)vigra_ext::INTERP_SPLINE_36);
97 list->Append(_("Sinc 256"), (void*)vigra_ext::INTERP_SINC_256);
98 list->Append(_("Spline 64"), (void*)vigra_ext::INTERP_SPLINE_64);
99 list->Append(_("Bilinear"), (void*)vigra_ext::INTERP_BILINEAR);
100 list->Append(_("Nearest neighbor"), (void*)vigra_ext::INTERP_NEAREST_NEIGHBOUR);
101 list->Append(_("Sinc 1024"), (void*)vigra_ext::INTERP_SINC_1024);
102 list->Append(_("Nearest neighbor (Anti alias)"), (void*)vigra_ext::INTERP_AABOX);
103 list->Append(_("Bilinear (Anti alias)"), (void*)vigra_ext::INTERP_AATRIANGLE);
104 list->Append(_("Bicubic (Anti alias)"), (void*)vigra_ext::INTERP_AACUBIC);
105 list->Append(_("Sinc 256 (Anti alias)"), (void*)vigra_ext::INTERP_AALANCZOS);
106}
107
109{
110 for(unsigned int i=0;i<list->GetCount();i++)
111 {
112 if((size_t)list->GetClientData(i)==newValue)
113 {
114 list->SetSelection(i);
115 return;
116 };
117 };
118 list->SetSelection(0);
119};
120
122{
123 return (size_t)(list->GetClientData(list->GetSelection()));
124};
125
127{
128 wxString ps;
129 switch (img.getProjection())
130 {
131 case HuginBase::SrcPanoImage::RECTILINEAR: ps << _("Normal (rectilinear)"); break;
132 case HuginBase::SrcPanoImage::PANORAMIC: ps << _("Panoramic (cylindrical)"); break;
133 case HuginBase::SrcPanoImage::CIRCULAR_FISHEYE: ps << _("Circular fisheye"); break;
134 case HuginBase::SrcPanoImage::FULL_FRAME_FISHEYE: ps << _("Full frame fisheye"); break;
135 case HuginBase::SrcPanoImage::EQUIRECTANGULAR: ps << _("Equirectangular"); break;
136 case HuginBase::SrcPanoImage::FISHEYE_ORTHOGRAPHIC: ps << _("Orthographic"); break;
137 case HuginBase::SrcPanoImage::FISHEYE_STEREOGRAPHIC:ps << _("Stereographic"); break;
138 case HuginBase::SrcPanoImage::FISHEYE_EQUISOLID: ps << _("Equisolid"); break;
139 case HuginBase::SrcPanoImage::FISHEYE_THOBY: ps << _("Fisheye Thoby"); break;
140 }
141 return ps;
142};
143
145{
146 wxString s;
147 switch (img.getResponseType())
148 {
150 s = _("custom (EMoR)");
151 break;
153 s = _("Linear");
154 break;
155 default:
157 break;
158 };
159 return s;
160};
161
162void SaveLensParameters(const wxString filename, HuginBase::Panorama* pano, unsigned int imgNr)
163{
165 const HuginBase::Lens & lens = variable_groups.getLensForImage(imgNr);
166 const HuginBase::VariableMap & vars = pano->getImageVariables(imgNr);
167 // get the variable map
168 char * p = setlocale(LC_NUMERIC,NULL);
169 char * old_locale = strdup(p);
171 wxFileConfig cfg("hugin lens file",wxEmptyString,filename);
172 cfg.Write("Lens/image_width", (long) lens.getImageSize().x);
173 cfg.Write("Lens/image_height", (long) lens.getImageSize().y);
174 cfg.Write("Lens/type", (long) lens.getProjection());
175 cfg.Write("Lens/hfov", const_map_get(vars,"v").getValue());
176 cfg.Write("Lens/hfov_link", const_map_get(lens.variables,"v").isLinked() ? 1:0);
177 cfg.Write("Lens/crop", lens.getCropFactor());
178
179 // loop to save lens variables
180 const char ** varname = HuginBase::Lens::variableNames;
181 while (*varname)
182 {
183 //ignore hfov, hfov is separately handled by the code above
184 if (std::string(*varname) == "v")
185 {
186 varname++;
187 continue;
188 }
189 wxString key("Lens/");
190 key.append(wxString(*varname, wxConvLocal));
191 cfg.Write(key, const_map_get(vars,*varname).getValue());
192 key.append("_link");
193 cfg.Write(key, const_map_get(lens.variables,*varname).isLinked() ? 1:0);
194 varname++;
195 }
196
197 const HuginBase::SrcPanoImage & image = pano->getImage(imgNr);
198 cfg.Write("Lens/crop/enabled", image.getCropMode()==HuginBase::SrcPanoImage::NO_CROP ? 0l : 1l);
199 cfg.Write("Lens/crop/autoCenter", image.getAutoCenterCrop() ? 1l : 0l);
200 const vigra::Rect2D cropRect=image.getCropRect();
201 cfg.Write("Lens/crop/left", cropRect.left());
202 cfg.Write("Lens/crop/top", cropRect.top());
203 cfg.Write("Lens/crop/right", cropRect.right());
204 cfg.Write("Lens/crop/bottom", cropRect.bottom());
205
206 if (!image.getExifMake().empty() && !image.getExifModel().empty() && image.getExifFocalLength()>0)
207 {
208 // write exif data to ini file
209 cfg.Write("EXIF/CameraMake", wxString(image.getExifMake().c_str(), wxConvLocal));
210 cfg.Write("EXIF/CameraModel", wxString(image.getExifModel().c_str(), wxConvLocal));
211 cfg.Write("EXIF/FocalLength", image.getExifFocalLength());
212 cfg.Write("EXIF/Aperture", image.getExifAperture());
213 cfg.Write("EXIF/ISO", image.getExifISO());
214 cfg.Write("EXIF/CropFactor", image.getCropFactor());
215 cfg.Write("EXIF/Distance", image.getExifDistance());
216 }
217 cfg.Flush();
218
219 // reset locale
222};
223
225{
227 HuginBase::Lens lens=variable_groups.getLensForImage(*images.begin());
228 bool cropped=false;
229 bool autoCenterCrop=false;
230 vigra::Rect2D cropRect;
231 if (LoadLensParametersChoose(parent, lens, cropped, autoCenterCrop, cropRect))
232 {
233 // Merge the lens parameters with the image variable map.
234 HuginBase::VariableMapVector vars(images.size());
235 size_t i=0;
236 for(HuginBase::UIntSet::const_iterator it=images.begin();it!=images.end();++it,++i)
237 {
238 vars[i]=pano->getImageVariables(*it);
239 for (HuginBase::LensVarMap::iterator it2 = lens.variables.begin(); it2 != lens.variables.end(); ++it2)
240 {
241 if (it2->second.getName() == "Eev" || it2->second.getName() == "Er" || it2->second.getName() == "Eb")
242 {
243 continue;
244 };
245 vars[i].find(it2->first)->second.setValue(it2->second.getValue());
246 }
247 };
248
252 std::vector<PanoCommand::PanoCommand*> cmds;
253 // update links
254 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> linkedVariables;
255 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> unlinkedVariables;
256 for (HuginBase::LensVarMap::iterator it = lens.variables.begin(); it != lens.variables.end(); ++it)
257 {
258 if(it->second.getName()=="Eev" || it->second.getName() == "Er" || it->second.getName() == "Eb")
259 {
260 continue;
261 };
262#define image_variable( name, type, default_value ) \
263 if (HuginBase::PTOVariableConverterFor##name::checkApplicability(it->second.getName()))\
264 {\
265 if(it->second.isLinked())\
266 linkedVariables.insert(HuginBase::ImageVariableGroup::IVE_##name);\
267 else\
268 unlinkedVariables.insert(HuginBase::ImageVariableGroup::IVE_##name);\
269 }
271#undef image_variable
272 }
273 if (!linkedVariables.empty())
274 {
277 }
278 if (!unlinkedVariables.empty())
279 {
282 }
283 //update lens parameters
284 cmds.push_back(new PanoCommand::UpdateImagesVariablesCmd(*pano, images, vars));
285
286 // Set the lens projection type.
287 cmds.push_back(new PanoCommand::ChangeImageProjectionCmd(*pano, images, (HuginBase::SrcPanoImage::Projection) lens.getProjection()));
288 // update crop factor
289 cmds.push_back(new PanoCommand::ChangeImageCropFactorCmd(*pano,images,lens.getCropFactor()));
290 // update the crop rect
291 cmds.push_back(new PanoCommand::ChangeImageAutoCenterCropCmd(*pano,images,autoCenterCrop));
292 if(cropped)
293 {
294 cmds.push_back(new PanoCommand::ChangeImageCropRectCmd(*pano,images,cropRect));
295 }
296 else
297 {
298 cmds.push_back(new PanoCommand::ChangeImageCropModeCmd(*pano,images,HuginBase::BaseSrcPanoImage::NO_CROP));
299 };
301 return true;
302 }
303 else
304 {
305 return false;
306 };
307};
308
310 bool & cropped, bool & autoCenterCrop, vigra::Rect2D & cropRect)
311{
314 _("Load lens parameters"),
315 wxConfigBase::Get()->Read("/lensPath",wxEmptyString), wxEmptyString,
316 _("Lens Project Files (*.ini)|*.ini|All files (*.*)|*.*"),
318 dlg.SetDirectory(wxConfigBase::Get()->Read("/lensPath",wxEmptyString));
319 if (dlg.ShowModal() == wxID_OK)
320 {
321 fname = dlg.GetPath();
322 wxConfig::Get()->Write("/lensPath", dlg.GetDirectory()); // remember for later
323 // read with with standart C numeric format
324 char * p = setlocale(LC_NUMERIC,NULL);
325 char * old_locale = strdup(p);
327 {
328 wxFileConfig cfg("hugin lens file",wxEmptyString,fname);
329 long w=0;
330 cfg.Read("Lens/image_width", &w);
331 long h=0;
332 cfg.Read("Lens/image_height", &h);
333 if (w>0 && h>0) {
334 vigra::Size2D sz = lens.getImageSize();
335 if (w != sz.x || h != sz.y) {
336 std::cerr << "Image size: " << sz << " size in lens parameter file: " << w << "x" << h << std::endl;
337 if (hugin_utils::HuginMessageBox(_("Incompatible lens parameter file, image sizes do not match\nApply settings anyway?"),
339 {
342 return false;
343 }
344 }
345 } else {
346 // lens ini file didn't store the image size,
347 // assume everything is all right.
348 }
349 long integer=0;
350 if(cfg.Read("Lens/type", &integer))
351 {
353 };
354 double d=1;
355 if(cfg.Read("Lens/crop", &d))
356 {
357 lens.setCropFactor(d);
358 };
359 //special treatment for hfov, we are reading hfov and hfov_linked instead of v and v_linked
360 d=50;
361 if(cfg.Read("Lens/hfov", &d))
362 {
363 map_get(lens.variables,"v").setValue(d);
364 };
365 integer=1;
366 if(cfg.Read("Lens/hfov_linked", &integer))
367 {
368 map_get(lens.variables,"v").setLinked(integer != 0);
369 };
370 DEBUG_DEBUG("read lens hfov: " << d);
371
372 // loop to load lens variables
373 const char ** varname = HuginBase::Lens::variableNames;
374 while (*varname) {
375 wxString key("Lens/");
376 key.append(wxString(*varname, wxConvLocal));
377 d = 0;
378 if (cfg.Read(key,&d))
379 {
380 // only set value if variabe was found in the script
381 map_get(lens.variables, *varname).setValue(d);
382 integer = 1;
383 key.append("_link");
384 if(cfg.Read(key, &integer))
385 {
386 map_get(lens.variables, *varname).setLinked(integer != 0);
387 };
388 }
389 varname++;
390 }
391
392 // crop parameters
393 long v=0;
394 cfg.Read("Lens/crop/enabled", &v);
395 cropped=(v!=0);
396 if(cropped)
397 {
398 long left=0;
399 long top=0;
400 long right=0;
401 long bottom=0;
402 if(cfg.Read("Lens/crop/left", &left) && cfg.Read("Lens/crop/top", &top) &&
403 cfg.Read("Lens/crop/right", &right) && cfg.Read("Lens/crop/bottom", &bottom))
404 {
405 cropped=true;
406 cropRect=vigra::Rect2D(left,top,right,bottom);
407 }
408 else
409 {
410 cropped=false;
411 };
412 };
413 v=1;
414 if(cfg.Read("Lens/crop/autoCenter", &v))
415 {
416 autoCenterCrop=(v!=0);
417 };
418 }
419 // reset locale
422 return true;
423 }
424 else
425 {
426 return false;
427 };
428};
429
431{
432 if (images.size() == 1)
433 {
434 unsigned int imgNr = *(images.begin());
436 _("Save lens parameters file"),
437 wxConfigBase::Get()->Read("/lensPath",wxEmptyString), wxEmptyString,
438 _("Lens Project Files (*.ini)|*.ini|All files (*)|*"),
440 dlg.SetDirectory(wxConfigBase::Get()->Read("/lensPath",wxEmptyString));
441 if (dlg.ShowModal() == wxID_OK)
442 {
443 wxFileName filename(dlg.GetPath());
444 if(!filename.HasExt())
445 {
446 filename.SetExt("ini");
447 if (filename.Exists())
448 {
449 if (!hugin_utils::AskUserOverwrite(filename.GetFullPath(), _("Hugin"), wxGetActiveWindow()))
450 {
451 return;
452 }
453 }
454 }
455 wxConfig::Get()->Write("/lensPath", dlg.GetDirectory()); // remember for later
456 SaveLensParameters(filename.GetFullPath(),pano,imgNr);
457 }
458 }
459 else
460 {
461 wxLogError(_("Please select an image and try again"));
462 }
463}
464
466{
467 if (pano->getNrOfImages() < 2)
468 {
469 return true;
470 };
471 const size_t nrImages = pano->getNrOfImages();
472 bool stacksCorrectLinked = true;
473 for (size_t i = 0; i < nrImages - 1; ++i)
474 {
475 const HuginBase::SrcPanoImage& image1 = pano->getImage(i);
476 if (image1.YawisLinked())
477 {
478 for (size_t j = i + 1; j < nrImages && stacksCorrectLinked; ++j)
479 {
480 const HuginBase::SrcPanoImage& image2 = pano->getImage(j);
481 if (image1.YawisLinkedWith(image2))
482 {
484 image1.HFOVisLinkedWith(image2) &&
485 image1.RadialDistortionisLinkedWith(image2) &&
486 image1.RadialDistortionCenterShiftisLinkedWith(image2) &&
487 image1.ShearisLinkedWith(image2);
488 };
489 };
490 };
491 };
493 {
494 return true;
495 }
496 else
497 {
499 if (allowCancel)
500 {
501 flags = flags | wxCANCEL;
502 };
503 if (hugin_utils::HuginMessageBox(_("This project contains stacks with linked positions. But the lens parameters are not linked for these images.\nThis will result in unwanted results.\nPlease check and correct this before proceeding."),
504 _("Hugin"), flags, wxGetActiveWindow()) == wxOK)
505 {
506 return true;
507 }
508 else
509 {
510 return false;
511 };
512 };
513}
514
516{
518{
519 wxString s;
520 struct tm exifdatetime;
521 if (img->getExifDateTime(&exifdatetime) == 0)
522 {
524 s = s_datetime.Format();
525 }
526 else
527 {
528 s = wxString(img->getExifDate().c_str(), wxConvLocal);
529 }
530 return s;
531}
532
534{
535 wxString s;
536 if (img->getExifFocalLength() > 0.0)
537 {
538 if (img->getExifFocalLength35() > 0.0)
539 {
540 s = wxString::Format("%0.1f mm (%0.0f mm)", img->getExifFocalLength(), img->getExifFocalLength35());
541 }
542 else
543 {
544 s = wxString::Format("%0.1f mm", img->getExifFocalLength());
545 };
546 }
547 else
548 {
550 };
551 return s;
552};
553
555{
556 wxString s;
557 if (img->getExifAperture() > 0)
558 {
559 s = wxString::Format("F%.1f", img->getExifAperture());
560 }
561 else
562 {
564 };
565 return s;
566};
567
569{
570 wxString s;
571 const double exposureTime = img->getExifExposureTime();
572 if (exposureTime > 0.5)
573 {
574 if (exposureTime >= 1.0)
575 {
576 if (exposureTime >= 10.0)
577 {
578 s = wxString::Format("%3.0f s", exposureTime);
579 }
580 else
581 {
582 s = wxString::Format("%1.1f s", exposureTime);
583 }
584 }
585 else
586 {
587 s = wxString::Format("%1.2f s", exposureTime);
588 }
589 }
590 else
591 {
592 if (exposureTime > 1e-9)
593 {
594 s = wxString::Format("1/%0.0f s", 1.0 / exposureTime);
595 }
596 else
597 {
598 //Sanity
600 }
601 }
602 return s;
603};
604
606{
607 wxString s;
608 if (img->getExifISO() > 0)
609 {
610 s = wxString::Format("%0.0f", img->getExifISO());
611 }
612 else
613 {
615 };
616 return s;
617};
618
619};
620
621
622
Convenience functions for SrcPanoImage to use on the image variables.
The pano tools interpolators ported to vigra.
void FillBlenderList(wxControlWithItems *list)
Fills a wxControlWithItem with all possible blender options, the client data contains the associated ...
Definition LensTools.cpp:83
HuginLensTools::LensInfoVector GetLensProjectionList()
return a vector with all available projections
Definition LensTools.cpp:48
void SaveLensParameters(const wxString filename, HuginBase::Panorama *pano, unsigned int imgNr)
save the lens parameters of the image to a lens file named filename
void FillLensProjectionList(wxControlWithItems *list)
Fills a wxControlWithItem with all input projection formats, the client data contains the associated ...
Definition LensTools.cpp:37
bool CheckLensStacks(HuginBase::Panorama *pano, bool allowCancel)
check, if lens and stacks are correctly linked shows message box with short information if not
wxString getProjectionString(const HuginBase::SrcPanoImage &img)
Returns translated projection for given image.
void SaveLensParametersToIni(wxWindow *parent, HuginBase::Panorama *pano, const HuginBase::UIntSet images)
saves the lens parameters to ini files, provides all necessary dialogs
size_t GetSelectedValue(wxControlWithItems *list)
Returns the client value of the selected item from list.
bool ApplyLensParameters(wxWindow *parent, HuginBase::Panorama *pano, HuginBase::UIntSet images, PanoCommand::PanoCommand *&cmd)
applies lens parameter from user selected file to pano using GlobalCmdHist
void FillInterpolatorList(wxControlWithItems *list)
Fill a wxControlWithItem with all possible interpolators.
Definition LensTools.cpp:91
wxString getResponseString(const HuginBase::SrcPanoImage &img)
Returns translated response type for given SrcPanoImage.
void SelectListValue(wxControlWithItems *list, size_t newValue)
Selects the given value (stored in the client data) in the given list item.
bool LoadLensParametersChoose(wxWindow *parent, HuginBase::Lens &lens, bool &cropped, bool &autoCenterCrop, vigra::Rect2D &cropRect)
load lens parameters from lens ini file
some helper classes for graphes
Somewhere to specify what variables belong to what.
@ RESPONSE_LINEAR
linear response
@ RESPONSE_EMOR
empirical model of response
static const std::set< ConstImageVariableGroup::ImageVariableEnum > & getLensVariables()
Get the set of lens image variables.
vigra::Size2D getImageSize() const
get the image size, in pixels
Definition Lens.h:89
void setProjection(LensProjectionFormat l)
set projection type
Definition Lens.h:60
double getCropFactor() const
get crop factor, d35mm/dreal
Definition Lens.h:73
void setCropFactor(double newCropFactor)
sets the crop factor
Definition Lens.h:77
LensVarMap variables
Definition Lens.h:106
LensProjectionFormat getProjection() const
get projection type
Definition Lens.h:56
static const char * variableNames[]
Definition Lens.h:110
Model for a panorama.
Definition Panorama.h:153
const VariableMap getImageVariables(unsigned int imgNr) const
Get the variables of an image.
Definition Panorama.cpp:128
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
Definition Panorama.h:211
std::size_t getNrOfImages() const
number of images.
Definition Panorama.h:205
All variables of a source image.
const int getExifDateTime(struct tm *datetime) const
try to convert Exif date time string to struct tm
Change the linking of some variables across parts of an ImageVariableGroup containing some specified ...
PanoCommand to combine other PanoCommands.
Definition PanoCommand.h:40
Base class for all panorama commands.
Definition Command.h:39
update variables of a group of images
static uint16_t flags
#define DEBUG_DEBUG(msg)
Definition utils.h:68
This file specifies what image variables SrcPanoImg should have.
wxString GetIso(const HuginBase::SrcPanoImage *img)
returns formatted iso value
wxString GetFocalLength(const HuginBase::SrcPanoImage *img)
return focallength and focallength 35 mm as wxString
wxString GetExifDateTime(const HuginBase::SrcPanoImage *img)
returns Exif DateTimeOriginal as formatted wxString
wxString GetExposureTime(const HuginBase::SrcPanoImage *img)
returns formatted exposure time
wxString GetAperture(const HuginBase::SrcPanoImage *img)
returns formatted aperture value
std::vector< VariableMap > VariableMapVector
std::set< unsigned int > UIntSet
std::map< std::string, Variable > VariableMap
std::vector< LensInfo > LensInfoVector
vector of LensInfo to hold all available lens types
Definition LensTools.h:48
bool AskUserOverwrite(const wxString &filename, const wxString &caption, wxWindow *parent)
ask user if the given file should be overwritten, return true if the user confirmed the overwritting
Definition wxutils.cpp:198
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
Definition wxutils.cpp:176
@ INTERP_NEAREST_NEIGHBOUR
include file for the hugin project
include file for the hugin project
Map::mapped_type & map_get(Map &m, const typename Map::key_type &key)
get a map element.
Definition stl_utils.h:98
const Map::mapped_type & const_map_get(const Map &m, const typename Map::key_type &key)
Definition stl_utils.h:110
structure to name of lens projections and their ids
Definition LensTools.h:43
HuginBase::BaseSrcPanoImage::Projection id
Definition LensTools.h:45
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41