OTB
9.0.0
Orfeo Toolbox
|
#include <otbStereorectificationDisplacementFieldSource.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef InputImageType::Pointer | InputImagePointerType |
typedef TInputImage | InputImageType |
typedef OutputImageType::Pointer | OutputImagePointerType |
typedef TOutputImage | OutputImageType |
typedef itk::SmartPointer< Self > | Pointer |
typedef OutputImageType::PointType | PointType |
typedef OutputImageType::RegionType | RegionType |
typedef RSTransformType::Pointer | RSTransformPointerType |
typedef otb::GenericRSTransform< double, 3, 3 > | RSTransformType |
typedef StereorectificationDisplacementFieldSource | Self |
typedef OutputImageType::SizeType | SizeType |
typedef OutputImageType::SpacingType | SpacingType |
typedef itk::ImageSource< TOutputImage > | Superclass |
typedef RSTransformType::InputPointType | TDPointType |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
Compute the deformation fields for stereo-rectification.
The geometry of acqusition related to stereo pairs is such that the displacement related to the elevation between the two images of the pair always occurs along lines that are called epipolar lines.
In the case of conic acqusition, these lines are perfectly parallel by definition, while in push-broom geometry, these lines might not be exactly parallel due to perturbations during acquisition, especially when considering a large field of view.
The purpose of stereo-rectification is to warp both images of the pairs so that the displacement related to the elevation only occurs in the horizontal direction (i.e. epipolar lines are horizontal). This operation is useful for mainly two reasons: it allows searching for disparities in one direction only, and it allows deriving anaglyph for 3D viewing with 3D glasses.
This filter allows you to compute the deformation fields up to the sensor model precision needed to warp a pair of stereo images into epipolar geometry. Warping can be done using the otb::StreamingWarpImageFilter.
Since lines might not be perfectly regular, the algorithm performed by this filter uses the otb::GenericRSTransform capabilities to compute the local epipolar lines, and iteratively build a resampling grid by propagating along these locally estimated lines.
Epipolar images will have a null origin and a size as given by the GetRectifiedImageSize() method. The deformation fields and size are derived to produce epipolar images covering the whole extent of the left image.
The SetAverageElevation() method allows you to set the elevation hypothesis on which the epipolar geometry is built. It means that any pair of pixels in the stereo pair whose elevation is exactly equal to the average elevation will have a null disparity (no displacement). The SetElevationOffset() method allows tuning the elevation offset which is only used for local epipolar lines estimation. The default value of 50 meters should do.
Additionally, the SetScale() method allows deriving deformation fields and images size at a coarser (scale > 1) or finer (scale < 1) resolution. The SetGridStep() allows tuning the step of the resampling grid. Please keep in mind that the whole grid is loaded into memory, and that the epipolar lines direction may only vary smoothly. When working with large images, a coarse grid-step will generally be accurate enough and will preserve the memory resources.
Definition at line 90 of file otbStereorectificationDisplacementFieldSource.h.
typedef itk::SmartPointer<const Self> otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::ConstPointer |
Definition at line 97 of file otbStereorectificationDisplacementFieldSource.h.
typedef InputImageType::Pointer otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::InputImagePointerType |
Definition at line 101 of file otbStereorectificationDisplacementFieldSource.h.
typedef TInputImage otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::InputImageType |
Definition at line 100 of file otbStereorectificationDisplacementFieldSource.h.
typedef OutputImageType::Pointer otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::OutputImagePointerType |
Definition at line 103 of file otbStereorectificationDisplacementFieldSource.h.
typedef TOutputImage otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::OutputImageType |
Definition at line 102 of file otbStereorectificationDisplacementFieldSource.h.
typedef itk::SmartPointer<Self> otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::Pointer |
Definition at line 96 of file otbStereorectificationDisplacementFieldSource.h.
typedef OutputImageType::PointType otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::PointType |
Definition at line 107 of file otbStereorectificationDisplacementFieldSource.h.
typedef OutputImageType::RegionType otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::RegionType |
Definition at line 109 of file otbStereorectificationDisplacementFieldSource.h.
typedef RSTransformType::Pointer otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::RSTransformPointerType |
Definition at line 114 of file otbStereorectificationDisplacementFieldSource.h.
typedef otb::GenericRSTransform<double, 3, 3> otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::RSTransformType |
Definition at line 113 of file otbStereorectificationDisplacementFieldSource.h.
typedef StereorectificationDisplacementFieldSource otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::Self |
Standard class typedefs
Definition at line 94 of file otbStereorectificationDisplacementFieldSource.h.
typedef OutputImageType::SizeType otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::SizeType |
Definition at line 106 of file otbStereorectificationDisplacementFieldSource.h.
typedef OutputImageType::SpacingType otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::SpacingType |
Definition at line 108 of file otbStereorectificationDisplacementFieldSource.h.
typedef itk::ImageSource<TOutputImage> otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::Superclass |
Definition at line 95 of file otbStereorectificationDisplacementFieldSource.h.
typedef RSTransformType::InputPointType otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::TDPointType |
Definition at line 117 of file otbStereorectificationDisplacementFieldSource.h.
|
protected |
Constructor
Definition at line 37 of file otbStereorectificationDisplacementFieldSource.hxx.
References otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::m_LeftToRightTransform, otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::m_RightToLeftTransform, and otb::GenericRSTransform< TScalarType, NInputDimensions, NOutputDimensions >::New().
|
inlineoverrideprotected |
Destructor
Definition at line 172 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
This elevation offset is used to compute the epipolar direction
virtual::itk::LightObject::Pointer otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::CreateAnother | ( | void | ) | const |
|
overrideprotected |
Enlarge output requested region (no streaming)
Definition at line 277 of file otbStereorectificationDisplacementFieldSource.hxx.
|
overrideprotected |
Compute the deformation field
Definition at line 292 of file otbStereorectificationDisplacementFieldSource.hxx.
References otb::CONST_PI, otb::GetHeightAboveEllipsoid(), and otb::DEMHandler::GetInstance().
|
overrideprotected |
Generate output images information
Definition at line 107 of file otbStereorectificationDisplacementFieldSource.hxx.
References otb::CONST_PI, and otb::DEMHandler::GetInstance().
|
virtual |
This elevation offset is used to compute the epipolar direction
OutputImageType* otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::GetLeftDisplacementFieldOutput | ( | ) |
Return the left deformation field
StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::OutputImageType * otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::GetLeftDisplacementFieldOutput |
Return the left deformation field (const version)
Definition at line 64 of file otbStereorectificationDisplacementFieldSource.hxx.
|
virtual |
Get the estimated mean baseline ratio
|
virtual |
Run-time type information (and related methods).
|
virtual |
Get the size of the rectified image
OutputImageType* otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::GetRightDisplacementFieldOutput | ( | ) |
Return the left deformation field
StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::OutputImageType * otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::GetRightDisplacementFieldOutput |
Return the left deformation field (const version)
Definition at line 86 of file otbStereorectificationDisplacementFieldSource.hxx.
|
virtual |
This elevation offset is used to compute the epipolar direction
|
virtual |
This elevation offset is used to compute the epipolar direction
otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::itkGetObjectMacro | ( | LeftImage | , |
InputImageType | |||
) |
This elevation offset is used to compute the epipolar direction
otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::itkGetObjectMacro | ( | RightImage | , |
InputImageType | |||
) |
This elevation offset is used to compute the epipolar direction
|
static |
Method for creation through the object factory.
|
privatedelete |
This elevation offset is used to compute the epipolar direction
|
overrideprotected |
PrintSelf method
Definition at line 515 of file otbStereorectificationDisplacementFieldSource.hxx.
|
virtual |
Get/Set the grid scale
|
virtual |
Get/Set left image for stereo-rectification
|
virtual |
Get/Set right image for stereo-rectification
|
virtual |
Get/Set the scale
|
virtual |
This elevation offset is used to compute the epipolar direction
|
virtual |
This elevation offset is used to compute the epipolar direction
|
virtual |
This elevation offset is used to compute the epipolar direction
|
private |
This elevation offset is used to compute the epipolar direction
Definition at line 193 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Controls the step of the resampling grid (in pixels). A finer step will lead to more memory consumption.
Definition at line 202 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Left image
Definition at line 205 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Left to right transform
Definition at line 211 of file otbStereorectificationDisplacementFieldSource.h.
Referenced by otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::StereorectificationDisplacementFieldSource().
|
private |
This variable contains the estimated mean baseline ratio over the image
Definition at line 224 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Output origin in left image (internal use)
Definition at line 220 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Size of the rectified images
Definition at line 217 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Right image
Definition at line 208 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
Right to left transform
Definition at line 214 of file otbStereorectificationDisplacementFieldSource.h.
Referenced by otb::StereorectificationDisplacementFieldSource< TInputImage, TOutputImage >::StereorectificationDisplacementFieldSource().
|
private |
A scale greater than 1 will lead to zoomed stereo-rectified pairs
Definition at line 197 of file otbStereorectificationDisplacementFieldSource.h.
|
private |
If set to true, elevation is retrieved through DEMHandler::GetHeightAboveEllipsoid(). If false, elevation is retrieved from DEMHandler::GetDefaultHeightAboveEllipsoid()
Definition at line 229 of file otbStereorectificationDisplacementFieldSource.h.