|
Hugin trunk 0.1
|
Holds transformations for Image -> Pano and the other way. More...
#include <PanoToolsInterface.h>
Private Member Functions | |
| Transform (const Transform &) | |
| Transform & | operator= (const Transform &) |
| void | updatePTData (const vigra::Diff2D &srcSize, const VariableMap &srcVars, Lens::LensProjectionFormat &srcProj, const vigra::Diff2D &destSize, PanoramaOptions::ProjectionFormat &destProj, const std::vector< double > &destProjParam, double destHFOV) |
Private Attributes | |
| bool | m_initialized |
| Image | m_srcImage |
| Image | m_dstImage |
| struct MakeParams | m_mp |
| struct fDesc | m_stack [15] |
| double | m_srcTX |
| double | m_srcTY |
| double | m_destTX |
| double | m_destTY |
Holds transformations for Image -> Pano and the other way.
Definition at line 105 of file PanoToolsInterface.h.
|
inline |
construct a new Transform object, without initializing a transformation
use createTransform or createInvTransform to create a transformation, and transform to execute it.
Definition at line 115 of file PanoToolsInterface.h.
References threshold().
| HuginBase::PTools::Transform::~Transform | ( | ) |
Definition at line 42 of file PanoToolsInterface.cpp.
References HuginBase::PTools::freeImage(), m_dstImage, m_initialized, and m_srcImage.
| void HuginBase::PTools::Transform::createInvTransform | ( | const PanoramaData & | pano, |
| unsigned int | imgNr, | ||
| const PanoramaOptions & | dest, | ||
| vigra::Diff2D | srcSize = vigra::Diff2D(0,0) |
||
| ) |
create image->pano transformation
Definition at line 188 of file PanoToolsInterface.cpp.
References createInvTransform(), HuginBase::SrcPanoImage::getHeight(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaData::getImageVariables(), HuginBase::SrcPanoImage::getWidth(), and threshold().
| void HuginBase::PTools::Transform::createInvTransform | ( | const SrcPanoImage & | src, |
| const PanoramaOptions & | dest | ||
| ) |
create image->pano transformation
Definition at line 88 of file PanoToolsInterface.cpp.
References createInvTransform(), and threshold().
| void HuginBase::PTools::Transform::createInvTransform | ( | const vigra::Diff2D & | srcSize, |
| VariableMap | srcVars, | ||
| Lens::LensProjectionFormat | srcProj, | ||
| const vigra::Diff2D & | destSize, | ||
| PanoramaOptions::ProjectionFormat | destProj, | ||
| const std::vector< double > & | destProjParam, | ||
| double | destHFOV, | ||
| const vigra::Diff2D & | origSrcSize | ||
| ) |
create image->pano transformation
| srcSize | size of input image |
| variables | of input image |
| srcProj | projection of the image |
| destSize | output panorama size |
| destProj | panorama projection |
| destHFOV | HFOV of panorama |
| origSrcSize | original input image size, 0,0 if the same as srcSize. |
origSrcSize is needed, because the variables are only valid for the original input size. To transform a smaller image, like a preview image, the parameters have to be adjusted. The origial image size, for which variables are valid needs to be know for this.
Definition at line 206 of file PanoToolsInterface.cpp.
References m_destTX, m_destTY, m_dstImage, m_mp, m_srcImage, m_srcTX, m_srcTY, m_stack, map_get(), threshold(), and updatePTData().
Referenced by PreviewIdentifyTool::AfterDrawImagesEvent(), HuginBase::PTOptEstimator::agree(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), createInvTransform(), createInvTransform(), LensCalImageCtrl::DrawView(), CPEditorPanel::EstimatePoint(), GetImageRotatedTo(), GreatCircleArc::GreatCircleArc(), PreviewControlPointTool::MakeTransforms(), OutputProjectionInfo::OutputProjectionInfo(), PointFineTuneProjectionAware(), StraightLineFromSphericals::StraightLineFromSphericals(), HuginBase::Panorama::transferMask(), LayoutRemapper::UpdateAndResetIndex(), VertexCoordRemapper::UpdateAndResetIndex(), PreviewLayoutLinesTool::updateImageCentres(), and CPEditorPanel::UpdateTransforms().
| void HuginBase::PTools::Transform::createTransform | ( | const PanoramaData & | pano, |
| unsigned int | imgNr, | ||
| const PanoramaOptions & | dest, | ||
| vigra::Diff2D | srcSize = vigra::Diff2D(0,0) |
||
| ) |
create pano -> img transform
Definition at line 70 of file PanoToolsInterface.cpp.
References createTransform(), HuginBase::SrcPanoImage::getHeight(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaData::getImageVariables(), HuginBase::SrcPanoImage::getWidth(), and threshold().
| void HuginBase::PTools::Transform::createTransform | ( | const SrcPanoImage & | src, |
| const PanoramaOptions & | dest | ||
| ) |
Definition at line 122 of file PanoToolsInterface.cpp.
References createTransform(), and threshold().
| void HuginBase::PTools::Transform::createTransform | ( | const vigra::Diff2D & | srcSize, |
| VariableMap | srcVars, | ||
| Lens::LensProjectionFormat | srcProj, | ||
| const vigra::Diff2D & | destSize, | ||
| PanoramaOptions::ProjectionFormat | destProj, | ||
| const std::vector< double > & | destProjParam, | ||
| double | destHFOV, | ||
| const vigra::Diff2D & | origSrcSize | ||
| ) |
initialize pano->image transformation
Steps of transform:
Definition at line 158 of file PanoToolsInterface.cpp.
References m_destTX, m_destTY, m_dstImage, m_mp, m_srcImage, m_srcTX, m_srcTY, m_stack, map_get(), threshold(), and updatePTData().
Referenced by HuginLines::_getFilteredLines(), AddGeometricControlPoint(), PreviewEditCPTool::AddLineCP(), HuginBase::PTOptEstimator::agree(), PreviewColorPickerTool::CalcCorrection(), HuginBase::CalculateImageOverlap::CalculateImageOverlap(), createTransform(), createTransform(), OverviewOutlinesTool::DrawRect(), HuginBase::estimateOutputROI(), CPEditorPanel::EstimatePoint(), wxGraphTools::GetDistortionGraph(), ToolHelper::GetImagesUnderPos(), main(), GLPreviewFrame::OnCreateCP(), LensCalImageCtrl::OnMouseEvent(), OutputProjectionInfo::OutputProjectionInfo(), PointFineTuneProjectionAware(), PanoDetector::RemapBackKeypoints(), RemapImage(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::Panorama::transferMask(), ChoosyRemapper::UpdateAndResetIndex(), TexCoordRemapper::UpdateAndResetIndex(), PreviewLayoutLinesTool::updateLineInformation(), PreviewPanel::updatePreview(), and CPEditorPanel::UpdateTransforms().
| bool HuginBase::PTools::Transform::emitGLSL | ( | std::ostringstream & | oss | ) | const |
Definition at line 461 of file PanoToolsTransformGPU.cpp.
References deregister_glsl(), erect_albersequalareaconic_glsl(), erect_arch_glsl(), erect_hammer_glsl(), erect_lambert_glsl(), erect_lambertazimuthal_glsl(), erect_mercator_glsl(), erect_millercylindrical_glsl(), erect_pano_glsl(), erect_rect_glsl(), erect_sinusoidal_glsl(), erect_sphere_tp_glsl(), erect_stereographic_glsl(), erect_transmercator_glsl(), horiz_glsl(), lambertazimuthal_erect_glsl(), m_destTX, m_destTY, m_srcTX, m_srcTY, m_stack, orthographic_sphere_tp_glsl(), pano_sphere_tp_glsl(), persp_sphere_glsl(), plane_transfer_to_camera_glsl(), radial_glsl(), rect_sphere_tp_glsl(), resize_glsl(), rotate_erect_glsl(), shear_glsl(), sphere_tp_equisolid_glsl(), sphere_tp_erect_glsl(), sphere_tp_orthographic_glsl(), sphere_tp_thoby_glsl(), stereographic_erect_glsl(), thoby_sphere_tp_glsl(), threshold(), vert_glsl(), and vertical_glsl().
| bool HuginBase::PTools::Transform::transform | ( | double & | x_dest, |
| double & | y_dest, | ||
| double | x_src, | ||
| double | y_src | ||
| ) | const |
excecute transform
Definition at line 238 of file PanoToolsInterface.cpp.
References m_stack, and threshold().
Referenced by wxGraphTools::GetDistortionGraph(), and PreviewPanel::mouse2erect().
| bool HuginBase::PTools::Transform::transform | ( | hugin_utils::FDiff2D & | dest, |
| const hugin_utils::FDiff2D & | src | ||
| ) | const |
Definition at line 246 of file PanoToolsInterface.cpp.
References m_stack, and threshold().
| bool HuginBase::PTools::Transform::transformImgCoord | ( | double & | x_dest, |
| double & | y_dest, | ||
| double | x_src, | ||
| double | y_src | ||
| ) | const |
like transform, but return image coordinates, not cartesian coordinates
Definition at line 259 of file PanoToolsInterface.cpp.
References m_destTX, m_destTY, m_srcTX, m_srcTY, m_stack, and threshold().
Referenced by HuginLines::_getFilteredLines(), PreviewEditCPTool::AddLineCP(), PreviewControlPointTool::AfterDrawImagesEvent(), PreviewIdentifyTool::AfterDrawImagesEvent(), OutputProjectionInfo::AngularToImage(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), GetImageRotatedTo(), ToolHelper::GetImagesUnderPos(), OutputProjectionInfo::GetLowerX(), CPImageCtrl::GetMagBitmap(), OutputProjectionInfo::GetUpperX(), OutputProjectionInfo::GetXAdd360(), GreatCircleArc::GreatCircleArc(), OutputProjectionInfo::ImageToAngular(), GLPreviewFrame::OnCreateCP(), OutputProjectionInfo::OutputProjectionInfo(), PointFineTuneProjectionAware(), VertexCoordRemapper::RecursiveUpdate(), StraightLineFromSphericals::StraightLineFromSphericals(), ChoosyRemapper::UpdateAndResetIndex(), LayoutRemapper::UpdateAndResetIndex(), TexCoordRemapper::UpdateAndResetIndex(), and PreviewLayoutLinesTool::updateLineInformation().
|
inline |
Definition at line 219 of file PanoToolsInterface.h.
References threshold().
| bool HuginBase::PTools::Transform::transformImgCoordPartial | ( | double & | x_dest, |
| double & | y_dest, | ||
| double | x_src, | ||
| double | y_src | ||
| ) | const |
Definition at line 519 of file PanoToolsTransformGPU.cpp.
References m_destTX, m_destTY, m_srcTX, m_srcTY, m_stack, and threshold().
|
private |
Definition at line 50 of file PanoToolsInterface.cpp.
References HuginBase::PTools::freeImage(), m_dstImage, m_initialized, m_srcImage, HuginBase::PTools::setDestImage(), HuginBase::PTools::setFullImage(), and threshold().
Referenced by createInvTransform(), and createTransform().
|
private |
Definition at line 246 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), emitGLSL(), transformImgCoord(), and transformImgCoordPartial().
|
private |
Definition at line 246 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), emitGLSL(), transformImgCoord(), and transformImgCoordPartial().
|
private |
Definition at line 240 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), updatePTData(), and ~Transform().
|
private |
Definition at line 237 of file PanoToolsInterface.h.
Referenced by updatePTData(), and ~Transform().
|
private |
Definition at line 241 of file PanoToolsInterface.h.
Referenced by createInvTransform(), and createTransform().
|
private |
Definition at line 239 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), updatePTData(), and ~Transform().
|
private |
Definition at line 245 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), emitGLSL(), transformImgCoord(), and transformImgCoordPartial().
|
private |
Definition at line 245 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), emitGLSL(), transformImgCoord(), and transformImgCoordPartial().
Definition at line 242 of file PanoToolsInterface.h.
Referenced by createInvTransform(), createTransform(), emitGLSL(), transform(), transform(), transformImgCoord(), and transformImgCoordPartial().