Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!f36g2000hsa.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: I need to help?
Date: Fri, 19 Sep 2008 09:54:08 -0700 (PDT)
Organization: http://groups.google.com
Lines: 72
Message-ID: <e7ea5034-2104-4ba0-8820-104944d5d5a3@f36g2000hsa.googlegroups.com>
References: <gb0kj5$ov3$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1221843249 8526 127.0.0.1 (19 Sep 2008 16:54:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 19 Sep 2008 16:54:09 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f36g2000hsa.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
Xref: news.mathworks.com comp.soft-sys.matlab:490994


On Sep 19, 12:39=A0pm, "love " <love.scre...@gmail.com> wrote:
> Hello all
>
> run program in Matlab and try to understand the program:
>
> 1- find the quality at different &#8216;strength&#8217; value. Plot a gra=
ph of the quality of =A0the stego image and the reconstructed image vs &#82=
16;strength&#8217;.
>
> --------------------program------------------
> clear all
> close all
> [InputFileName, InputPathName] =3D uigetfile('c:\images\256\*.tif', 'Sele=
ct Input Image');
> =A0 =A0InputImageName =3D strcat(InputPathName,InputFileName)
> =A0 =A0 cover=3Dimread(InputImageName);
>
> % =A0 =A0 if(~isgray(cover))
> % =A0 =A0 =A0 =A0 cover=3Drgb2gray(cover);
> % =A0 =A0 end
>
> =A0 =A0 figure
> =A0 =A0 imshow(cover,[]) =A0 %Display the cover image
>
> =A0 =A0 [InputFileName, InputPathName] =3D uigetfile('c:\images\256\*.tif=
', 'Select =A0Image to hide');
> =A0 =A0InputImageName =3D strcat(InputPathName,InputFileName)
> =A0 =A0 hidden=3Dimread(InputImageName);
>
> =A0 =A0 figure(1), title('Original image');
> % =A0 =A0 if(~isgray(hidden))
> % =A0 =A0 =A0 =A0 hidden=3Drgb2gray(hidden);
> % =A0 =A0 end
> =A0 =A0 figure, imshow(hidden,[])
> =A0 =A0figure(2), =A0title('To be hidden');
>
> =A0 =A0 strength =3D input('Robustness of the watermark? (least =3D 1 to =
most =3D 50) ');
> =A0 =A0 alpha =3D .01; %Strength of the hidden information
>
> =A0 =A0 stego =3D (1-alpha) * cover + alpha * hidden;
>
> =A0 =A0 figure, imshow(stego, []);
> =A0 =A0 title('watermarked original');
> =A0 =A0 reconstructed =3D (stego - (1-alpha) * cover)./alpha;
> =A0 =A0 figure, imshow(reconstructed, []);
> =A0 =A0 title('Extracted')
>
> =A0 =A0 %%%See the difference between reconstructed and hidden
> =A0 =A0 diff =3D hidden - reconstructed;
> ------------------------------
>
> thanks
---------------------------------------------------------------------------=
-----------
"love":
I didn't need to run it - I can tell just from reading the code.
Basically it blends two images together and asks you to give a
subjective rating on the "robustness" (whatever that is) of the
watermark.  You'd need to define "robustness" better and then, after
you've plotted robustness vs. blending percentage, make some kind of
subjective call about which blending factor is "best."  This is a very
simple to construct and very visible type of watermark.  It's not
really steganography because it's not hidden.  There are so many ways
to hide one image in another that can't be detected as easily as your
method and can only be found with knowledge of how it was
constructed.  You could think up your own with a little thought, but
this blending method is not a very effective one.
You're welcome.
Did I win?
Regards,
ImageAnalyst