Name

image_decimate - Decimate 2-D image by an integer factor.

Usage

output = image_decimate(image, decimation_ratio, fit_to_fft, frequency_low, frequency_high)

Input

image
image to be decimated
decimation_ratio

image decimation ratio (should be >1, function will not return size increased image)

fit_to_fft
window image to FFT friendly size or not (default False).
frequency_low
low pass filter starting frequency
frequency_high
low pass filter stop frequency

Output

output
image reduced to 1/decimation_ratio size.

Options

fit_to_fft

=1 fit to FFT friendly size using smallprime function  `X_(fft), Y_(fft) = 2^i*3^j*5^k <= X ,Y `.

  • else directly apply filter and decimation without size modification.

Description

  1. Image size fit to FFT will speed up the image filtration.
  2. This function usually is applied to reduce size of large images

Method

Input image is low-passed filtered using a Butterworth low-pass filter to the limiting fequency calculated fromt the decimation ratio and subsequently is decimated (every decimation_ratio's sample is selected). Output image size is the integer less equal to the input image size divided by the decimation ratio.

If fit_to_fft is True, both input and out images are windowed to the neares FFT-friendly size currently set as a product of 2, 3, and 5. Please see function smallprime in fundamentals.py for details - the number of primes used can be changed there. UTILITIES

Author / Maintainer

Zhong Huang

Keywords

category 1
FUNDAMENTALS

Files

fundamentals.py

See also

resample

Maturity

alpha
works

Bugs

None. It is perfect.

image_decimate (last edited 2013-07-01 13:12:54 by localhost)