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?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
Walter Roberson
2017년 1월 25일
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?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!