Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homomorphic Image Filter

Implements a Homomorphic Filter based on the algorithm described in Digital Image Processing by Rafael C. Gonzalez.

Supported Filter Types

  • Gaussian — smooth rolloff, controlled by sharpness parameter c
  • Butterworth — steeper rolloff, controlled by order
  • Ideal — sharp cutoff at the threshold distance (no transition band)

Library API

#include "homomorphic_filter.hpp"

// Convenience: apply directly with parameters (pads to image size internally)
cv::Mat result = applyHomomorphicFilter(input, cutoff, gammaH, gammaL, filterType, c, order);

// Or build the filter separately for reuse
cv::Mat f = createGaussianFilter(size, cutoff, gammaH, gammaL, c);
cv::Mat f = createButterworthFilter(size, cutoff, order, gammaH, gammaL);
cv::Mat f = createIdealFilter(size, cutoff, gammaH, gammaL);
cv::Mat result = applyHomomorphicFilter(input, f);

Parameters

Parameter Description
cutoff Distance D₀ from frequency center (controls filter bandwidth)
gammaH High-frequency gain (≥ 1). Boosts contrast/detail
gammaL Low-frequency gain (0 < γL ≤ 1). Attenuates uneven illumination
c Sharpness of Gaussian transition (1.0 = standard)
order Butterworth rolloff steepness (higher = sharper)

Build Requirements

  • CMake ≥ 3.14
  • C++17
  • OpenCV 4
  • Qt 6 (for the GUI)
  • OpenMP (optional, for parallelism)

Build

cmake -B build
cmake --build build

The GUI executable is build/dft_filters/dft_filters. A command-line tool is available via build/cli/homo_filter_cli.

License

MIT

About

Homomorphic Filter Implementation

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages