Filter löschen
Filter löschen

I am using multilevel histogram modification algorithm for embedding binary data into an image.Even if no data is added i am getting low psnr about 10 and mse close to 1.How can i improve psnr?

1 Ansicht (letzte 30 Tage)
Algorithm implemented on 3x3 matrix-
clc;
clear all;
fprintf('The image matrix A-');
fprintf('\n');
A=[55 53 52;54 53 52;56 56 54];
B=A;
B(2:2:end,:) = fliplr(A(2:2:end,:));
C=reshape(B',1,[]);
disp(A)
fprintf('Inverse S-scan of A-');
fprintf('\n');
disp(C);
fprintf('Size Of Inverse S-scan Matrix-');
fprintf('\n');
z=size(C);
t=z(1)*z(2);
disp(t);
for n=1:1:t
if (n==1)
D(n)=C(1,1);
elseif n>1
D(n)=C(1,(n-1))-C(1,n);
end
end
fprintf('Difference Computation matrix is-');
fprintf('\n');
disp(D);
for n=1:1:t
if (n==1)
E(n)=D(1,1);
else
if(D(n)>0)
E(n)=D(1,n)+1;
else
E(n)=D(1,n);
end
end
end
fprintf('Histogram Shifted Matrix-');
fprintf('\n');
disp(E);
for n=1:1:t
if(n==1)
F(n)=E(1,1);
elseif(E(n)==0)
F(n)=E(1,n)+1;
else
F(n)=E(n);
end
end
fprintf('Embedding of 1,1 in Given Matrix');
fprintf('\n');
disp(F);
for n=1:1:t
if(n==1)
G(n)=F(1,1);
else
G(n)=C(1,n-1)-F(1,n);
end
end
fprintf('Obtaining pixel value matrix');
fprintf('\n');
disp(G);
M=reshape(G,z(1),z(2));
M(:,2:2:end)=flipud(M(:,2:2:end));
M=M.';
fprintf('3x3 Matrix of Embedded Image Pixels');
fprintf('\n');
disp(M);
  1 Kommentar
Walter Roberson
Walter Roberson am 25 Jan. 2017
Have you tested on known data against known results?
That is, have you figured out whether the difficulty is with the algorithm or with a bug in your implementation of the algorithm?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by