OTB  7.3.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members

#include <otbAdhesionCorrectionFilter.h>

+ Inheritance diagram for otb::AdhesionCorrectionFilter< TImage, TMask >:
+ Collaboration diagram for otb::AdhesionCorrectionFilter< TImage, TMask >:

Public Types

typedef AuxImageType::Pointer AuxImagePointerType
 
typedef otb::Image< double, 2 > AuxImageType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef TImage::Pointer ImagePointerType
 
typedef TImage::RegionType ImageRegionType
 
typedef TImage::IndexType IndexType
 
typedef std::vector< int > IntVectorType
 
typedef TMask::PixelType MaskImagePixelType
 
typedef TMask::Pointer MaskImagePointerType
 
typedef itk::ConstNeighborhoodIterator< TImage > NeighborhoodIteratorType
 
typedef TImage::OffsetType OffsetType
 
typedef TImage::PixelType PixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TImage::PointType PointType
 
typedef AdhesionCorrectionFilter Self
 
typedef TImage::SizeType SizeType
 
typedef TImage::SpacingType SpacingType
 
typedef itk::ImageToImageFilter< TImage, TImage > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void SetRadius (unsigned int radius)
 
void SetMedianDisparityInput (const TImage *medianmap)
 
void SetMedianMaskInput (const TMask *medianmask)
 
void SetEdgesDisparityInput (const TImage *cannymedianmap)
 
void SetSubPixelMaskInput (const TMask *subpixelmask)
 
const TImage * GetMedianDisparityInput ()
 
const TMask * GetMedianMaskInput ()
 
const TImage * GetEdgesDisparityInput ()
 
const TMask * GetSubPixelMaskInput ()
 
virtual void SetRadius (SizeType _arg)
 
virtual SizeType GetRadius ()
 
virtual void SetTolerance (double _arg)
 
virtual double GetTolerance ()
 
virtual void SetDiscontinuityThreshold (double _arg)
 
virtual double GetDiscontinuityThreshold ()
 
virtual void SetDiscontinuityHighThreshold (double _arg)
 
virtual double GetDiscontinuityHighThreshold ()
 
virtual void SetMaxEdgeGap (double _arg)
 
virtual double GetMaxEdgeGap ()
 
virtual void SetEdgeThreshold (double _arg)
 
virtual double GetEdgeThreshold ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ~AdhesionCorrectionFilter () override
 

Private Member Functions

 AdhesionCorrectionFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

double m_DiscontinuityHighThreshold
 
double m_DiscontinuityThreshold
 
double m_EdgeThreshold
 
SizeType m_ImageSize
 
double m_MaxEdgeGap
 
SizeType m_Radius
 
double m_Tolerance
 
TMask * GetOutputMask ()
 
TImage * GetOutputRiskEdges ()
 
 AdhesionCorrectionFilter ()
 
void GenerateData () override
 
void GenerateInputRequestedRegion (void) override
 
void GenerateOutputInformation (void) override
 

Detailed Description

template<class TImage, class TMask>
class otb::AdhesionCorrectionFilter< TImage, TMask >

This filter eliminates pixels risking adhesion from the input disparity map. To do so it applies the following steps :

Inputs are provided as follows:

The filter proposes as outputs:

See also
FineRegistrationImageFilter, FastCorrelationImageFilter, DisparityMapEstimationMethod, DisparityMapAndMaskEstimationFilter ,

See Publications : N. Sabater, J.M. Morel, A. Almansa and G. Blanchet, "Discarding moving objects in quasi-simultaneous stereovision", in IEEE International Conference on Image Processing, ICIP'10, 2010. N. Sabater, J.M. Morel and A. Almansa, "Sub-pixel stereo matching", in IEEE International Geoscience and Remote Sensing Symposium, IGARSS'10, 2010.

Definition at line 70 of file otbAdhesionCorrectionFilter.h.

Member Typedef Documentation

◆ AuxImagePointerType

template<class TImage , class TMask >
typedef AuxImageType::Pointer otb::AdhesionCorrectionFilter< TImage, TMask >::AuxImagePointerType

Definition at line 100 of file otbAdhesionCorrectionFilter.h.

◆ AuxImageType

template<class TImage , class TMask >
typedef otb::Image<double, 2> otb::AdhesionCorrectionFilter< TImage, TMask >::AuxImageType

Definition at line 99 of file otbAdhesionCorrectionFilter.h.

◆ ConstPointer

template<class TImage , class TMask >
typedef itk::SmartPointer<const Self> otb::AdhesionCorrectionFilter< TImage, TMask >::ConstPointer

Definition at line 77 of file otbAdhesionCorrectionFilter.h.

◆ ImagePointerType

