OTB  9.0.0
Orfeo Toolbox
List of all members
otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection > Class Template Reference

#include <otbTouziEdgeDetectorImageFilter.h>

+ Inheritance diagram for otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >:
+ Collaboration diagram for otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >:
typedef TouziEdgeDetectorImageFilter Self
 
typedef ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImageDirection > Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::InputImageType InputImageType
 
typedef Superclass::OutputImageType OutputImageType
 
typedef Superclass::OutputImageDirectionType OutputImageDirectionType
 
typedef InputImageType::SizeType SizeType
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef OutputImageDirectionType::PixelType OutputPixelDirectionType
 
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 
SizeType m_Radius
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void SetRadius (SizeType _arg)
 
virtual const SizeTypeGetRadius () const
 
void GenerateInputRequestedRegion () override
 
 TouziEdgeDetectorImageFilter ()
 
 ~TouziEdgeDetectorImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void BeforeThreadedGenerateData () override
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
 TouziEdgeDetectorImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Public Types inherited from otb::ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImage >
typedef ImageToModulusAndDirectionImageFilter Self
 
typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef Superclass::InputImageType InputImageType
 
typedef Superclass::OutputImageType OutputImageType
 
typedef TOutputImage OutputImageDirectionType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::ConstPointer InputImageConstPointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::ConstPointer OutputImageConstPointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
- Public Member Functions inherited from otb::ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImage >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
const OutputImageTypeGetOutput () const
 
OutputImageTypeGetOutput ()
 
const OutputImageDirectionTypeGetOutputDirection () const
 
OutputImageDirectionTypeGetOutputDirection ()
 
void GenerateInputRequestedRegion () override
 
- Static Public Member Functions inherited from otb::ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImage >
static Pointer New ()
 
- Static Public Attributes inherited from otb::ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImage >
static const unsigned int InputImageDimension
 
static const unsigned int OutputImageDimension
 
- Protected Member Functions inherited from otb::ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImage >
 ImageToModulusAndDirectionImageFilter ()
 
 ~ImageToModulusAndDirectionImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Detailed Description

template<class TInputImage, class TOutputImage, class TOutputImageDirection = TOutputImage>
class otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >

Application of a filter of detection of contours.

This class implements the Touzi's ratio edge detector used to detect contours.

We define a square region of size 2n+1 that we divided in two regions.

The response of the edge detector between two regions 1 and 2 in one direction $ \theta_{i} $ is:

\[R(\theta_{i}) = 1 - \min (\frac{\mu_{1}}{\mu_{2}};\frac{\mu_{2}}{\mu_{1}}) \]

where $ \mu_{1} $ and $ \mu_{2} $ are the mean of regions 1 and 2.

The intensity of contour is calculated in four directions vertical , diagonal 1, horizontal and diagonal 2.

The output is an image of intensity of the detection of contour R, the maximum response of the ratio edge detector of $ R(\theta_{i}) $ :

\[R = \max ( R(\theta_{i}) ) \]

An image of the direction of contours can also be determined by this filter:

