Path: news.mathworks.com!not-for-mail
From: "love " <love.scream1@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: I need to help?
Date: Fri, 19 Sep 2008 16:39:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <gb0kj5$ov3$1@fred.mathworks.com>
Reply-To: "love " <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 1221842341 25571 172.30.248.37 (19 Sep 2008 16:39:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 19 Sep 2008 16:39:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1482948
Xref: news.mathworks.com comp.soft-sys.matlab:490992


Hello all

run program in Matlab and try to understand the program:

1- find the quality at different &#8216;strength&#8217; value. Plot a graph of the quality of  the stego image and the reconstructed image vs &#8216;strength&#8217;.

--------------------program------------------
clear all
close all
[InputFileName, InputPathName] = uigetfile('c:\images\256\*.tif', 'Select Input Image');
   InputImageName = strcat(InputPathName,InputFileName)
    cover=imread(InputImageName);
    
%     if(~isgray(cover))
%         cover=rgb2gray(cover);
%     end
    
    figure
    imshow(cover,[])   %Display the cover image
   
    [InputFileName, InputPathName] = uigetfile('c:\images\256\*.tif', 'Select  Image to hide');
   InputImageName = strcat(InputPathName,InputFileName)
    hidden=imread(InputImageName);
    
    figure(1), title('Original image');
%     if(~isgray(hidden))
%         hidden=rgb2gray(hidden);
%     end
    figure, imshow(hidden,[])
   figure(2),  title('To be hidden');
    
    strength = input('Robustness of the watermark? (least = 1 to most = 50) ');
    alpha = .01; %Strength of the hidden information
    
    stego = (1-alpha) * cover + alpha * hidden;
    
    figure, imshow(stego, []);
    title('watermarked original');
    reconstructed = (stego - (1-alpha) * cover)./alpha;
    figure, imshow(reconstructed, []);
    title('Extracted')
    
    %%%See the difference between reconstructed and hidden
    diff = hidden - reconstructed;
------------------------------

thanks