Hugintrunk
0.1
|
All variables of a source image. More...
#include <SrcPanoImage.h>
Public Member Functions | |
SrcPanoImage () | |
SrcPanoImage (const BaseSrcPanoImage::Projection projection, const double hfov, const vigra::Size2D size) | |
virtual | ~SrcPanoImage () |
void | resize (const vigra::Size2D &size, VariableMap *potentialLinkedVars) |
"resize" image, adjusts all distortion coefficients for usage with a source image of size size potentialLinkedVars contains a map of potential linked variables which needs an update afterwards to correctly handle the linkage, when passing a nullptr these variables are directly updated in this function More... | |
bool | isInside (vigra::Point2D p, bool ignoreMasks=false) const |
check if a coordinate is inside the source image More... | |
bool | horizontalWarpNeeded () |
bool | getCorrectTCA () const |
void | setCropMode (CropMode val) |
Set the crop mode. More... | |
bool | isCircularCrop () const |
returns true, if projection requires cicular crop More... | |
void | setSize (vigra::Size2D val) |
Set the image size in pixels. More... | |
hugin_utils::FDiff2D | getRadialDistortionCenter () const |
hugin_utils::FDiff2D | getRadialVigCorrCenter () const |
double | getExposure () const |
void | setExposure (const double &val) |
int | getWidth () const |
Get the width of the image in pixels. More... | |
int | getHeight () const |
Get the height of the image in pixels. More... | |
double | getVar (const std::string &name) const |
void | setVar (const std::string &name, double val) |
VariableMap | getVariableMap () const |
Return all the image variables in a variable map. More... | |
const int | getExifDateTime (struct tm *datetime) const |
try to convert Exif date time string to struct tm More... | |
void | unlinkRadialVigCorrCoeff () |
unlinking vignetting parameters should unlink the vignetting correction mode More... | |
void | unlinkRadialVigCorrCenterShift () |
unlinking vignetting parameters should unlink the vignetting correction mode More... | |
void | unlinkEMoRParams () |
unlinking the EMOR parameters should unlink the correction mode. More... | |
void | linkRadialVigCorrCoeff (SrcPanoImage *target) |
linking vignetting parameters should link the vignetting correction mode More... | |
void | linkRadialVigCorrCenterShift (SrcPanoImage *target) |
linking vignetting parameters should link the vignetting correction mode More... | |
void | linkEMoRParams (SrcPanoImage *target) |
linking the EMOR parameters should link the correction mode. More... | |
void | linkStack (SrcPanoImage *target) |
bool | checkImageSizeKnown () |
check if the image size is known, if try to load the information from the file More... | |
bool | readEXIF () |
try to fill out information about the image, by examining the exif data More... | |
bool | applyEXIFValues (bool applyEVValue=true) |
apply values found in EXIF data to SrcPanoImage class, call readEXIF() before to initialize some values More... | |
double | calcExifExposureValue () |
calculate exposure value More... | |
void | updateFocalLength (double newFocalLength) |
updates the focal length, changes the hfov to reflect thew newFocalLength More... | |
void | updateCropFactor (double focalLength, double newCropFactor) |
updates the crop factor, the hfov is calculates so that focal length remains the same More... | |
bool | readCropfactorFromDB () |
tries to read cropfactor from lens database you need to call SrcPanoImage::readEXIF before to fill some values More... | |
bool | readProjectionFromDB (const bool ignoreFovRectilinear=true) |
tries to read projection and crop area from lens database you need to call SrcPanoImage::readEXIF before to fill some values More... | |
bool | readDistortionFromDB () |
tries to read distortion data from lens database you need to call SrcPanoImage::readEXIF before to fill some values More... | |
bool | readVignettingFromDB () |
tries to read vignetting data from lens database you need to call SrcPanoImage::readEXIF before to fill some values More... | |
std::string | getDBLensName () const |
constructs the lens name for the database it is the lensname if known, for compact cameras it is constructed from camera maker and camera model More... | |
bool | hasMasks () const |
returns true, if image has masks associated More... | |
bool | hasPositiveMasks () const |
returns true, if image has positive masks More... | |
bool | hasActiveMasks () const |
returns true, if image has active masks More... | |
void | addMask (MaskPolygon newMask) |
add newMask to list of masks More... | |
void | addActiveMask (MaskPolygon newMask) |
add newMask to list of active masks More... | |
void | clearActiveMasks () |
clears list of active masks More... | |
void | changeMaskType (unsigned int index, HuginBase::MaskPolygon::MaskType newType) |
changes type of mask with index to given newType More... | |
void | deleteMask (unsigned int index) |
delete mask at index More... | |
void | deleteAllMasks () |
delete all masks More... | |
void | printMaskLines (std::ostream &o, unsigned int newImgNr) const |
writes all mask lines to stream, using given image number More... | |
bool | isInsideMasks (vigra::Point2D p) const |
returns true, if point p is inside of one mask polygon More... | |
Public Member Functions inherited from HuginBase::BaseSrcPanoImage | |
bool | operator== (const BaseSrcPanoImage &other) const |
Check that the variables match. More... | |
BaseSrcPanoImage () | |
virtual | ~BaseSrcPanoImage () |
Static Public Member Functions | |
static double | calcHFOV (SrcPanoImage::Projection proj, double fl, double crop, vigra::Size2D imageSize) |
calculate hfov of an image given focal length, image size and crop factor More... | |
static double | calcFocalLength (SrcPanoImage::Projection proj, double hfov, double crop, vigra::Size2D imageSize) |
calcualte focal length, given crop factor and hfov More... | |
static double | calcCropFactor (SrcPanoImage::Projection proj, double hfov, double focalLength, vigra::Size2D imageSize) |
calculate crop factor, given focal length and hfov More... | |
Private Member Functions | |
bool | trustExivOrientation () |
Check if Exiv orientation tag can be trusted. More... | |
Additional Inherited Members | |
Public Types inherited from HuginBase::BaseSrcPanoImage | |
enum | Projection { RECTILINEAR = 0, PANORAMIC = 1, CIRCULAR_FISHEYE = 2, FULL_FRAME_FISHEYE = 3, EQUIRECTANGULAR = 4, FISHEYE_ORTHOGRAPHIC = 8, FISHEYE_STEREOGRAPHIC = 10, FISHEYE_EQUISOLID = 21, FISHEYE_THOBY = 20 } |
enum | CropMode { NO_CROP =0, CROP_RECTANGLE =1, CROP_CIRCLE =2 } |
enum | VignettingCorrMode { VIGCORR_NONE = 0, VIGCORR_RADIAL = 1, VIGCORR_FLATFIELD = 2, VIGCORR_DIV = 4 } |
vignetting correction mode (bitflags, no real enum) More... | |
enum | ResponseType { RESPONSE_EMOR =0, RESPONSE_LINEAR, RESPONSE_GAMMA, RESPONSE_FILE, RESPONSE_ICC } |
All variables of a source image.
In the long term, this simplified class will replace PanoImage and Image options and the variables array. All image variables are stored in this class, regardless of what the variable is attached to (lens, sensor, position).
Definition at line 194 of file SrcPanoImage.h.
|
inline |
Definition at line 198 of file SrcPanoImage.h.
|
inline |
Definition at line 201 of file SrcPanoImage.h.
|
inlinevirtual |
Definition at line 208 of file SrcPanoImage.h.
void HuginBase::SrcPanoImage::addActiveMask | ( | MaskPolygon | newMask | ) |
add newMask to list of active masks
Definition at line 1036 of file SrcPanoImage.cpp.
void HuginBase::SrcPanoImage::addMask | ( | MaskPolygon | newMask | ) |
add newMask to list of masks
Definition at line 1029 of file SrcPanoImage.cpp.
bool HuginBase::SrcPanoImage::applyEXIFValues | ( | bool | applyEVValue = true | ) |
apply values found in EXIF data to SrcPanoImage class, call readEXIF() before to initialize some values
Definition at line 628 of file SrcPanoImage.cpp.
References calcExifExposureValue(), calcHFOV(), DEBUG_DEBUG, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, getSize(), hugin_utils::stringToDouble(), and hugin_utils::TDiff2D< T >::y.
Referenced by main(), main2(), PanoCommand::wxAddImagesCmd::processPanorama(), and PanoCommand::wxLoadPTProjectCmd::processPanorama().
|
static |
calculate crop factor, given focal length and hfov
Definition at line 954 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, DEBUG_WARN, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, M_PI, HuginBase::BaseSrcPanoImage::PANORAMIC, and HuginBase::BaseSrcPanoImage::RECTILINEAR.
Referenced by HuginBase::LensDB::SaveLensDataFromPano().
double HuginBase::SrcPanoImage::calcExifExposureValue | ( | ) |
calculate exposure value
Definition at line 987 of file SrcPanoImage.cpp.
Referenced by applyEXIFValues(), and PanoOperation::ResetOperation::GetInternalCommand().
|
static |
calcualte focal length, given crop factor and hfov
Definition at line 909 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, DEBUG_WARN, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, M_PI, HuginBase::BaseSrcPanoImage::PANORAMIC, vigra_ext::pow(), HuginBase::BaseSrcPanoImage::RECTILINEAR, and hugin_utils::TDiff2D< T >::x.
Referenced by HuginLines::_getVerticalLines(), ApplyLensDBParameters(), HuginBase::Lens::getFocalLength(), HFOVDialog::OnHFOVChanged(), ImagesPanel::OnLensTypeChanged(), HFOVDialog::OnLoadLensParameters(), ImagesPanel::OnSelectionChanged(), BrowsePTOFilesDialog::ParsePTOFile(), readProjectionFromDB(), HuginBase::LensDB::SaveLensDataFromPano(), and SaveLensParameters().
|
static |
calculate hfov of an image given focal length, image size and crop factor
Definition at line 858 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, DEBUG_WARN, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, M_PI, HuginBase::BaseSrcPanoImage::PANORAMIC, HuginBase::BaseSrcPanoImage::RECTILINEAR, and hugin_utils::TDiff2D< T >::x.
Referenced by applyEXIFValues(), ApplyLensDBParameters(), LensCalImageCtrl::GenerateRemappedImage(), PanoOperation::ResetOperation::GetInternalCommand(), LensCalFrame::GetPanorama(), HFOVDialog::HFOVDialog(), HFOVDialog::OnCropFactorChanged(), HFOVDialog::OnFocalLengthChanged(), ImagesPanel::OnFocalLengthChanged(), LensCalFrame::OnShowDistortionGraph(), HFOVDialog::OnTypeChanged(), readCropfactorFromDB(), readProjectionFromDB(), HuginBase::LensDB::SaveLensDataFromPano(), SaveLensParameters(), updateCropFactor(), and updateFocalLength().
void HuginBase::SrcPanoImage::changeMaskType | ( | unsigned int | index, |
HuginBase::MaskPolygon::MaskType | newType | ||
) |
changes type of mask with index to given newType
Definition at line 1082 of file SrcPanoImage.cpp.
bool HuginBase::SrcPanoImage::checkImageSizeKnown | ( | ) |
check if the image size is known, if try to load the information from the file
Definition at line 286 of file SrcPanoImage.cpp.
References getHeight(), getWidth(), celeste::info(), and setSize().
Referenced by GenerateSequenceDialog::DoGeneratePanorama(), and readEXIF().
void HuginBase::SrcPanoImage::clearActiveMasks | ( | ) |
clears list of active masks
Definition at line 1043 of file SrcPanoImage.cpp.
void HuginBase::SrcPanoImage::deleteAllMasks | ( | ) |
delete all masks
Definition at line 1102 of file SrcPanoImage.cpp.
Referenced by HuginLines::_getVerticalLines().
void HuginBase::SrcPanoImage::deleteMask | ( | unsigned int | index | ) |
delete mask at index
Definition at line 1092 of file SrcPanoImage.cpp.
bool HuginBase::SrcPanoImage::getCorrectTCA | ( | ) | const |
Definition at line 181 of file SrcPanoImage.cpp.
Referenced by correctImage(), HuginBase::Nona::estScaleFactorForFullFrame(), HuginBase::Nona::SpaceTransform::InitInvRadialCorrect(), and HuginBase::Nona::SpaceTransform::InitRadialCorrect().
std::string HuginBase::SrcPanoImage::getDBLensName | ( | ) | const |
constructs the lens name for the database it is the lensname if known, for compact cameras it is constructed from camera maker and camera model
Definition at line 710 of file SrcPanoImage.cpp.
Referenced by ApplyLensDBParameters(), main(), print_result(), readDistortionFromDB(), readProjectionFromDB(), readVignettingFromDB(), HuginBase::LensDB::SaveLensDataFromPano(), and SaveLensParameters().
const int HuginBase::SrcPanoImage::getExifDateTime | ( | struct tm * | datetime | ) | const |
try to convert Exif date time string to struct tm
Definition at line 1136 of file SrcPanoImage.cpp.
Referenced by FillPlaceholders(), PossiblePano::GetDateTime(), FormatString::GetExifDateTime(), and BrowsePTOFilesDialog::ParsePTOFile().
double HuginBase::SrcPanoImage::getExposure | ( | ) | const |
Definition at line 218 of file SrcPanoImage.cpp.
References vigra_ext::pow().
Referenced by PreviewDifferenceTool::AfterDrawImagesEvent(), AutoPanoSiftStack::automatch(), AutoPanoSiftMultiRowStack::automatch(), TextureManager::DrawImage(), and TextureManager::TextureKey::SetOptions().
|
inline |
Get the height of the image in pixels.
Should not be used, use getSize().height() instead. This is here for compatiblity with PnaoImage, but should be removed.
Definition at line 276 of file SrcPanoImage.h.
References getSize().
Referenced by HuginLines::_getVerticalLines(), Parser::CalculateConstant(), checkImageSizeKnown(), HuginBase::PTools::Transform::createInvTransform(), CreateMissingImages(), HuginBase::PTools::Transform::createTransform(), TextureManager::TextureInfo::DefineMaskTexture(), CPEditorPanel::EstimatePoint(), wxGraphTools::GetDistortionGraph(), PanoOperation::ChangeLensOperation::GetInternalCommand(), PanoOperation::ChangeStackOperation::GetInternalCommand(), CPEditorPanel::OnTextPointChange(), HuginQueue::detail::PrintDetailInfo(), PanoCommand::wxAddCtrlPointGridCmd::processPanorama(), PanoDetector::RansacMatchesInPairCam(), readEXIF(), SetCropToImages(), and Parser::UpdateSingleVar().
hugin_utils::FDiff2D HuginBase::SrcPanoImage::getRadialDistortionCenter | ( | ) | const |
Definition at line 191 of file SrcPanoImage.cpp.
Referenced by MaskEditorPanel::setImage().
hugin_utils::FDiff2D HuginBase::SrcPanoImage::getRadialVigCorrCenter | ( | ) | const |
Definition at line 197 of file SrcPanoImage.cpp.
Referenced by HuginBase::AllPointSampler::sampleAllPanoPoints(), and HuginBase::RandomPointSampler::sampleRandomPanoPoints().
double HuginBase::SrcPanoImage::getVar | ( | const std::string & | name | ) | const |
VariableMap HuginBase::SrcPanoImage::getVariableMap | ( | ) | const |
Return all the image variables in a variable map.
Returns a map of all the variables for this image. It is adivisable to use the individual getX functions where apropriate instead.
|
inline |
Get the width of the image in pixels.
Should not be used, use getSize().width() instead. This is here for compatiblity with PnaoImage, but should be removed.
Definition at line 266 of file SrcPanoImage.h.
References getSize().
Referenced by HuginLines::_getVerticalLines(), Parser::CalculateConstant(), checkImageSizeKnown(), HuginBase::PTools::Transform::createInvTransform(), CreateMissingImages(), HuginBase::PTools::Transform::createTransform(), TextureManager::TextureInfo::DefineMaskTexture(), CPEditorPanel::estimateAndAddOtherPoint(), CPEditorPanel::EstimatePoint(), wxGraphTools::GetDistortionGraph(), PanoOperation::ChangeLensOperation::GetInternalCommand(), PanoOperation::ChangeStackOperation::GetInternalCommand(), CPEditorPanel::NewPointChange(), CPEditorPanel::OnTextPointChange(), HuginQueue::detail::PrintDetailInfo(), PanoCommand::wxAddCtrlPointGridCmd::processPanorama(), PanoDetector::RansacMatchesInPairCam(), readEXIF(), SetCropToImages(), and Parser::UpdateSingleVar().
bool HuginBase::SrcPanoImage::hasActiveMasks | ( | ) | const |
returns true, if image has active masks
Definition at line 1070 of file SrcPanoImage.cpp.
Referenced by TextureManager::TextureInfo::DefineMaskTexture(), HuginBase::estimateImageAlpha(), HandleDownscaleImage(), isInsideMasks(), and RemapImage().
bool HuginBase::SrcPanoImage::hasMasks | ( | ) | const |
returns true, if image has masks associated
Definition at line 1049 of file SrcPanoImage.cpp.
Referenced by ImagesListMask::UpdateItem().
bool HuginBase::SrcPanoImage::hasPositiveMasks | ( | ) | const |
returns true, if image has positive masks
Definition at line 1054 of file SrcPanoImage.cpp.
bool HuginBase::SrcPanoImage::horizontalWarpNeeded | ( | ) |
Definition at line 126 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, HuginBase::BaseSrcPanoImage::EQUIRECTANGULAR, HuginBase::BaseSrcPanoImage::FISHEYE_EQUISOLID, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_STEREOGRAPHIC, HuginBase::BaseSrcPanoImage::FISHEYE_THOBY, HuginBase::BaseSrcPanoImage::FULL_FRAME_FISHEYE, HuginBase::BaseSrcPanoImage::PANORAMIC, and HuginBase::BaseSrcPanoImage::RECTILINEAR.
bool HuginBase::SrcPanoImage::isCircularCrop | ( | ) | const |
returns true, if projection requires cicular crop
Definition at line 175 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CIRCULAR_FISHEYE, HuginBase::BaseSrcPanoImage::FISHEYE_ORTHOGRAPHIC, and HuginBase::BaseSrcPanoImage::FISHEYE_THOBY.
Referenced by ApplyLensDBParameters(), GLPreviewFrame::LoadImages(), main(), HFOVDialog::OnLoadLensParameters(), readProjectionFromDB(), and MaskEditorPanel::setImage().
bool HuginBase::SrcPanoImage::isInside | ( | vigra::Point2D | p, |
bool | ignoreMasks = false |
||
) | const |
check if a coordinate is inside the source image
Definition at line 146 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, isInsideMasks(), celeste::min(), HuginBase::BaseSrcPanoImage::NO_CROP, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by applyMaskAndCrop(), PreviewColorPickerTool::CalcCorrection(), HuginBase::CalculateImageOverlap::calculate(), CheckAndAddPoint(), HuginBase::getCPinMasks(), ToolHelper::GetImagesUnderPos(), TexCoordRemapper::GetNextFaceCoordinates(), VertexCoordRemapper::GetNextFaceCoordinates(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::CalculateOptimalROI::stackPixel(), and PreviewLayoutLinesTool::updateLineInformation().
bool HuginBase::SrcPanoImage::isInsideMasks | ( | vigra::Point2D | p | ) | const |
returns true, if point p is inside of one mask polygon
Definition at line 1108 of file SrcPanoImage.cpp.
References hasActiveMasks().
Referenced by HuginBase::estimateImageAlpha(), and isInside().
|
inline |
linking the EMOR parameters should link the correction mode.
Definition at line 340 of file SrcPanoImage.h.
|
inline |
linking vignetting parameters should link the vignetting correction mode
Definition at line 332 of file SrcPanoImage.h.
|
inline |
linking vignetting parameters should link the vignetting correction mode
Definition at line 324 of file SrcPanoImage.h.
|
inline |
Definition at line 346 of file SrcPanoImage.h.
void HuginBase::SrcPanoImage::printMaskLines | ( | std::ostream & | o, |
unsigned int | newImgNr | ||
) | const |
writes all mask lines to stream, using given image number
Definition at line 1075 of file SrcPanoImage.cpp.
Referenced by TextureManager::TextureKey::SetOptions().
bool HuginBase::SrcPanoImage::readCropfactorFromDB | ( | ) |
tries to read cropfactor from lens database you need to call SrcPanoImage::readEXIF before to fill some values
Definition at line 687 of file SrcPanoImage.cpp.
References calcHFOV(), HuginBase::Exiv2Helper::getCropFactor(), HuginBase::LensDB::LensDB::GetSingleton(), and getSize().
Referenced by PanoCommand::wxAddImagesCmd::processPanorama().
bool HuginBase::SrcPanoImage::readDistortionFromDB | ( | ) |
tries to read distortion data from lens database you need to call SrcPanoImage::readEXIF before to fill some values
Definition at line 817 of file SrcPanoImage.cpp.
References getDBLensName(), HuginBase::LensDB::LensDB::GetDistortion(), and HuginBase::LensDB::LensDB::GetSingleton().
bool HuginBase::SrcPanoImage::readEXIF | ( | ) |
try to fill out information about the image, by examining the exif data
Definition at line 309 of file SrcPanoImage.cpp.
References checkImageSizeKnown(), DEBUG_DEBUG, hugin_utils::doubleToString(), HuginBase::Exiv2Helper::getCropFactor(), HuginBase::Exiv2Helper::getExiv2GPSLatitude(), HuginBase::Exiv2Helper::getExiv2GPSLongitude(), HuginBase::Exiv2Helper::getExiv2ValueDouble(), HuginBase::Exiv2Helper::getExiv2ValueLong(), HuginBase::Exiv2Helper::getExiv2ValueString(), getHeight(), HuginBase::Exiv2Helper::getLensName(), getWidth(), HuginBase::Exiv2Helper::readRedBlueBalance(), hugin_utils::StringContainsCaseInsensitive(), hugin_utils::tolower(), and trustExivOrientation().
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), CheckProjectFile(), main(), main2(), BrowsePTOFilesDialog::ParsePTOFile(), print_result(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), ReadPanoramaOptionsFromIni(), FindPanoDialog::SearchInDir(), and ImageLineList::SetFilename().
bool HuginBase::SrcPanoImage::readProjectionFromDB | ( | const bool | ignoreFovRectilinear = true | ) |
tries to read projection and crop area from lens database you need to call SrcPanoImage::readEXIF before to fill some values
ignoreFovRectilinear | if this parameter is true, the fov of rectilinear is not read from the database, otherwise the hfov is populated with the value from the database |
Definition at line 747 of file SrcPanoImage.cpp.
References calcFocalLength(), calcHFOV(), HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, HuginBase::LensDB::LensDB::GetCrop(), HuginBase::Exiv2Helper::getCropFactor(), getDBLensName(), HuginBase::LensDB::LensDB::GetDistortion(), HuginBase::LensDB::LensDB::GetFov(), HuginBase::LensDB::LensDB::GetProjection(), HuginBase::LensDB::LensDB::GetSingleton(), getSize(), isCircularCrop(), HuginBase::isFisheye(), HuginBase::BaseSrcPanoImage::RECTILINEAR, and setCropMode().
Referenced by main(), and PanoCommand::wxAddImagesCmd::processPanorama().
bool HuginBase::SrcPanoImage::readVignettingFromDB | ( | ) |
tries to read vignetting data from lens database you need to call SrcPanoImage::readEXIF before to fill some values
Definition at line 838 of file SrcPanoImage.cpp.
References getDBLensName(), HuginBase::LensDB::LensDB::GetSingleton(), and HuginBase::LensDB::LensDB::GetVignetting().
Referenced by main().
void HuginBase::SrcPanoImage::resize | ( | const vigra::Size2D & | size, |
VariableMap * | potentialLinkedVars | ||
) |
"resize" image, adjusts all distortion coefficients for usage with a source image of size size
potentialLinkedVars
contains a map of potential linked variables which needs an update afterwards to correctly handle the linkage, when passing a nullptr these variables are directly updated in this function
Definition at line 55 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::CROP_CIRCLE, HuginBase::BaseSrcPanoImage::CROP_RECTANGLE, and HuginBase::BaseSrcPanoImage::NO_CROP.
Referenced by ApplyTemplate(), HuginBase::SmallRemappedImageCache::getRemapped(), main(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxApplyTemplateCmd::processPanorama(), and HuginBase::PointSampler::sampleAndExtractPoints().
void HuginBase::SrcPanoImage::setCropMode | ( | CropMode | val | ) |
Set the crop mode.
This sets the cropping region to the entire image when set to NO_CROP, unlike the lazy metaprogrammed equivalent in BaseSrcPanoImage.
Definition at line 202 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::NO_CROP.
Referenced by main(), HFOVDialog::OnLoadLensParameters(), and readProjectionFromDB().
void HuginBase::SrcPanoImage::setExposure | ( | const double & | val | ) |
Definition at line 221 of file SrcPanoImage.cpp.
void HuginBase::SrcPanoImage::setSize | ( | vigra::Size2D | val | ) |
Set the image size in pixels.
If we aren't cropping the image, set the size to the entire image
Definition at line 210 of file SrcPanoImage.cpp.
References HuginBase::BaseSrcPanoImage::NO_CROP.
Referenced by checkImageSizeKnown(), HuginBase::Nona::SpaceTransform::createInvTransform(), PreviewProjectionGridTool::createMesh(), HuginBase::Nona::SpaceTransform::createTransform(), OverviewOutlinesTool::DrawRect(), HuginBase::CalculateFitPanorama::fitPano(), GetImageRotatedTo(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::IsHighVignetting(), main(), main2(), ImageVariableDialog::OnShowDistortionGraph(), ImageVariableDialog::OnShowVignettingGraph(), OutputProjectionInfo::OutputProjectionInfo(), processImg(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxApplyTemplateCmd::processPanorama(), SetCropToImages(), HuginBase::PanoramaOptions::setVFOV(), and PreviewPanel::updatePreview().
void HuginBase::SrcPanoImage::setVar | ( | const std::string & | name, |
double | val | ||
) |
|
private |
Check if Exiv orientation tag can be trusted.
Decides if the Exiv Orientation Tag of an images is plausible.
Current checks:
Definition at line 1128 of file SrcPanoImage.cpp.
References getSize().
Referenced by readEXIF().
|
inline |
unlinking the EMOR parameters should unlink the correction mode.
Definition at line 316 of file SrcPanoImage.h.
|
inline |
unlinking vignetting parameters should unlink the vignetting correction mode
Definition at line 308 of file SrcPanoImage.h.
|
inline |
unlinking vignetting parameters should unlink the vignetting correction mode
Definition at line 300 of file SrcPanoImage.h.
void HuginBase::SrcPanoImage::updateCropFactor | ( | double | focalLength, |
double | newCropFactor | ||
) |
updates the crop factor, the hfov is calculates so that focal length remains the same
Definition at line 1018 of file SrcPanoImage.cpp.
References calcHFOV(), and getSize().
void HuginBase::SrcPanoImage::updateFocalLength | ( | double | newFocalLength | ) |
updates the focal length, changes the hfov to reflect thew newFocalLength
Definition at line 1009 of file SrcPanoImage.cpp.
References calcHFOV(), HuginBase::Exiv2Helper::getCropFactor(), and getSize().