|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [WM]: MATLAB problem in color Image Processing
Dear tdhien
Thanks for your reply,. I truly appreciate it.
but still there is a difference between c7 and c3 which are supposed to b= e the
same
and also between moda and x which are also supposed to be the same
do you have any suggestions why this difference
occur?
Thanks a lot
Dahlia
-------Original Message-------
From: Thai, Hien Duy
Date: 02 يوليو, 2005 11:11:21 م
To: watermarking@watermarkingworld.org
Subject: Re: [WM]: MATLAB problem in color Image Processing
Dear ahlia,
You may make a mistake when convert the
data type between uint8 (0- 255,
8-bit) and double
Change: "save modlisa.mat atmon" intead of "save modlisa.mat catmon8" in
the first program, nd "mor=catmon" intead of "mor=catmon8" in the second
program. You multiply all the coefficients by 100, and then the data is over "uint8".
Usually, when one watermark color image.
Color images are converted in to= a YIQ representation and the rightness component Y is then watermarked. The color image can then
be converted to other formats but should be converte= d back to YIQ to extraction watermark. Or you can directly watermark into R= ,
G and B respectively.
tdhien
xc=imread('monalisa.bmp');
figure(1)
imshow(xc)
%Title('The Original Image
256 * 256')
x1=xc(:,:,1);
x1=double(x1);
x2=xc(:,:,2);
x2=double(x2);
x3=xc(:,:,3);
x3=double(x3);
x=x3;
[c3,s3]=wavedec2(x,2,'db1'); % size of ch2,cv2,cd2 is 4761*3=14283
c4=c3.*100;
s4=s3;
mod=waverec2(c4,s4,'db1');
catmon=cat(3,x1,x2,mod);
catmon8=uint8(catmon);
%save modlisa.mat catmon8
save modlisa.mat catmon;
figure(2)
imshow(catmon8)
imwrite(catmon8,'modlisa.bmp')
load modlisa.mat
%mor=imread('modlisa.bmp');
%mor=catmon8;
mor=catmon;
figure(1)
imshow(mor)
Title('The Original Image')
y1r=mor(:,:,1);
y1r=double(y1r);
y2g=mor(:,:,2);
y2g=double(y2g);
y3b=mor(:,:,3);
y3b=double(y3b);
y= yR>3b;
[c6,s6]=wavedec2(y,2,'db1');
c7=c6./100;
s7=s6;
moda=waverec2(c7,s7,'db1');
catmona=cat(3,y1r,y2g,moda);
catmona8=uint8(catmona);
figure(2)
imshow(catmona8)
image([catmona8])
imwrite(catmona8,'modlisab2n.bmp')
----- Original Message -----
From: Dahlia
To: watermarking@watermarkingworld.org
Sent: Friday, July 01, 2005 8:35 PM
Subject: [WM]: MATLAB problem in color Image Processing
Hello
I am working in the field of Digital Image
Watermarking for olored images=
Attached to this email are two programs
In order to process colored images as in the 1st
program
-I first separated the three RGB components from one nother
-then I performed a DWT on the Bule image component
-and then I tried to multiply all the coefficients by a onstant number (1= 00)
-Then performed an IDWT on the modified blue image
omponent
-and Finally, I combined the RG and modified blue omponents back together and wrote the modified image
In the 2nd
program
I read the modified RGB image, separated the three omponents
and then performed a DWT on the blue modified image
omponent
Then I divided all the coefficients by the same constant used in the 1st stage (100)
Then I performed an IDWT on the
modified blue image omponent
and finall combined the RG and B all together and wrote the processed ima= ge
matter of fact,
there is a difference between both images, the original Monalisa Image and the processed image.
The precision have been doubled
for all variables.
When the value of the constant change the difference etween the original = and processed images change
when
the mul;tiplication and division are changed into ddition and subtraction, for values below 100, there is a slight modifications,
for values below 1000 , they are more, and so on
so I want to ask why is the process not reversible?
In other meanings
the subtraction should cancel the effect of addition
and the division should cancel the effect of the multiplication,
but this
is not what happens
This problem doesn't appear in gray-level images; and a olored image is supposed to be a three stacks
of gray level images, so I really cannot explain why this happens and I would truly appreciate a further assistan= ce to solve
it.
Also, if you can direct me for further readings in the area of watermarki= ng colored images, I would truly
appreciate it. As a matter of fact, I could only find 3 papers on the internet and the three dds PN sequences while I would like to
add a picture which involves multiplying and dividing by th= e weighing factor (ALPHA)
Thanks in Advance
===========================
Eng. Dahlia R. ElShafie
Teaching Assistant nd M.Sc. Student
Electronics and communications
College of ngineering and Technology
Arab Academy for Science and Technology
Alexandria-Egypt
________
Watermarking Mailing List - http://www.watermarkingworld.org/ml.html
To unsubscribe send email to "majordomo@watermarkingworld.org" with
"unsubscribe watermarking YOURMAIL" in the body.
_____________________________________________________________________________
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.2 - Release ate: 2005/06/04 --------------Boundary-00=_CQP0G6G0000000000000
Content-Type: Text/HTML;
charset="windows-1256"
Content-Transfer-Encoding: quoted-printable
<meta http-equiv="Content-Type" content="text/html; charset=windows= -1256"><html> <head> <meta name="GENERATOR"
content="IncrediMail 1.0">
<!--IncrdiXMLRemarkStart> <IncrdiX-Info> <X-FID>FLAVOR00-NONE-0000-0000-000000000000</X-FID>
<X-FVER></X-FVER>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->
</head>
<BODY background="" bgColor=#ffffff style="BACKGROUND-POSITION: 0px= 0px; FONT-SIZE: 10pt; MARGIN: 1px; FONT-FAMILY: Arial"
scroll=yes ORGY= POS="0" X-FVER="2.0"> <TABLE border=0 cellPadding=0 cellSpacing=0 id=INCREDIMAINTABLE width="95%"> <TR>
<TD id=INCREDITEXTREGION width="100%" style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: 10pt; FONT-FAMILY: Arial"
>
<DIV>
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=0 width== "95%"
border=0>
<TR>
<TD id=INCREDITEXTREGION
style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: 10pt= ; FONT-FAMILY: Arial"
width="100%">
<DIV>Dear <SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial">tdhien</SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial"></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: rial">Thank= s for
your reply,. I truly appreciate it.</SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: rial">but s= till
there is a difference between c7 and c3 which are supposed to= be the
same</SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: rial">and a= lso
between moda and x which are also supposed to be the
same</SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial"></SPAN> </DIV>
<DIV>do you have any suggestions why this difference occur?</DIV>
<DIV> </DIV>
<DIV>Thanks a lot</DIV>
<DIV> </DIV>
<DIV>Dahlia</DIV></TD></TR></TABLE></DIV>
<DIV> </DIV>
<DIV id=IncrediOriginalMessage><I>-------Original Message-------<= /I></DIV>
<DIV> </DIV>
<DIV id=receivestrings>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>From:</B></I> <A
href="mailto:tdhien@augusta.eee.u-ryukyu.ac.jp">Thai, Hien Duy</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>Date:</B></I> 02 ي= وليو, 2005
11:11:21 م</DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>To:</B></I> <A
href="mailto:watermarking@watermarkingworld.org">watermarking@watermarkingworld.org</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>Subject:</B></I> Re:= [WM]:
MATLAB problem in color Image Processing</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Dear
ahlia,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">You may make a m= istake
when convert the data type between uint8 (0- 255, 8-bit) and
double<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Change: "save modlisa= .mat
atmon" intead of "save modlisa.mat catmon8" in the first prog= ram,
nd "mor=catmon" intead of "mor=catmon8" = in
the second program. <SPAN
style="mso-spacerun: yes"> </SPAN>You multiply all the
coefficients by 100, and then the data is over "uint8".
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Usually, when one wat= ermark
color image. Color images are converted in to a YIQ representation = and the
rightness component Y is then watermarked. The color image can then= be
converted to other formats but should be converted back to YIQ to
extraction watermark. Or you can directly watermark into R, G, and = B
respectively.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: rial">tdhien<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt"></SPAN><BR>xc=imread('monalisa.bmp');<BR>figure(1)<BR>imshow(xc)<BR>%Title('The
Original Image 256 *
256')<BR>x1=xc(:,:,1);<BR>x1=double(x1);<BR>x2=xc(:,:,2);<BR>x2=double(x2);<BR>x3=xc(:,:,3);<BR>x3=double(x3);<BR>x=x3;<BR>[c3,s3]=wavedec2(x,2,'db1');
% size of ch2,cv2,cd2 is
4761*3=14283<BR>c4=c3.*100;<BR>s4=s3;<BR>mod=waverec2(c4,s4,'db1');<BR>catmon=cat(3,x1,x2,mod);<BR>catmon8=uint8(catmon);<BR>%save
modlisa.mat catmon8<BR>save modlisa.mat
catmon;<BR>figure(2)<BR>imshow(catmon8)<BR>imwrite(catmon8,'modlisa.bmp')</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><BR>load
modlisa.mat<BR>%mor=imread('modlisa.bmp');<BR>%mor=catmon8;<BR>mor=catmon;<BR>figure(1)<BR>imshow(mor)<BR>Title('The
Original
Image')<BR>y1r=mor(:,:,1);<BR>y1r=double(y1r);<BR>y2g=mor(:,:,2);<BR>y2g=double(y2g);<BR>y3b=mor(:,:,3);<BR>y3b=double(y3b);<BR>y=
yR>3b;<BR>[c6,s6]=wavedec2(y,2,'db1');<BR>c7=c6./100;<BR>s7=s6;<BR>moda=waverec2(c7,s7,'db1');<BR>catmona=cat(3,y1r,y2g,moda);<BR>catmona8=uint8(catmona);<BR>figure(2)<BR>imshow(catmona8)<BR>image([c
>atmona8])<BR>imwrite(catmona8,'modlisab2n.bmp')<BR></P></DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: lack"><B>From:</B>
<A title=dollissima@hotmail.com
href="mailto:dollissima@hotmail.com">Dahlia</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=watermarking@watermarkingworld.org
href="mailto:watermarking@watermarkingworld.org">watermarking@watermarkingworld.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, July 01, 2005 8:35
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [WM]: MATLAB prob= lem in
color Image Processing</DIV>
<DIV><BR></DIV>
<TABLE id=rem_INCREDIMAINTABLE cellSpacing=0 cellPadding=0 = width="95%"
border=0>
<TR>
<TD id=rem_INCREDITEXTREGION
style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: 10= pt; FONT-FAMILY: Arial"
width="100%">
<DIV> </DIV>
<DIV> </DIV>
<DIV>Hello</DIV>
<DIV> </DIV>
<DIV>I am working in the field of Digital Image Watermarkin= g for
olored images</DIV>
<DIV> </DIV>
<DIV>Attached to this email are two programs</DIV>
<DIV>In order to process colored images as in the 1st program</DIV>
<DIV> </DIV>
<DIV>-I first separated the three RGB components from one
nother</DIV>
<DIV>-then I performed a DWT on the Bule image component</DIV>
<DIV>-and then I tried to multiply all the coefficients by = a
onstant number (100)</DIV>
<DIV>-Then performed an IDWT on the modified blue image
omponent</DIV>
<DIV>-and Finally, I combined the RG and modified blue ompo= nents
back together and wrote the modified image</DIV>
<DIV> </DIV>
<DIV>In the 2nd program</DIV>
<DIV> </DIV>
<DIV>I read the modified RGB image, separated the three
omponents</DIV>
<DIV>and then performed a DWT on the blue modified image
omponent</DIV>
<DIV>Then I divided all the coefficients by the same consta= nt
used in the 1st stage (100)</DIV>
<DIV>Then I performed an IDWT on the modified blue image
omponent</DIV>
<DIV>and finall combined the RG and B all together and wrot= e the
processed image</DIV>
<DIV> </DIV>
<DIV>matter of fact, there is a difference between both ima= ges,
the original Monalisa Image and the processed image.</DIV>
<DIV>The precision have been doubled for all variables.</DIV>
<DIV>When the value of the constant change the difference e= tween
the original and processed images change</DIV>
<DIV>when the mul;tiplication and division are changed into=
ddition and subtraction, for values below 100, there is a s= light
modifications, for values below 1000 , they are more, and s= o
on</DIV>
<DIV> </DIV>
<DIV>so I want to ask why is the process not reversible?</DIV>
<DIV>In other meanings</DIV>
<DIV>the subtraction should cancel the effect of addition</DIV>
<DIV>and the division should cancel the effect of the
multiplication,</DIV>
<DIV>but this is not what happens</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>This problem doesn't appear in gray-level images; and = a
olored image is supposed to be a three stacks of gray level=
images, so I really cannot explain why this happens
and I would truly appreciate a further assistanc= e to
solve it.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Also, if you can direct me for further readings in the= area
of watermarking colored images, I would truly appreciate it= . As a
matter of fact, I could only find 3 papers on the internet = and the
three dds PN sequences while I would like to add a picture = which
involves multiplying and dividing by the weighing factor
(ALPHA)</DIV>
<DIV>Thanks in Advance</DIV>
<DIV>===========================</DIV>
<DIV>
<DIV><STRONG><FONT color=#804000 size=3>
<DIV><FONT face="Times New Roman" size=3><STRONG><FONT = size=3
olor="#804000">
<DIV><FONT face="Times New Roman" size=2>Eng. Dahlia R.=
ElShafie</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>Teaching Assis= tant nd
M.Sc. Student</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>Electronics an= d
communications</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>College of = ngineering
and Technology</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>Arab Academy f= or Science
and Technology</FONT></DIV>
<DIV><FONT face="Times New Roman"
size=2>Alexandria-Egypt</FONT></DIV>
<DIV></FONT></STRONG></FONT></FONT></STRONG> </DIV>
<DIV>________<BR><BR>Watermarking Mailing List - <A
href="http://www.watermarkingworld.org/ml.html">http://www.watermarkingworld.org/ml.html</A><BR>To
unsubscribe send email to "<A
href="mailto:majordomo@watermarkingworld.org">majordomo@watermarkingworld.org</A>"
with<BR>"unsubscribe watermarking YOURMAIL" in the
body.<BR>______________________________________________________________________________
</DIV></DIV></DIV></DIV></TD></TR>
<TR>
<TD id=rem_INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TR>
<TD width="100%"></TD>
<TD id=rem_INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=rem_INCREDIANIM vAlign=bottom
align=middle></TD></TR></TABLE></TD></TR></TABLE>
<P>
<HR>
<P></P>Internal Virus Database is out-of-date.<BR>Checked by AVG
Anti-Virus.<BR>Version: 7.0.323 / Virus Database: 267.6.2 - Relea= se ate:
2005/06/04<BR></BLOCKQUOTE>
<DIV> </DIV></TD>
</TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellPadding=0 cellSpacing=0 width="100%"> <TR> <TD width="100%"></TD> <TD align=middle
id=INCREDISOUND vAlign=bottom></TD> <TD align=middle id=INCREDIANIM vAlign=bottom></TD> </TR> </TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</html>
|