SourceXtractorPlusPlus
0.14
Please provide a description of the project.
|
#include <DFT.h>
Classes | |
struct | ConvolutionContext |
Public Types | |
typedef T | real_t |
typedef FFT< T >::complex_t | complex_t |
Public Member Functions | |
DFTConvolution (std::shared_ptr< const Image< T >> img) | |
virtual | ~DFTConvolution ()=default |
std::size_t | getWidth () const |
std::size_t | getHeight () const |
std::unique_ptr < ConvolutionContext > | prepare (const std::shared_ptr< Image< T >> model_ptr) const |
template<typename... Args> | |
void | convolve (std::shared_ptr< WriteableImage< T >> image_ptr, std::unique_ptr< ConvolutionContext > &context, Args...padding_args) const |
template<typename... Args> | |
void | convolve (std::shared_ptr< WriteableImage< T >> image_ptr, Args...padding_args) const |
std::shared_ptr< const Image< T > > | getKernel () const |
Protected Member Functions | |
void | padKernel (int width, int height, typename std::vector< T >::iterator out) const |
void | dumpImage (const std::shared_ptr< const Image< T >> &img, typename std::vector< T >::iterator out) const |
Private Attributes | |
std::shared_ptr< const Image< T > > | m_kernel |
Convolution strategy based on the Discrete Fourier Transform
T | The pixel type |
TPadding | The padding strategy |
typedef FFT<T>::complex_t SourceXtractor::DFTConvolution< T, TPadding >::complex_t |
typedef T SourceXtractor::DFTConvolution< T, TPadding >::real_t |
|
inline |
|
virtualdefault |
Destructor
|
inline |
Convolve the image with the stored kernel, using the given context storing the pre-computed kernel transform, and pre-allocated buffers
Args | Types of the parameters to be forwarded to the padding strategy |
image_ptr | The image to convolve |
context | The prepared context |
padding_args | Forwarded to the padding strategy |
Definition at line 151 of file DFT.h.
Referenced by SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::convolve(), and SourceXtractor::BgDFTConvolutionImageSource::generateTile().
|
inline |
Convolve the image with the stored kernel
Args | Types of the parameters to be forwarded to the padding strategy |
image_ptr | The image to convolve |
padding_args | Forwarded to the padding strategy |
|
inlineprotected |
Definition at line 231 of file DFT.h.
Referenced by SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::convolve(), and SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::padKernel().
|
inline |
Definition at line 92 of file DFT.h.
Referenced by SourceXtractor::BgDFTConvolutionImageSource::generateTile().
|
inline |
|
inline |
Definition at line 84 of file DFT.h.
Referenced by SourceXtractor::BgDFTConvolutionImageSource::generateTile().
|
inlineprotected |
Definition at line 221 of file DFT.h.
Referenced by SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::prepare().
|
inline |
Pre-computes the transform of the kernel, adapted to the image passed by model_ptr
model_ptr | Reference image. Only its size is used to compute the necessary padding, and kernel size before transformation |
convolve
to avoid re-computing the kernel multiple times Definition at line 104 of file DFT.h.
Referenced by SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::convolve().
|
private |
Definition at line 240 of file DFT.h.
Referenced by SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::getHeight(), SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::getKernel(), SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::getWidth(), SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::padKernel(), and SourceXtractor::DFTConvolution< DetectionImage::PixelType, PaddedType >::prepare().