template<class TImage , class TMask >
typedef TImage::Pointer otb::AdhesionCorrectionFilter< TImage, TMask >::ImagePointerType

Definition at line 88 of file otbAdhesionCorrectionFilter.h.

◆ ImageRegionType

template<class TImage , class TMask >
typedef TImage::RegionType otb::AdhesionCorrectionFilter< TImage, TMask >::ImageRegionType

Some convenient typedefs.

Definition at line 83 of file otbAdhesionCorrectionFilter.h.

◆ IndexType

template<class TImage , class TMask >
typedef TImage::IndexType otb::AdhesionCorrectionFilter< TImage, TMask >::IndexType

Definition at line 90 of file otbAdhesionCorrectionFilter.h.

◆ IntVectorType

template<class TImage , class TMask >
typedef std::vector<int> otb::AdhesionCorrectionFilter< TImage, TMask >::IntVectorType

Definition at line 102 of file otbAdhesionCorrectionFilter.h.

◆ MaskImagePixelType

template<class TImage , class TMask >
typedef TMask::PixelType otb::AdhesionCorrectionFilter< TImage, TMask >::MaskImagePixelType

Definition at line 95 of file otbAdhesionCorrectionFilter.h.

◆ MaskImagePointerType

template<class TImage , class TMask >
typedef TMask::Pointer otb::AdhesionCorrectionFilter< TImage, TMask >::MaskImagePointerType

Definition at line 94 of file otbAdhesionCorrectionFilter.h.

◆ NeighborhoodIteratorType

template<class TImage , class TMask >
typedef itk::ConstNeighborhoodIterator<TImage> otb::AdhesionCorrectionFilter< TImage, TMask >::NeighborhoodIteratorType

Definition at line 97 of file otbAdhesionCorrectionFilter.h.

◆ OffsetType

template<class TImage , class TMask >
typedef TImage::OffsetType otb::AdhesionCorrectionFilter< TImage, TMask >::OffsetType

Definition at line 93 of file otbAdhesionCorrectionFilter.h.

◆ PixelType

template<class TImage , class TMask >
typedef TImage::PixelType otb::AdhesionCorrectionFilter< TImage, TMask >::PixelType

Definition at line 87 of file otbAdhesionCorrectionFilter.h.

◆ Pointer

template<class TImage , class TMask >
typedef itk::SmartPointer<Self> otb::AdhesionCorrectionFilter< TImage, TMask >::Pointer

Definition at line 76 of file otbAdhesionCorrectionFilter.h.

◆ PointType

template<class TImage , class TMask >
typedef TImage::PointType otb::AdhesionCorrectionFilter< TImage, TMask >::PointType

Definition at line 92 of file otbAdhesionCorrectionFilter.h.

◆ Self

template<class TImage , class TMask >
typedef AdhesionCorrectionFilter otb::AdhesionCorrectionFilter< TImage, TMask >::Self

Standard class typedefs.

Definition at line 74 of file otbAdhesionCorrectionFilter.h.

◆ SizeType

template<class TImage , class TMask >
typedef TImage::SizeType otb::AdhesionCorrectionFilter< TImage, TMask >::SizeType

Definition at line 89 of file otbAdhesionCorrectionFilter.h.

◆ SpacingType

template<class TImage , class TMask >
typedef TImage::SpacingType otb::AdhesionCorrectionFilter< TImage, TMask >::SpacingType

Definition at line 91 of file otbAdhesionCorrectionFilter.h.

◆ Superclass

template<class TImage , class TMask >
typedef itk::ImageToImageFilter<TImage, TImage> otb::AdhesionCorrectionFilter< TImage, TMask >::Superclass

Definition at line 75 of file otbAdhesionCorrectionFilter.h.

Constructor & Destructor Documentation

◆ AdhesionCorrectionFilter() [1/2]

template<class TImage , class TMask >
otb::AdhesionCorrectionFilter< TImage, TMask >::AdhesionCorrectionFilter ( )
protected

Constructor

Definition at line 38 of file otbAdhesionCorrectionFilter.hxx.

◆ ~AdhesionCorrectionFilter()

template<class TImage , class TMask >
otb::AdhesionCorrectionFilter< TImage, TMask >::~AdhesionCorrectionFilter ( )
inlineoverrideprotected

Destructor

Definition at line 165 of file otbAdhesionCorrectionFilter.h.

◆ AdhesionCorrectionFilter() [2/2]

template<class TImage , class TMask >
otb::AdhesionCorrectionFilter< TImage, TMask >::AdhesionCorrectionFilter ( const Self )
privatedelete

Member Function Documentation

◆ CreateAnother()

template<class TImage , class TMask >
virtual::itk::LightObject::Pointer otb::AdhesionCorrectionFilter< TImage, TMask >::CreateAnother ( void  ) const

