DSPRelated.com
Forums

Re: Hello friend Amit

Started by Amit Pathania June 20, 2007
ok let me try this one.
suppose u want to choose the key based on the day and last 2 digits of some of your favorite people. assuming that the matrix supports this key system in terms of dimensions.

try this for a 256 X 256 image

image_X = rand(256); % generating any random image of size 256 X 256
key = [randint(256,1,[1,31]), randint(256,1,[1,99])];

watermark_indices = image_X(key);

hope this helps

david hali wrote:
Thanks. The 2nd one ,let me expalin it in this way for example , Image X
,and compute 2nd level discrete Haar wavelet tranform of host image X , and
embed watermark in LL band, but want to select the coeff. using secret key
or seed and use the same secret key or seed to extract the watermark , any
one who doesnt know secret key , cant exract the watermark. Hope u
understand me now .
Thanks in advance once more

>From: Amit Pathania
>To: david hali , m...
>Subject: Re: Hello friend Amit
>Date: Sun, 17 Jun 2007 17:21:33 -0700 (PDT)
>
>the way i understand your question, u want to pick say 5 largest numbers
>from a 5 by 5 matrix where all elements of the matrix are unique .. look at
>the code below-
>
> X = rand(5,5);
> X_sort = sort(X(:),'descend');
>
> largest_5 = X_sort(1:5);
>
> i could not understand the second question properly, please elaborate
>what you mean by a Key. if u want to select elements based on a pattern
>just generate the indices and select them from your given matrix.
>david hali wrote:
> Hello Dear Amit
>Hope You wont mind by emailing privately
>I have seen your suggestion how to select randomly N elements from X
>matrix. But my question is how to select N largest elements from matrix X?.
>let X be 256 by 256 and the second question is how to select cofficients
>from matrix Y by using Key? for example want to select position
>Y(1,3),Y(2,7) and so on, let Y be 256 by 256 size
>thanks in advance
>hali
>