Skip to main content

computer vision packages in frequency domain

Project description

OpenFV

A Python package for computer vision in Frequency Domain.

Installation

You can install the package using pip:

bash pip install openfv

Usage

Here's a basic example of how to use the package:

import cv2 import openfv as fv

Load an image

image = cv2.imread('your_image.png')

Homomorphic filtering

filtered_image = fv.ww_homomorphic_filter(image, d0=30, rh=2.0, rl=0.5, c=2)

Amplitude spectrum calculation

spectrum_image = fv.ww_amplitude_spectrum(image)

Spectral residual saliency map generation

saliency_map = fv.ww_spectral_residual_saliency(image, size=64)

phase congruency edge

edge_map = fv.ww_phase_congruency_edge(image, nscale=4, norient=4,
minWaveLength=3,
mult=1.2,
sigmaOnf=0.9,
k=9.0,
cutOff=0.5,
g=9.0,
epsilon=0.01 )

deblur restoration

restored_image = fv.ww_tikhonov_regularization(image, psf=3, lambda_value=0.01)

Input

  • NumPy array representing an image
  • Supports both 2D (grayscale) and 3D (RGB) arrays
  • For functions requiring grayscale input (e.g., ww_homomorphic_filter), RGB images must be converted to grayscale.
  • For functions supporting RGB input (e.g., ww_amplitude_spectrum), RGB images are processed directly.

Output

  • uint8 grayscale image (for most functions)
  • Check specific function documentation for exceptions.

Dependencies

  • numpy (tested with 1.19.0 or later)
  • scipy (tested with 1.15.1 or later)
  • cv2 (tested with 4.11.0 or later)

License

This project is licensed under the MIT License - see the LICENSE file for details. Contributing Contributions are welcome! Please feel free to submit a Pull Request.

Author

Wonwoo Park (bemore.one@gmail.com)

Version History

  • 0.3.1: tikhonov_regularization added
  • 0.3.0: phase congruency edge added
  • 0.2.1: hann window function added in SRSM function
  • 0.2.0: spectral residual saliency map added
  • 0.1.9: amplitude spectrum added
  • 0.1.5: homomorphic filter added
  • 0.1.0: Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openfv-0.3.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openfv-0.3.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file openfv-0.3.1.tar.gz.

File metadata

  • Download URL: openfv-0.3.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for openfv-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b8af17a6aa55ddf6c0a33f6994fb65d0f6018c6a735826607285dd08494df157
MD5 473c290c77d47eb7bc5b22876fcc2751
BLAKE2b-256 565b47bcf806f093ac187a528df93b26f0782113cf1591b7b11565e4bd80d7e7

See more details on using hashes here.

File details

Details for the file openfv-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: openfv-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for openfv-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80f3a86ca8e3eab3746b7f3ef1105f2905083fe6c6c8a6014b77dcb623796ec5
MD5 4d256637fdd874d33597d5d039de1f7c
BLAKE2b-256 89f776a3419f0eca530269c8b211575550fd99f2f4cb3f7bf5b43cc1d27e020b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page