◆ GenerateData()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::GenerateData ( void  )
overrideprotected

Threaded generate data

input iterators

Output iterators

INITIALIZATION

Compute jumps of the disparity map in the epipolar direction not detected by Canny

Compute intersections between jumps

disparity_jump2 = mask of jumps in the orthogonal epipolar direction:

Only keep 1 pixel for each discontinuity

Risk zone = pixels to the right for jumps with flag 1 or 3 and pixels to the left for jumps with flag 1 or 3

Inside the risk zone, we look for edges which may cause the adhesion—>risk_edges

Find extreme of risk edges : extreme points in the edges have flag 2, an the other edge points have flag = 1

extend extreme edges if necessary : extreme points in the edges have flag 2, an the other edge points have flag = 1

Cut risk edges remove pixel edges when the associated patch has the same disparity Ie: the patch is in a planar surfarce without jumps

If we have ~ the same disparity in a patch of radius big_win and we known the disparity for more the half pixels in this patch //

Remove edges with only 1 or 2 pixels

Remove pixels risking adhesion

remove around the disparity jump if no risk_edge have been found

Vertical lines (perpendicular to epipolar lines)

Jumps of the disparity map in the other direction disparity_jump_2: flag 7—> special case: intersections flag 5—> jump due to an upper border flag 6—> jump due to an lower border flag 8—> jump due to an upper border + intersection flag 9—> jump due to an lower border + intersection

Vertical lines (perpendicular to epipolar lines) part2

remove neighborhood if there is an edge near the first disparities

Remove pixels risking adhesion in the vertical direction(perpendicular to epipolar)

remove pixels around disparity jumps with no risk edges

Reject isolated disparities ie: In the patch is the only meaningful match

Definition at line 322 of file otbAdhesionCorrectionFilter.hxx.

◆ GenerateInputRequestedRegion()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::GenerateInputRequestedRegion ( void  )
overrideprotected

Generate the input requested regions

Definition at line 178 of file otbAdhesionCorrectionFilter.hxx.

◆ GenerateOutputInformation()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::GenerateOutputInformation ( void  )
overrideprotected

Generate output information

Definition at line 149 of file otbAdhesionCorrectionFilter.hxx.

◆ GetDiscontinuityHighThreshold()

template<class TImage , class TMask >
virtual double otb::AdhesionCorrectionFilter< TImage, TMask >::GetDiscontinuityHighThreshold ( )
virtual

Set/Get the high discontinuity threshold

◆ GetDiscontinuityThreshold()

template<class TImage , class TMask >
virtual double otb::AdhesionCorrectionFilter< TImage, TMask >::GetDiscontinuityThreshold ( )
virtual

Set/Get the discontinuity threshold

◆ GetEdgesDisparityInput()

template<class TImage , class TMask >
const TImage * otb::AdhesionCorrectionFilter< TImage, TMask >::GetEdgesDisparityInput ( )

Get the inputs

Definition at line 109 of file otbAdhesionCorrectionFilter.hxx.

◆ GetEdgeThreshold()

template<class TImage , class TMask >
virtual double otb::AdhesionCorrectionFilter< TImage, TMask >::GetEdgeThreshold ( )
virtual

Set/Get the edge threshold

◆ GetMaxEdgeGap()

template<class TImage , class TMask >
virtual double otb::AdhesionCorrectionFilter< TImage, TMask >::GetMaxEdgeGap ( )
virtual

Set/Get the maximum edge gap

◆ GetMedianDisparityInput()

template<class TImage , class TMask >
const TImage * otb::AdhesionCorrectionFilter< TImage, TMask >::GetMedianDisparityInput ( )

Get the inputs

Definition at line 89 of file otbAdhesionCorrectionFilter.hxx.

◆ GetMedianMaskInput()

template<class TImage , class TMask >
const TMask * otb::AdhesionCorrectionFilter< TImage, TMask >::GetMedianMaskInput ( )

Get the inputs

Definition at line 99 of file otbAdhesionCorrectionFilter.hxx.

◆ GetNameOfClass()

template<class TImage , class TMask >
virtual const char* otb::AdhesionCorrectionFilter< TImage, TMask >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetOutputMask()

template<class TImage , class TMask >
TMask * otb::AdhesionCorrectionFilter< TImage, TMask >::GetOutputMask ( )

Get the output mask

Definition at line 129 of file otbAdhesionCorrectionFilter.hxx.

◆ GetOutputRiskEdges()

template<class TImage , class TMask >
TImage * otb::AdhesionCorrectionFilter< TImage, TMask >::GetOutputRiskEdges ( )

Get the output risk edges

Definition at line 139 of file otbAdhesionCorrectionFilter.hxx.

