The Haar Transform with example (order N=2) and its implementation in MATLAB IIBasis function matrix

Study with Dr. Dafda
Study with Dr. Dafda
2.5 هزار بار بازدید - پارسال - Video lecture series on Digital
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/folder...

#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))
پارسال در تاریخ 1402/02/07 منتشر شده است.
2,522 بـار بازدید شده
... بیشتر