A list,

Principle of wavelet transform

Wavelet transform is a time-scale (time-frequency) signal analysis method, a time-frequency localization analysis method in which the size of the window is fixed and the shape of the window can be changed, and the time window and frequency window can be changed. It is characterized by multi-resolution Analysis and has the ability to characterize local signal characteristics in both time and frequency domains.

Wavelet analysis method has high frequency resolution and low time resolution in the low frequency part, and high time partition rate and low frequency partition rate in the high frequency part, so it is known as “mathematical microscope”. It is this characteristic that makes the wavelet transform adaptive to the signal.

Wavelet analysis is as a harmonic analysis for half a century in the field of the mathematical crystallization, has been widely used in signal processing, image processing, quantum field theory, seismic exploration, speech recognition and synthesis, music, radar, CT imaging, color copies, fluid turbulence, object recognition, machine vision, mechanical fault diagnosis and monitoring, fractal and digital TV and other areas of science and technology.

In principle, wherever Fourier analysis has traditionally been used, wavelet analysis can be replaced. The advantage of wavelet analysis over Fourier transform is that it has good localization properties both in time domain and frequency domain.



In this way, the wavelet transform is regulative to the sampling step size of different frequencies in time domain: at low frequency, the wavelet transform has lower time resolution and higher frequency split rate; At high frequency, the temporal resolution of wavelet transform is high, but the rate-like resolution is low. This is consistent with the low frequency signal changes slowly and high frequency signal changes rapidly.

That’s where it’s superior to the classical Fourier transform and the STFT.

Ii. Source code

