A ROBUST DIGITAL IMAGE WATERMARKING BASED ON JOINT DWT AND DCT
ABSTRACT
The authenticity & copyright protection are two major problems in handling digital multimedia. The Image watermarking is most popular method for copyright protection by discrete Wavelet Transform (DWT) which performs 2 Level Decomposition of original (cover) image and watermark image is embedded in Lowest Level (LL) sub band of cover image. Inverse Discrete Wavelet Transform (IDWT) is used to recover original image from watermarked image. And Discrete Cosine Transform (DCT) which convert image into Blocks of M bits and then reconstruct using IDCT. In this paper we have compared watermarking using DWT & DWT-DCT methods performance analysis on basis of PSNR, Similarity factor of watermark and recovered watermark.
The authenticity & copyright protection are two major problems in handling digital multimedia. The Image watermarking is most popular method for copyright protection by discrete Wavelet Transform (DWT) which performs 2 Level Decomposition of original (cover) image and watermark image is embedded in Lowest Level (LL) sub band of cover image. Inverse Discrete Wavelet Transform (IDWT) is used to recover original image from watermarked image. And Discrete Cosine Transform (DCT) which convert image into Blocks of M bits and then reconstruct using IDCT. In this paper we have compared watermarking using DWT & DWT-DCT methods performance analysis on basis of PSNR, Similarity factor of watermark and recovered watermark.
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
An Implementation of Audio Noise Reduction from Audio Signals and Speech Signals Using Wavelet Transform
ABSTRACT
PROJECT OUTPUT
Speech signal analysis is one of the important areas of research in multimedia applications. Discrete Wavelet technique is effectively reduces the unwanted higher or lower order frequency components in a speech signal. Wavelet-based algorithm for audio de-noising is worked out. We focused on audio signals corrupted with white Gaussian noise which is especially hard to remove because it is located in all frequencies. We use Discrete Wavelet transform (DWT) to transform noisy audio signal in wavelet domain. It is assumed that high amplitude DWT coefficients represent signal, and low amplitude coefficients represent noise. Using thresholding of coefficients and transforming them back to time domain it is possible to get audio signal with less noise. Our work has been modified by changing universal thresholding of coefficients which results with better audio signal. In this various parameters such as SNR, Elapsed Time, and Threshold value is analyzed on various types of wavelet techniques alike Coiflet, Daubechies, Symlet etc. In all these, best Daubechies as compared to SNR is more for Denoising and Elapsed Time is less than others for Soft thresholding. In using hard thresholding Symlet wavelet also works better than coiflet and Daubechies is best for all. Efficiency is 98.3 for de-noising audio signals which also gives us better results than various filters.
Audio noise reduction system is the system that is used to remove the noise from the audio signals. Audio noise reduction systems can be divided into two basic approaches. The first approach is the complementary type which involves compressing the audio signal in some well-defined manner before it is recorded (primarily on tape). The second approach is the single-ended or non-complementary type which utilizes techniques to reduce the noise level already present in the source material—in essence a playback only noise reduction system. This approach is used by the LM1894 integrated circuit, designed specifically for the reduction of audible noise in virtually any audio source. Noise reduction is the process of removing noise from a signal.
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
MATLAB Code for Ploting Magnitude, Angle, Real, and Imaginary parts of a Signal
Evaluate e^jw/(e^jw-0.5) at 501 equispaced points between [0,pi] and
plot its magnitude, angle, real, and imaginary parts.
%%%%%%%%%%% START %%%%%%%%%%%%%%%
clc;
w = [0:1:500]*pi/500;
X = exp(j*w) ./ (exp(j*w) - 0.5*ones(1,501));
magX = abs(X);
angX = angle(X);
realX = real(X); imagX = imag(X);
subplot(2,2,1); plot(w/pi,magX); grid
xlabel('frequency in pi units') ; title('Magnitude Part'); ylabel('Ma@tude')
subplot(2,2,3); plot(w/pi,angX); grid
xlabel('frequency in pi units'); title('Ang1e Part'); ylabel('Radians')
subplot(2,2,2); plot(w/pi,realX); grid
xlabel('frequency in pi units') ; title('Rea1 Part') ; ylabel('Real')
subplot(2,2,4); plot(w/pi,imagX); grid
xlabel('frequency in pi units'); title('1maginary Part'); ylabel('1maginary')
%%%%%%%%%%% END %%%%%%%%%%%%%%%
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
MATLAB Code for Sampling of Signal
MATLAB Code for Sampling of Signal
%%%%%%%%%%% START %%%%%%%%%%%%%%%
clc;
% Analog Signal
Dt = 0.00005;
t = -0.005:Dt:0.005;
xa = exp(-1000*abs(t));
% Discrete-time Signal
Ts = 0.0002; n = -25:1:25; x = exp(-1000*abs(n*Ts));
% Discrete-time Fourier transform
K = 500; k = 0:1:K; w = pi*k/K;
X = x * exp(-j*n'*w); X = real(X);
w = [-fliplr(w), w(2:K+1)];
X = [fliplr(X), X(2:K+1)];
subplot(1,1,1)
subplot(2,1,1);plot(t*1000,xa) ;
xlabel('t in msec.'); ylabel('x1(n)')
title('Diacrete Signal'); hold on
stem(n*Ts*1000,x);
subplot(2,1,2);plot(w/pi,X);
xlabel('Frequency in pi units'); ylabel('Xl(w)')
title('Discrete-time Fourier Transform')
%%%%%%%%%%% END %%%%%%%%%%%%%%%
%%%%%%%%%%% START %%%%%%%%%%%%%%%
clc;
% Analog Signal
Dt = 0.00005;
t = -0.005:Dt:0.005;
xa = exp(-1000*abs(t));
% Discrete-time Signal
Ts = 0.0002; n = -25:1:25; x = exp(-1000*abs(n*Ts));
% Discrete-time Fourier transform
K = 500; k = 0:1:K; w = pi*k/K;
X = x * exp(-j*n'*w); X = real(X);
w = [-fliplr(w), w(2:K+1)];
X = [fliplr(X), X(2:K+1)];
subplot(1,1,1)
subplot(2,1,1);plot(t*1000,xa) ;
xlabel('t in msec.'); ylabel('x1(n)')
title('Diacrete Signal'); hold on
stem(n*Ts*1000,x);
subplot(2,1,2);plot(w/pi,X);
xlabel('Frequency in pi units'); ylabel('Xl(w)')
title('Discrete-time Fourier Transform')
%%%%%%%%%%% END %%%%%%%%%%%%%%%
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
MATLAB Code for OFDM Using Convolutional coding
This project is based on generation of OFDM using Convolutional coding. Modulation technique used on this method is 16-QAM Modulation. Output of this project is shown above also SNR is calculated.
% OFDM Code
% No.of Carriers: 64
% coding used: Convolutional coding
% Single frame size: 96 bits
% Total no. of Frames: 100
% Modulation: 16-QAM
% No. of Pilots: 4
% Cylic Extension: 25%(16)
close all
clear all
clc
%%
% Generating and coding data
t_data=randint(9600,1)';
x=1;
si=1; %for BER rows
%%
for d=1:100
data=t_data(x:x+95);
x=x+96;
k=3;
n=6;
s1=size(data,2); % Size of input matrix
j=s1/k;
%%
% Convolutionally encoding data
constlen=7;
codegen = [171 133]; % Polynomial
trellis = poly2trellis(constlen, codegen);
codedata = convenc(data, trellis);
%%
%%BCH encoding of Data
h=fec.bchenc(7,4);
codedata1 = encode(h,data');
codedata1=codedata';
%%
%Interleaving coded data
s2=length(codedata);
j=s2/4;
matrix=reshape(codedata,j,4);
intlvddata = matintrlv(matrix',2,2)'; % Interleave.
intlvddata=intlvddata';
matrix1=reshape(codedata1,length(codedata1)/4,4);
intlvddata1 = matintrlv(matrix1',2,2)';
intlvddata1=intlvddata1';
%%
% Binary to decimal conversion
dec=bi2de(intlvddata','left-msb');
dec1=bi2de(intlvddata1','left-msb');
%%
%16-QAM Modulation
M=16;
y = qammod(dec,M);
y1 =qammod(dec1,M);
%%
% Pilot insertion
lendata=length(y);
lendata1=length(y1);
pilt=3+3j;
nofpits=4;
k=1;
for i=(1:13:52)
pilt_data1(i)=pilt;
for j=(i+1:i+12)
pilt_data1(j)=y(k);
pilt_data2(j)=y1(k);
k=k+1;
end
end
pilt_data1=pilt_data1';% size of pilt_data =52
pilt_data2=pilt_data2';
pilt_data(1:52)=pilt_data1(1:52); % upsizing to 64
pilt_data3(1:52)=pilt_data2(1:52);
pilt_data(13:64)=pilt_data1(1:52); % upsizing to 64
pilt_data3(13:64)=pilt_data2(1:52);
for i=1:52
pilt_data(i+6)=pilt_data1(i);
pilt_data3(i+6)=pilt_data2(i);
end
%%
% IFFT
ifft_sig=ifft(pilt_data',64);
ifft_sig1=ifft(pilt_data3',64);
%%
% Adding Cyclic Extension
cext_data=zeros(80,1);
cext_data(1:16)=ifft_sig(49:64);
cext_data1(1:16)=ifft_sig1(49:64);
for i=1:64
cext_data(i+16)=ifft_sig(i);
cext_data1(i+16)=ifft_sig1(i);
end
%%
% Channel
% SNR
o=1;
for snr=0:2:50
ofdm_sig=awgn(cext_data,snr,'measured'); % Adding white Gaussian Noise
ofdm_sig1=awgn(cext_data1,snr,'measured');
%%
% RECEIVER
%%
%Removing Cyclic Extension
for i=1:64
rxed_sig(i)=ofdm_sig(i+16);
rxed_sig1(i)=ofdm_sig1(i+16);
end
%%
% FFT
ff_sig=fft(rxed_sig,64);
ff_sig1=fft(rxed_sig1,64);
%%
% Pilot Synch%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:52
synched_sig1(i)=ff_sig(i+6);
synched_sig2(i)=ff_sig1(i+6);
end
k=1;
for i=(1:13:52)
for j=(i+1:i+12);
synched_sig(k)=synched_sig1(j);
synched_sig3(k)=synched_sig2(j);
k=k+1;
end
end
%%
% Demodulation
dem_data= qamdemod(synched_sig,16);
dem_data1=qamdemod(synched_sig3,16);
%%
% Decimal to binary conversion
bin=de2bi(dem_data','left-msb');
bin=bin';
bin1=de2bi(dem_data','left-msb');
bin1=bin1';
%%
% De-Interleaving
deintlvddata = matdeintrlv(bin,2,2); % De-Interleave
deintlvddata=deintlvddata';
deintlvddata=deintlvddata(:)';
deintlvddata1 = matdeintrlv(bin1,2,2);
deintlvddata1 = deintlvddata1';
deintlvddata1=deintlvddata1(:)';
%%
%Decoding data
n=6;
k=3;
decodedata =vitdec(deintlvddata,trellis,5,'trunc','hard'); % decoding datausing veterbi decoder
rxed_data=decodedata;
%%
%Decoding of bch data
h1= fec.bchdec(h);
decodedata1 = decode(h1,deintlvddata1(1:189)');
decodedata1 = decodedata1';
rxed_data1=decodedata1;
%%
% Calculating BER
rxed_data=rxed_data(:)';
errors=0;
rxed_data1=rxed_data1(:)';
errors1=0;
c=xor(data,rxed_data);
c1=xor(data,rxed_data1(1:length(data)));
errors=nnz(c);
errors1=nnz(c);
BER(si,o)=errors/length(data);
BER1(si,o)=errors1/length(data);
papr(o)= max(abs(ofdm_sig).^2)/mean(abs(ofdm_sig).^2);
papr1(o)= max(abs(ofdm_sig1).^2)/mean(abs(ofdm_sig1).^2);
o=o+1;
end % SNR loop ends here
si=si+1;
end % main data loop
%%
% Time averaging for optimum results
for col=1:25; %%%change if SNR loop Changed
ber(1,col)=0;
for row=1:100;
ber(1,col)=ber(1,col)+BER(row,col);
end
end
ber=ber./100;
for col=1:25; %%%change if SNR loop Changed
ber1(1,col)=0;
for row=1:100;
ber1(1,col)=ber1(1,col)+BER1(row,col);
end
end
ber1=ber1./100;
%%
figure(1);
index=1:80;
pause(2)
plot(index,cext_data,'b',index,ofdm_sig,'r'); %plot both signals
legend('Original Signal to be Transmitted','Signal with AWGN');
title('In the Channel trilles encoded')
pause(2)
figure(2)
plot(index,cext_data1,'b',index,ofdm_sig1,'r'); %plot both signals
legend('Original Signal to be Transmitted','Signal with AWGN');
title('In the Channel BCH encoded')
pause(2)
figure(3)
i=0:2:48;
semilogy(i,ber);
title('BER vs SNR of trilles encoded signal');
ylabel('BER');
xlabel('SNR (dB)');
grid on
figure(4)
i=0:2:48;
semilogy(i,ber1);
title('BER vs SNR of bch encoded signal');
ylabel('BER');
xlabel('SNR (dB)');
grid on
% No.of Carriers: 64
% coding used: Convolutional coding
% Single frame size: 96 bits
% Total no. of Frames: 100
% Modulation: 16-QAM
% No. of Pilots: 4
% Cylic Extension: 25%(16)
close all
clear all
clc
%%
% Generating and coding data
t_data=randint(9600,1)';
x=1;
si=1; %for BER rows
%%
for d=1:100
data=t_data(x:x+95);
x=x+96;
k=3;
n=6;
s1=size(data,2); % Size of input matrix
j=s1/k;
%%
% Convolutionally encoding data
constlen=7;
codegen = [171 133]; % Polynomial
trellis = poly2trellis(constlen, codegen);
codedata = convenc(data, trellis);
%%
%%BCH encoding of Data
h=fec.bchenc(7,4);
codedata1 = encode(h,data');
codedata1=codedata';
%%
%Interleaving coded data
s2=length(codedata);
j=s2/4;
matrix=reshape(codedata,j,4);
intlvddata = matintrlv(matrix',2,2)'; % Interleave.
intlvddata=intlvddata';
matrix1=reshape(codedata1,length(codedata1)/4,4);
intlvddata1 = matintrlv(matrix1',2,2)';
intlvddata1=intlvddata1';
%%
% Binary to decimal conversion
dec=bi2de(intlvddata','left-msb');
dec1=bi2de(intlvddata1','left-msb');
%%
%16-QAM Modulation
M=16;
y = qammod(dec,M);
y1 =qammod(dec1,M);
%%
% Pilot insertion
lendata=length(y);
lendata1=length(y1);
pilt=3+3j;
nofpits=4;
k=1;
for i=(1:13:52)
pilt_data1(i)=pilt;
for j=(i+1:i+12)
pilt_data1(j)=y(k);
pilt_data2(j)=y1(k);
k=k+1;
end
end
pilt_data1=pilt_data1';% size of pilt_data =52
pilt_data2=pilt_data2';
pilt_data(1:52)=pilt_data1(1:52); % upsizing to 64
pilt_data3(1:52)=pilt_data2(1:52);
pilt_data(13:64)=pilt_data1(1:52); % upsizing to 64
pilt_data3(13:64)=pilt_data2(1:52);
for i=1:52
pilt_data(i+6)=pilt_data1(i);
pilt_data3(i+6)=pilt_data2(i);
end
%%
% IFFT
ifft_sig=ifft(pilt_data',64);
ifft_sig1=ifft(pilt_data3',64);
%%
% Adding Cyclic Extension
cext_data=zeros(80,1);
cext_data(1:16)=ifft_sig(49:64);
cext_data1(1:16)=ifft_sig1(49:64);
for i=1:64
cext_data(i+16)=ifft_sig(i);
cext_data1(i+16)=ifft_sig1(i);
end
%%
% Channel
% SNR
o=1;
for snr=0:2:50
ofdm_sig=awgn(cext_data,snr,'measured'); % Adding white Gaussian Noise
ofdm_sig1=awgn(cext_data1,snr,'measured');
%%
% RECEIVER
%%
%Removing Cyclic Extension
for i=1:64
rxed_sig(i)=ofdm_sig(i+16);
rxed_sig1(i)=ofdm_sig1(i+16);
end
%%
% FFT
ff_sig=fft(rxed_sig,64);
ff_sig1=fft(rxed_sig1,64);
%%
% Pilot Synch%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:52
synched_sig1(i)=ff_sig(i+6);
synched_sig2(i)=ff_sig1(i+6);
end
k=1;
for i=(1:13:52)
for j=(i+1:i+12);
synched_sig(k)=synched_sig1(j);
synched_sig3(k)=synched_sig2(j);
k=k+1;
end
end
%%
% Demodulation
dem_data= qamdemod(synched_sig,16);
dem_data1=qamdemod(synched_sig3,16);
%%
% Decimal to binary conversion
bin=de2bi(dem_data','left-msb');
bin=bin';
bin1=de2bi(dem_data','left-msb');
bin1=bin1';
%%
% De-Interleaving
deintlvddata = matdeintrlv(bin,2,2); % De-Interleave
deintlvddata=deintlvddata';
deintlvddata=deintlvddata(:)';
deintlvddata1 = matdeintrlv(bin1,2,2);
deintlvddata1 = deintlvddata1';
deintlvddata1=deintlvddata1(:)';
%%
%Decoding data
n=6;
k=3;
decodedata =vitdec(deintlvddata,trellis,5,'trunc','hard'); % decoding datausing veterbi decoder
rxed_data=decodedata;
%%
%Decoding of bch data
h1= fec.bchdec(h);
decodedata1 = decode(h1,deintlvddata1(1:189)');
decodedata1 = decodedata1';
rxed_data1=decodedata1;
%%
% Calculating BER
rxed_data=rxed_data(:)';
errors=0;
rxed_data1=rxed_data1(:)';
errors1=0;
c=xor(data,rxed_data);
c1=xor(data,rxed_data1(1:length(data)));
errors=nnz(c);
errors1=nnz(c);
BER(si,o)=errors/length(data);
BER1(si,o)=errors1/length(data);
papr(o)= max(abs(ofdm_sig).^2)/mean(abs(ofdm_sig).^2);
papr1(o)= max(abs(ofdm_sig1).^2)/mean(abs(ofdm_sig1).^2);
o=o+1;
end % SNR loop ends here
si=si+1;
end % main data loop
%%
% Time averaging for optimum results
for col=1:25; %%%change if SNR loop Changed
ber(1,col)=0;
for row=1:100;
ber(1,col)=ber(1,col)+BER(row,col);
end
end
ber=ber./100;
for col=1:25; %%%change if SNR loop Changed
ber1(1,col)=0;
for row=1:100;
ber1(1,col)=ber1(1,col)+BER1(row,col);
end
end
ber1=ber1./100;
%%
figure(1);
index=1:80;
pause(2)
plot(index,cext_data,'b',index,ofdm_sig,'r'); %plot both signals
legend('Original Signal to be Transmitted','Signal with AWGN');
title('In the Channel trilles encoded')
pause(2)
figure(2)
plot(index,cext_data1,'b',index,ofdm_sig1,'r'); %plot both signals
legend('Original Signal to be Transmitted','Signal with AWGN');
title('In the Channel BCH encoded')
pause(2)
figure(3)
i=0:2:48;
semilogy(i,ber);
title('BER vs SNR of trilles encoded signal');
ylabel('BER');
xlabel('SNR (dB)');
grid on
figure(4)
i=0:2:48;
semilogy(i,ber1);
title('BER vs SNR of bch encoded signal');
ylabel('BER');
xlabel('SNR (dB)');
grid on
Contact:
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com