|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [WM]:Problem in implementing DWT for watermarking
Hi, rupal
=20
only that you have to do is in the last line show your image with this =
command
=20
>>figure, imshow(img, []) %with and empty square bracket
=20
this is because your variable "img" is data type "double" and when you =
want to display an image with this data type, your pixels
values must be between range [0 1], and your image "img", its pixels =
values was in the range [7 253], then all pixels
greater-equal to 1 are displayed like 1 (white)
=20
another solution is convert "img" to data type "uint8", and then =
displayed this new image normally with "imshow", like this:
=20
>>img2=3Duint8(img);
>>imshow(img2)
=20
when an image is data type "uint8", then it can be displayed in the =
range [0 255]
i recommend you that see the help of function "imshow"
i recommend too, that use the second one solution, it is more correct
=20
>>doc imshow
=20
good luck
=20
Juan Carlos Moctezuma E.
Student of Science Computing, INAOE, Mexico
=20
=20
=20
rupal agravat <rupalagravat@yahoo.com> escribi=F3:
Respected All,
Myself, Rupal Agravat, student of Master's Computer Science, =
implementing watermarking using different methods like, LSB, other
spatial domain methods, DCT and now i m implementing using DWT. But i m =
facing following problem.........
I am using image of camera man 256x256 8bit per pixel. For testing =
purpose only i wrote following code
x =3D imread('camera.bmp');
imshow(x)
[A,H,V,D] =3D dwt2(x,'haar');
img =3D idwt2(A,H,V,D,'haar');
figure, imshow(img);
And it is giving white image with out any grayscale =
......................... i mean i m not able to see the camera man
image................
Can anybody tell me why it is happening?
In advance, i am very much thankful to the persons giving me the =
positive answer...........
=20
-Rupal Agravat
India
=20
=20
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam =A1gratis!=20
Reg=EDstrate ya - http://correo.espanol.yahoo.com/
--0-1794896109-1176667955=3D:52497
Content-Type: text/html; charset=3Diso-8859-1
Content-Transfer-Encoding: 8bit
<BLOCKQUOTE class=3Dreplbq style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #1010ff 2px solid"> <DIV>Hi, rupal</DIV>
<DIV> </DIV> <DIV>only that you have to do is in the last line =
show your image with this command</DIV> <DIV> </DIV>
<DIV>>>figure, imshow(img, []) %with and =
empty square bracket</DIV> <DIV> </DIV> <DIV>this is because
your variable "img" is data type "double" and when you want to display =
an image with this data type, your pixels values must be
between range [0 1], and your image "img", its pixels values was =
in the range [7 253], then all pixels greater-equal to
1 are displayed like 1 (white)</DIV> <DIV> </DIV> =
<DIV>another solution is convert "img" to data type "uint8", and then
displayed this new image normally with "imshow", like this:</DIV> =
<DIV> </DIV> <DIV>>>img2=3Duint8(img);</DIV>
<DIV>>>imshow(img2)</DIV> <DIV> </DIV> <DIV>when an image =
is data type "uint8", then it can be displayed in the range
[0 255]</DIV> <DIV>i recommend you that see the help of function =
"imshow"</DIV> <DIV>i recommend too, that use the second
one solution, it is more correct</DIV> <DIV> </DIV> =
<DIV>>>doc imshow</DIV> <DIV> </DIV> <DIV>good luck</DIV>
<DIV> </DIV> <DIV>Juan Carlos Moctezuma E.</DIV> <DIV>Student of =
Science Computing, INAOE, Mexico</DIV> <DIV> </DIV>
<DIV> </DIV> <DIV><BR><B><I>rupal agravat =
<rupalagravat@yahoo.com></I></B> escribi=F3:</DIV> <BLOCKQUOTE =
class=3Dreplbq
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px =
solid"> <DIV>Respected All,</DIV> <DIV>Myself, Rupal Agravat,
student of Master's Computer Science, implementing watermarking using =
different methods like, LSB, other spatial domain methods, DCT
and now i m implementing using DWT. But i m facing following =
problem.........</DIV> <DIV>I am using image of camera man 256x256
8bit per pixel. For testing purpose only i wrote following code</DIV> =
<DIV>x =3D imread('camera.bmp');</DIV> <DIV>imshow(x)</DIV>
<DIV>[A,H,V,D] =3D dwt2(x,'haar');</DIV> <DIV>img =3D =
idwt2(A,H,V,D,'haar');</DIV> <DIV>figure, imshow(img);</DIV> <DIV>And =
it is
giving white image with out any grayscale ........................ i =
mean i m not able to see the camera man
image................</DIV> <DIV>Can anybody tell me why it is =
happening?</DIV> <DIV>In advance, i am very much thankful to the
persons giving me the positive answer...........</DIV> =
<DIV> </DIV> <DIV>-Rupal Agravat</DIV> <DIV>India</DIV>
<DIV></DIV></BLOCKQUOTE><BR> =20
--0-1794896109-1176667955=3D:52497--
______________________________________________________________________________
Watermarking Mailing List - http://www.watermarkingworld.org/ml.html
To unsubscribe send email to "majordomo@watermarkingworld.org" with
"unsubscribe watermarking YOURMAIL" in the body.
______________________________________________________________________________
-------
|