% simultaneously scrambled lines and columns for the first plaintext image encryption %%% clear; W = imread('lena.tif'); s = size(W); r = randsample(s(1), s(1)); W1 = W(r, :, :); c = randsample(s(2), s(2)); W2 = W1(:, c, :); i = 1; f = 1:length(c); while i <= length(c) f(i) = find(c == i); i = i + 1; end P = W2; R = P(:,:,1); % Extract R layer pixel of plaintext image G = P(:,:,2); % Extract G layer pixel of plaintext image B = P(:,:,3); % extract b-layer pixel of plaintext image figure(1) subplot(2,2,1); imshow(R,[]); Title (' R layer for first encryption '); Imwrite (R, 'R1. Tif) subplot,2,2 (2); imshow(G,[]); Title (' first encrypted G layer '); Imwrite (G, 'G1. Tif) subplot (2, 2, 3); imshow(B,[]); Title (' first encrypted layer B '); Imwrite (B, 'B1. Tif) subplot (2, 4-trichlorobenzene); imshow(P,[]); Title (' first encrypted RGB color layer '); Imwrite (P, 'first RGB color layer encryption. Tif') % % % % % % % % % % % second encryption [M, N] = size (R); % Sequence encryption of R-layered images is performed by Logistic chaos mapping u=3.9; X0 = 0.5; x=x0; X =u*x*(1-x); x=u*x*(1-x); end R1=zeros(1,M*N); % generate a one-dimensional chaotic encrypted sequence R1(1)=x; for i=1:M*N-1 R1(i+1)=u*R1(i)*(1-R1(i)); end R2=uint8(255*R1); % Normalized sequence R3= 0 0 (R2,M,N); R4= Bitxor (R,R3); % imWrite (R4,' r2.tif ') % [M,N]=size(G); % Sequence encryption of G-layered images is performed by Logistic chaos mapping u=3.9; X0 = 0.5; x=x0; X =u*x*(1-x); x=u*x*(1-x); end G1=zeros(1,M*N); % generate a one-dimensional chaotic encrypted sequence G1(1)=x; for i=1:M*N-1 G1(i+1)=u*G1(i)*(1-G1(i)); end G2=uint8(255*G1); 0 % Normalized sequence G3= 0 0 (G2,M,N); % is transformed into two-dimensional chaotic encrypted sequence G4=bitxor(G,G3); Imwrite (G4,' g2.tif ') % [M,N]=size(B); imwrite(G4,' g2.tif ') % [M,N]=size(B); % Sequence encryption of b-layered images is performed by Logistic chaos mapping u=3.9; X0 = 0.5; x=x0; X =u*x*(1-x); x=u*x*(1-x); end B1=zeros(1,M*N); % generate 1d chaotic encrypted sequence B1(1)=x; for i=1:M*N-1 B1(i+1)=u*B1(i)*(1-B1(i)); end B2=uint8(255*B1); % Normalized sequence B3= 0 0 (B2,M,N); % is transformed into two-dimensional chaotic encrypted sequence B4= Bitxor (B,B3); % imwrite(B4,' b2.tif ') % R4 =cat(3,R4,G4,B4); figure(2); Subplot (2, 2, 1); imshow(R4); Title (' image after second R layered encryption '); Subplot (2,2,2); imshow(G4); Title (' image after second G layered encryption '); Subplot (2, 2, 3); imshow(B4); Title (' image after second B layered encryption '); Subplot (2, 2, 4-trichlorobenzene); imshow(P1); Title (' second encrypted color RGB image '); Imwrite (P1, 'the second encrypted color RGB images. Tif) % % % % % % % % % % % % % % % % % % % % % % % % % % the cipher image embedded into the carrier image % % % % % % % % % % % % % % % % % % % % read image F = imread('houlian.tif'); Rf = F(:,:,1); % R layer pixel Gf = F(:,:,2); % Extract G layer pixel of carrier image Bf = F(:,:,3); % Image b-layer pixel figure(3); Subplot (2, 2, 1); imshow(Rf); Title (' Carrier image R layer '); Subplot (2,2,2); imshow(Gf); Title (' Carrier image G layer '); Subplot (2, 2, 3); imshow(Bf); Title (' Carrier image layer B '); Subplot (2, 2, 4-trichlorobenzene); imshow(F); Title (' carrier image RGB color layer '); RCV=mod(R4,10); RCV=mod(R4,10); RCD=floor(R4./10); GCV = mod (G4, 10); GCD=floor(G4./10); BCV = mod (B4, 10); BCD=floor(B4./10); % Layered wavelet decomposition of the carrier image, and embedded wave_in='db1'; [Rll,Rlh,Rhl,Rhh]=dwt2(Rf,wave_in); mv=mean(Rll(:)); For I =1:floor(M) for j=1:floor(N) if(Rll(I,j)>=mv) Rlh(I,j)=RCV(I,j); Rhl(i,j)=RCD(i,j); else Rlh(i,j)=RCD(i,j); Rhl(i,j)=RCV(i,j); end end end [Gll,Glh,Ghl,Ghh]=dwt2(Gf,wave_in); mv=mean(Gll(:)); For I =1:floor(M) for j=1:floor(N) if(Gll(I,j)>=mv) Glh(I,j)=GCV(I,j); Ghl(i,j)=GCD(i,j); else Glh(i,j)=GCD(i,j); Ghl(i,j)=GCV(i,j); end end end [Bll,Blh,Bhl,Bhh]=dwt2(Bf,wave_in); mv=mean(Bll(:)); For I =1:floor(M) for j=1:floor(N) if(Bll(I,j)>=mv) Blh(I,j)=BCV(I,j); Bhl(i,j)=BCD(i,j); else Blh(i,j)=BCD(i,j); Bhl(i,j)=BCV(i,j); FRGB Fr= IDWT2 (Rll,Rlh,Rhl,Rhh, WAVe_in); Fg=idwt2(Gll,Glh,Ghl,Ghh,wave_in); Fb=idwt2(Bll,Blh,Bhl,Bhh,wave_in); Frgb(:,:,1)=Fr; % % synthetic Frgb (:, :, 2) = Fg; % % synthetic Frgb (:, :, 3) = Fb; Synthetic Frgb % % = uint8 (Frgb); figure(4); Subplot (2, 2, 1); imshow(Fr,[]); Title (' load R layer '); Subplot (2,2,2); imshow(Fg,[]); Title (' load G layer '); Subplot (2, 2, 3); imshow(Fb,[]); Title (' load layer B '); Subplot (2, 2, 4-trichlorobenzene); imshow(uint8(Frgb),[]); Title (' Visual safety image '); Imwrite (Frgb, 'visual security image. Tif) % % % % % % % % % % % % % % % % % % % % % % % % % % from the vision of plaintext cipher security cipher image extracted % % % % % % % % % % % % % % % % % % % C = Frgb; % close all; % close all; Cr=C(:,:,1); Cg=C(:,:,2); Cb=C(:,:,3); [Rll1,Rlh1,Rhl1,Rhh1]=dwt2(Cr,wave_in); mv=median(Rll1(:)); RD1=zeros(M,N); RD2=zeros(M,N); For I =1:floor(M) for j=1:floor(N) if(Rll1(I,j)>=mv) RD1(I,j)=Rlh1(I,j); RD2(i,j)=Rhl1(i,j); else RD2(i,j)=Rlh1(i,j); RD1(i,j)=Rhl1(i,j); end end endCopy the code
3. Operation resultsCopy the code













Complete code or simulation consultation QQ1575304183