image_decimate - Decimate 2-D image by an integer factor.
output = image_decimate(image, decimation_ratio, fit_to_fft, frequency_low, frequency_high)
- image to be decimated
image decimation ratio (should be >1, function will not return size increased image)
- window image to FFT friendly size or not (default False).
- low pass filter starting frequency
- low pass filter stop frequency
- image reduced to 1/decimation_ratio size.
=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.
- Image size fit to FFT will speed up the image filtration.
- This function usually is applied to reduce size of large images
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
- category 1
None. It is perfect.