\[D = \frac{\sum_{i=1}^{4} s_{i}\theta_{i}R(\theta_{i})}{\sum_{i=1}^{4} R(\theta_{i}} \]

where if

\[ \mu_{1}>\mu_{2} s_{i}=+1 \]

else if

\[ \mu_{1}<\mu_{2} s_{i}=-1 \]

Definition at line 61 of file otbTouziEdgeDetectorImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef itk::SmartPointer<const Self> otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::ConstPointer

typedef for the classes standards.

Definition at line 73 of file otbTouziEdgeDetectorImageFilter.h.

◆ InputImageType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef Superclass::InputImageType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::InputImageType

typedef to simplify variables definition and declaration.

Definition at line 79 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputImageDirectionType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef Superclass::OutputImageDirectionType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputImageDirectionType

typedef for the classes standards.

Definition at line 84 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputImageRegionType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef OutputImageType::RegionType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputImageRegionType

typedef for the classes standards.

Definition at line 87 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputImageType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef Superclass::OutputImageType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputImageType

typedef for the classes standards.

Definition at line 83 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputPixelDirectionType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef OutputImageDirectionType::PixelType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputPixelDirectionType

typedef for the classes standards.

Definition at line 89 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputPixelType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef OutputImageType::PixelType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputPixelType

typedef for the classes standards.

Definition at line 88 of file otbTouziEdgeDetectorImageFilter.h.

◆ Pointer

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef itk::SmartPointer<Self> otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::Pointer

typedef for the classes standards.

Definition at line 72 of file otbTouziEdgeDetectorImageFilter.h.

◆ Self

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef TouziEdgeDetectorImageFilter otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::Self

typedef for the classes standards.

Definition at line 70 of file otbTouziEdgeDetectorImageFilter.h.

◆ SizeType

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef InputImageType::SizeType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::SizeType

typedef for the classes standards.

Definition at line 86 of file otbTouziEdgeDetectorImageFilter.h.

◆ Superclass

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
typedef ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection> otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::Superclass

typedef for the classes standards.

Definition at line 71 of file otbTouziEdgeDetectorImageFilter.h.

Constructor & Destructor Documentation

◆ TouziEdgeDetectorImageFilter() [1/2]

template<class TInputImage , class TOutputImage , class TOutputImageDirection >
otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::TouziEdgeDetectorImageFilter
protected

typedef for the classes standards.

Definition at line 42 of file otbTouziEdgeDetectorImageFilter.hxx.

◆ ~TouziEdgeDetectorImageFilter()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::~TouziEdgeDetectorImageFilter ( )
inlineoverrideprotected

typedef for the classes standards.

Definition at line 104 of file otbTouziEdgeDetectorImageFilter.h.

◆ TouziEdgeDetectorImageFilter() [2/2]

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::TouziEdgeDetectorImageFilter ( const Self )
privatedelete

typedef for the classes standards.

Member Function Documentation

◆ BeforeThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TOutputImageDirection >
void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::BeforeThreadedGenerateData
overrideprotected

Set up state of filter before multi-threading. InterpolatorType::SetInputImage is not thread-safe and hence has to be set up before ThreadedGenerateData

Definition at line 101 of file otbTouziEdgeDetectorImageFilter.hxx.

◆ CreateAnother()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
virtual::itk::LightObject::Pointer otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::CreateAnother ( void  ) const

typedef for the classes standards.

◆ GenerateInputRequestedRegion()

template<class TInputImage , class TOutputImage , class TOutputImageDirection >
void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::GenerateInputRequestedRegion
override

To be allowed to use the pipeline method TouziEdgeDetectorImageFilter needs a treatment input area larger than the output one.

See also
ImageToImageFilter::GenerateInputRequestedRegion()

Definition at line 48 of file otbTouziEdgeDetectorImageFilter.hxx.

◆ GetNameOfClass()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
virtual const char* otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::GetNameOfClass ( ) const
virtual

Return the name of the class.

◆ GetRadius()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
virtual const SizeType& otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::GetRadius ( ) const
virtual

typedef for the classes standards.

◆ New()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
static Pointer otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::New ( )
static

Method for management of the object factory.

◆ operator=()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::operator= ( const Self )
privatedelete

typedef for the classes standards.

◆ PrintSelf()

template<class TInputImage , class TOutputImage , class TOutputImageDirection >
void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Standard "PrintSelf" method

Definition at line 304 of file otbTouziEdgeDetectorImageFilter.hxx.

◆ SetRadius()

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
virtual void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::SetRadius ( SizeType  _arg)
virtual

Set/Get radius methods

◆ ThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TOutputImageDirection >
void otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprotected

TouziEdgeDetectorImageFilter can be implemented for a multithreaded filter treatment. Thus, this implementation give the ThreadedGenerateData() method. that is called for each process thread. Image data are automatically allocated through the parent class calling the ThreadedGenerateData() method. ThreadedGenerateData() can only write the area of the image specified by the parameter "outputRegionForThread"

See also
ImageToImageFilter::ThreadedGenerateData(), ImageToImageFilter::GenerateData()

Definition at line 118 of file otbTouziEdgeDetectorImageFilter.hxx.

References otb::CONST_PI, otb::CONST_PI_2, and otb::CONST_PI_4.

Member Data Documentation

◆ InputImageDimension

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
const unsigned int otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::InputImageDimension = TInputImage::ImageDimension
static

Extract input and output images sizes.

Definition at line 65 of file otbTouziEdgeDetectorImageFilter.h.

◆ m_Radius

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
SizeType otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::m_Radius
private

Radius declaration

Definition at line 126 of file otbTouziEdgeDetectorImageFilter.h.

◆ OutputImageDimension

template<class TInputImage , class TOutputImage , class TOutputImageDirection = TOutputImage>
const unsigned int otb::TouziEdgeDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection >::OutputImageDimension = TOutputImage::ImageDimension
static

typedef for the classes standards.

Definition at line 66 of file otbTouziEdgeDetectorImageFilter.h.


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