Video lecture series on Digital Image Processing, Lecture: 60,
The Haar Wavelet Transform with example (order N=2) and its implementation in MATLAB II Haar Basis function transformation matrix
Scaling function, Wavelet function
Link to download ppts/lecture notes:
https://drive.google.com/drive/folders/1AtR1eq6ZvQf-5vjXEMUPXNj2S0d9rAMZ?usp=share_link
#DIP
#DIPwithMATLAB
#DigitalImageProcessingUsingMATLAB
#digitalimageprocessing
#digitalimageprocessinglecturesin4K
#StudywithDrDafda
MATLAB code used in the video is given below:
% MATLAB program for generating Haar Matrix with N = 2
close all;
clear all;
clc;
% Input :
% N : size of matrix to be generated, N must be some power of 2.
prompt = "Enter the size of Haar transformation matrix:";
N = input(prompt);
% Hr : Haar matrix of size NxN
if (N(less than)2 || (log2(N)-floor(log2(N)))~=0)
error('The input argument should be of form 2^k');
end
p=[0 0];
q=[0 1];
n=nextpow2(N);
for i=1:n-1
p=[p i*ones(1,2^i)];
t=1:(2^i);
q=[q t];
end
Hr=zeros(N,N);
Hr(1,:)=1;
for i=2:N;
P=p(1,i); Q=q(1,i);
for j= (N*(Q-1)/(2^P)):(N*((Q-0.5)/(2^P))-1)
Hr(i,j+1)=2^(P/2);
end
for j= (N*((Q-0.5)/(2^P))):(N*(Q/(2^P))-1)
Hr(i,j+1)=-(2^(P/2));
end
end
disp('Haar matrix of size NxN is');
Hr=Hr*(1/sqrt(N))
Download
0 formats
No download links available.
The Haar Transform with example (order N=2) and its implementation in MATLAB IIBasis function matrix | NatokHD