◆ GetRadius()

template<class TImage , class TMask >
virtual SizeType otb::AdhesionCorrectionFilter< TImage, TMask >::GetRadius ( )
virtual

Set/Get the radius

◆ GetSubPixelMaskInput()

template<class TImage , class TMask >
const TMask * otb::AdhesionCorrectionFilter< TImage, TMask >::GetSubPixelMaskInput ( )

Get the inputs

Definition at line 119 of file otbAdhesionCorrectionFilter.hxx.

◆ GetTolerance()

template<class TImage , class TMask >
virtual double otb::AdhesionCorrectionFilter< TImage, TMask >::GetTolerance ( )
virtual

Set/Get the threshold for the tolerated difference between disparities

◆ New()

template<class TImage , class TMask >
static Pointer otb::AdhesionCorrectionFilter< TImage, TMask >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::operator= ( const Self )
privatedelete

◆ SetDiscontinuityHighThreshold()

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetDiscontinuityHighThreshold ( double  _arg)
virtual

Set/Get the high discontinuity threshold

◆ SetDiscontinuityThreshold()

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetDiscontinuityThreshold ( double  _arg)
virtual

Set/Get the discontinuity threshold

◆ SetEdgesDisparityInput()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::SetEdgesDisparityInput ( const TImage *  cannymedianmap)

Set input images

Definition at line 75 of file otbAdhesionCorrectionFilter.hxx.

◆ SetEdgeThreshold()

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetEdgeThreshold ( double  _arg)
virtual

Set/Get the edge threshold

◆ SetMaxEdgeGap()

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetMaxEdgeGap ( double  _arg)
virtual

Set/Get the maximum edge gap

◆ SetMedianDisparityInput()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::SetMedianDisparityInput ( const TImage *  medianmap)

Set input images

Definition at line 61 of file otbAdhesionCorrectionFilter.hxx.

◆ SetMedianMaskInput()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::SetMedianMaskInput ( const TMask *  medianmask)

Set input images

Definition at line 68 of file otbAdhesionCorrectionFilter.hxx.

◆ SetRadius() [1/2]

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetRadius ( SizeType  _arg)
virtual

Set/Get the radius

◆ SetRadius() [2/2]

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::SetRadius ( unsigned int  radius)
inline

Set unsigned int radius

Definition at line 130 of file otbAdhesionCorrectionFilter.h.

◆ SetSubPixelMaskInput()

template<class TImage , class TMask >
void otb::AdhesionCorrectionFilter< TImage, TMask >::SetSubPixelMaskInput ( const TMask *  subpixelmask)

Set input images

Definition at line 82 of file otbAdhesionCorrectionFilter.hxx.

◆ SetTolerance()

template<class TImage , class TMask >
virtual void otb::AdhesionCorrectionFilter< TImage, TMask >::SetTolerance ( double  _arg)
virtual

Set/Get the threshold for the tolerated difference between disparities

Member Data Documentation

◆ m_DiscontinuityHighThreshold

template<class TImage , class TMask >
double otb::AdhesionCorrectionFilter< TImage, TMask >::m_DiscontinuityHighThreshold
private

Definition at line 189 of file otbAdhesionCorrectionFilter.h.

◆ m_DiscontinuityThreshold

template<class TImage , class TMask >
double otb::AdhesionCorrectionFilter< TImage, TMask >::m_DiscontinuityThreshold
private

Thresholds

Definition at line 188 of file otbAdhesionCorrectionFilter.h.

◆ m_EdgeThreshold

template<class TImage , class TMask >
double otb::AdhesionCorrectionFilter< TImage, TMask >::m_EdgeThreshold
private

Definition at line 191 of file otbAdhesionCorrectionFilter.h.

◆ m_ImageSize

template<class TImage , class TMask >
SizeType otb::AdhesionCorrectionFilter< TImage, TMask >::m_ImageSize
private

Definition at line 180 of file otbAdhesionCorrectionFilter.h.

◆ m_MaxEdgeGap

template<class TImage , class TMask >
double otb::AdhesionCorrectionFilter< TImage, TMask >::m_MaxEdgeGap
private

Definition at line 190 of file otbAdhesionCorrectionFilter.h.

◆ m_Radius

template<class TImage , class TMask >
SizeType otb::AdhesionCorrectionFilter< TImage, TMask >::m_Radius
private

The radius for correlation

Definition at line 182 of file otbAdhesionCorrectionFilter.h.

◆ m_Tolerance

template<class TImage , class TMask >
double otb::AdhesionCorrectionFilter< TImage, TMask >::m_Tolerance
private

Tolerance

Definition at line 185 of file otbAdhesionCorrectionFilter.h.


The documentation for this class was generated from the following files: