BUTTERWORTH_LOW_CVIP
butterworth_low_cvip() -performs butterworth low pass filter operation.
Contents
SYNTAX
out_s = butterworth_low_cvip(spectrum,block_size,transform_type,order,fc)
Input parameters include :
- spectrum - An image of size [m n d] which is the spectrum of an image. It can be created by any of the 6 possible spectrums availabe in cviptools matlab toolbox: DCT, FFT, Haar, Walsh,Hadamard, Wavelet.
- block_size - The same parameter block_size used in the transforms.
- transform_type - The user should specify which spectrum is being given to this function. FFT has the origin at the center while the other transforms have their origin located at upper left corner of the image. transform_type is a string.If given spectrum is FFT,then set transform_type - 'fft' or 'center'.Else, the origin would be located at the upper left corner.
- order - The butterworth filters parameter.An integer greater than or equal to 1.As order increases the filter frequency response approches the ideal filter.
- fc - The cutoff frequency for low pass filter.
Output parameters include:
- out_s - output Image.
DESCRIPTION
This function performs a 2D low pass filtering operation on the spectrum of an image. It applies butterworth low pass filter of order specified by the user and allows the frequencies that are below the specified cutoff frequency.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% Create an spectrum by available transforms spectrum = ones(128,256,3); % Block size block_size1 = []; block_size2 = [64 128]; % Transform type transform_type1 =' fft'; transform_type2 ='non-fft'; transform_type3 ='center'; % Order order = 6; % cutoff frequency fc1 = 32; fc2 = 23; fc3 = 16; % Call function out_s1 = butterworth_low_cvip( spectrum,block_size1,transform_type1,order,fc1); out_s2 = butterworth_low_cvip( spectrum,block_size2, transform_type2,order, fc2); out_s3 = butterworth_low_cvip( spectrum,block_size2 , transform_type3,order,fc3); % Display output figure; imshow(out_s1,[]);title(' Output with FFT Transform'); figure; imshow(out_s2,[]);title(' Output with Non FFT Transform') figure; imshow(out_s3,[]);title('with center');
CREDITS
Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website