|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re : [WM]: Help about colour images...
> Anyway, if we annoy Joe enough, perhaps he would write us some MatLab =
> code. > Nooo, just kidding X-DD >
:-) !!!
Would you believe that I still got e-mailed afterwards and I still =
replied to the e-mail? I had no choice because the writer made
a very good point - the second parameter to my image resize function was =
totally mysterious. So I fixed it to mean something. Here
is the new code:
% x =3D real image
% L =3D magnification factor (L=3D2 means double image size)
function y=3DfftResize(x, L)
if (L < 1)
error 'Magnification factor has to be greater than one, dreadfully=20
sorry'
end
l =3D (L+1)/2;
ff=3Dfft2(x);
[m,n]=3Dsize(ff);
ml =3D floor((l-1)*m/2)*2;
mm =3D m + 2*ml;
nl =3D floor((l-1)*n/2)*2;
nn =3D n + 2*nl;
qq =3D zeros(mm, nn);
if mod(m, 2)=3D=3D0
xr =3D [1:m/2 ml+m/2+1 2*ml+((m/2+2):m)];
else
xr =3D [1:((m+1)/2) 2*ml+(((m+3)/2):m)];
end
if mod(n, 2)=3D=3D0
yr =3D [1:n/2 nl+n/2+1 2*nl+((n/2+2):n)];
else
yr =3D [1:((n+1)/2) 2*nl+(((n+3)/2):n)];
end
qq(xr, yr) =3D ff*(mm*nn)/(m*n);
y=3Dreal(ifft2(qq)); % real is to cut off tiny imaginary component
Oh, and by the way, don't use it for air traffic control.
The resized image WILL have ripples. It;s just interesting that it works =
as well as it does.
-------------
On top of all that I even replied to the question below.
The simplest solution (I like) is:
Change the image to Y, U, V which comprises the luminance and the two=20
chrominance
channels.
Place the watermark in the Y channel just like in a gray scale image.
Then invert. The steps are:
(R,G,B) -> (Y,U,V)
Y-> Y'
(Y', U, V) -> (R', G',B')
A is not watermarked and A' is watermarked.
If you are very very advanced then try using gamma correction on Y =
before applying the watermark signal.
..... and then proceed to hyperadvanced when all that works.
Joe
miguelco wrote:
> Hi Raphael,
>=20
> I recomend you to insert it into the all three bands, because
> this way it will get some JPEG robustness, because it's color band=20
> processing.
>=20
> As you said, most people use the blue channel, and it's because this
> band is the most difficult to see for humans.
>=20
> The explanations has to do with Darwing and it's evolution theory, in
> some way, because is you look at the solar radiation that arrives to=20
> the Earth, you'll see that the band that arrives with most energy is=20
> the green band, and the one that has less energy is the blue one.
>=20
> So, our eyes are adapted to see better within the band with more
> energy, the green one, and that's the explanation on why signals on=20
> the blue channel are less visible.
>=20
> Anyway, if we annoy Joe enough, perhaps he would write us some MatLab
> code.
> Nooo, just kidding X-DD
>=20
> Miguel
>=20
>=20
> ____________________________________
> Original message:
>=20
> Hello,
>=20
> I am developing a project about Digital Image Watermarking. I am
> applying a=20
> Fourier Mellin Transform and it works good for greyscale images. Now I =
> want=20
> to do the same for color images but I know I have to separate the=20
> image in=20
> three images(R,G and B). I think I must insert the watermark only in=20
> one=20
> channel and it must be the blue one, or I have to insert it in every=20
> channel?.
>=20
> What do you recommend me to do?. Why most people use the blue channel
> when=20
> they want to insert the information in the image?. Thanks in advance.
>=20
> regards,
>=20
> Raphael.
>=20
______________________________________________________________________________
Watermarking Mailing List - http://www.watermarkingworld.org/ml.html
To unsubscribe send email to "majordomo@watermarkingworld.org" with
"unsubscribe watermarking YOURMAIL" in the body.
______________________________________________________________________________
|