3.3.2.16. Class Filter

3.3.2.16.1. Class Documentation

class Filter

Frequency filter.

Public Functions

Filter()
~Filter()
Filter(const Filter&)
Filter &operator=(const Filter&)
Filter(Filter&&)
Filter &operator=(Filter&&)
bool IsLoaded() const

Filter is loaded and ready to be applied on an image FFT.

Return
bool

Size size() const

Filter image size.

Return
Size

Size padding_size() const

Padding size needed for the filter.

Return
size in row-column

PaddingType padding_type() const

Get padding type.

Return
padding type

FilterMetadata Metadata() const
Padding padding() const

Zero padding needed for the filter.

Return
Padding

const Point &hot_point() const
bool CanBeApplied(const ZoomRatio &zoom_ratio) const

Check that the filter can be applied on the given zoom ratio.

Return
bool
Parameters
  • zoom_ratio:

fftw::ComplexUPtr Process(const Size &image_size, fftw::ComplexUPtr image_fft) const

Apply the filter on the image_fft.

Remark
This method is thread safe
Return
the filtered fft
Parameters
  • image_size: size of the image of the fft
  • image_fft: image fft computed by FFTW
Exceptions

Public Static Functions

static Filter Create(const std::string &image_path, const ZoomRatio &zoom_ratio, const Point &hot_point = filter_default_hot_point, PaddingType padding_type = PaddingType::kMirrorPadding, bool normalize = false)

Filter which is adapted specifically for a particular zoom ratio.

Parameters
  • image_path: image path of the filter
  • zoom_ratio: ratio on which the filter must be applied
  • hot_point: 2D coordinates of the filter’s hot point
  • padding_type: padding type
  • normalize: normalize filter
Exceptions

static Filter Create(Image filter_image, const ZoomRatio &zoom_ratio, const Point &hot_point = filter_default_hot_point, PaddingType padding_type = PaddingType::kMirrorPadding, bool normalize = false)

Filter which is adapted specifically for a particular zoom ratio.

Parameters
  • filter_image: image of the filter
  • zoom_ratio: ratio on which the filter must be applied
  • padding_type: padding type
  • normalize: normalize filter
Exceptions