Path: news.mathworks.com!not-for-mail
From: "ABUTALA " <love.scream1@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: I need to help?
Date: Sun, 21 Sep 2008 18:48:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 46
Message-ID: <gb64t3$aib$1@fred.mathworks.com>
References: <gb0kj5$ov3$1@fred.mathworks.com> <e7ea5034-2104-4ba0-8820-104944d5d5a3@f36g2000hsa.googlegroups.com> <95fd5329-1f60-4e26-9749-9f14566c5ac3@m45g2000hsb.googlegroups.com> <gb137u$n54$1@fred.mathworks.com> <j7VAk.522$zk7.162@newsfe06.iad> <gb1e8d$3q1$1@fred.mathworks.com> <xJnBk.11462$Il.5926@newsfe09.iad> <gb584e$mb5$1@fred.mathworks.com> <Z_uBk.16998$wr1.9977@newsfe02.iad>
Reply-To: "ABUTALA " <love.scream1@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222022883 10827 172.30.248.37 (21 Sep 2008 18:48:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 21 Sep 2008 18:48:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1482948
Xref: news.mathworks.com comp.soft-sys.matlab:491210


Thank Walter Roberson.

Well, what is code that i add it to program and then program find the quality?


program :
clear all
close all
[InputFileName, InputPathName] = uigetfile('*.tif', 'Select Input Image');
   InputImageName = strcat(InputPathName,InputFileName)
    cover=imread(InputImageName);
    
    if ndims(cover) == 3
    cover = rgb2gray(cover);
  end
    
    figure, imshow(cover,[])   %Display the cover image
    
    [InputFileName, InputPathName] = uigetfile('*.tif', 'Select  Image to hide');
   InputImageName = strcat(InputPathName,InputFileName)
    hidden=imread(InputImageName);
    if ndims(hidden) == 3
    hidden = rgb2gray(hidden);
  end
    figure, imshow(hidden,[])
    alpha = .02; %Strength of the hidden information
    stego = (1-alpha) * cover + alpha * hidden;
    
    figure, imshow(stego, []);
    reconstructed = (stego - (1-alpha) * cover)./alpha;
    figure, imshow(reconstructed, []);
    
    %%%See the difference between reconstructed and hidden
    diff = hidden - reconstructed;
 if reconstructed == hidden
   error('Images are identical: PSNR has infinite value')
end
max2_A = max(max(reconstructed));
max2_B = max(max(hidden));
min2_A = min(min(reconstructed));
min2_B = min(min(hidden));
er = reconstructed - hidden;
decibels = 20*log10(1/(sqrt(mean(mean(er.^2)))))
plot(stego,reconstructed)
---------------------------------------------------------
Thanks