Jump to content

WaterMarking Images


Recommended Posts

Hi, i am a student, totally new to labview...

currently working on a watermarking problem

I got a picture and watermark.. need to fuse them together in the midband co-efficients of the 2d dct output

the watermark is to be multiplied by a PN sequence (code of 1's and 0s)

here's what i did, i opened a JPEG, unbundled it and made 2d dct

need to make a mask with the midband components of an 8X8 dct image

midband = [ 0 0 0 1 1 1 1 0

0 0 1 1 1 1 0 0

0 1 1 1 1 0 0 0

1 1 1 1 0 0 0 0

1 1 1 0 0 0 0 0

1 1 0 0 0 0 0 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 ]

I wrote the midband mask as an empty array

now need to apply the mask to the dct ... so that i can add to the selected bits (1s) some value

pls pm me or mail me (magedfawzy@hotmail.com.. so that i know i got a reply

thanks

Any assisstance is appreciated.. especially if there are examples that can make a watermark..

i searched the whole net for any image processing using DCT but couldn't find anything...

is labview capable of doing a watermark.. ? is it the best choice to do it .. especially that i want to embed it later on a pda

Thanks again in advance

M@ged

Link to comment

hmm, i dont understand much about your problem, but I did some picture manipulation a while back, and maybe I have a hint.

if you load a jpeg you can connect the "unflatten pixmap.vi" which has a 2D U32 Array output. This output is quasi a "bitmap" with the color values (RGB [24bit] mapped to an U32 integer). the uppler left pixel of your image is in the array on position 0,0, the lower right pixel is the lower right element of the 2D array.

If you want to embed a watermark - as much as I understand - you have to slightly modify the colors in the selected area. you can choose the area in the picture by selecting the corresponding elements of the array.

I have no idea how the algorithm for the color manipulation works. If you have one, I would be glad, if you can tell me a little bit more, I am still searching.

After manipulation the colors you simply use the "flatten pixmal.vi" to write it back into the jpg-format ...

best regards,

CB

Link to comment

Thanks for the reply...

Here's my problem defined in an another way

Got 2 Pictures( X is the Carrier of Y) .ie. Y is to be embedded in X

for the sake of Analysis , i transform X into Frequency components to form 3 bands , namely, FL (F. low, F. Mid, and F. High)... after the transformation is done.. i want to embedd a certain mainputlated version of Y to X in a certain band.. (which is in my case F. Midband)..

so i thought of making a MASK which is basicly, 1s at the places i want the

ouput (i,j)=X(i,j)+ Y(i,j) at the places of 1s only (as in the above Matrix)

HOW to create a MASK and add bits to the original bits..

one newbie question .. image U32 is different than U32... as there's a conflict to displaying that type .. ?

... i am really having difficulties learning labview.. because i really can't find good image processing examples..

I wonder if you have any good tutorials that deal with 2dimension DCT.....or watermarking.. in any form or algorithm

This is really weird, as i have never seen so far anybody working in image processing .. (using labview intensively).. and i am not talking about Imaq vision or that type of processing..

hmm, i dont understand much about your problem, but I did some picture manipulation a while back, and maybe I have a hint.

if you load a jpeg you can connect the "unflatten pixmap.vi" which has a 2D U32 Array output. This output is quasi a "bitmap" with the color values (RGB [24bit] mapped to an U32 integer). the uppler left pixel of your image is in the array on position 0,0, the lower right pixel is the lower right element of the 2D array.

If you want to embed a watermark - as much as I understand - you have to slightly modify the colors in the selected area. you can choose the area in the picture by selecting the corresponding elements of the array.

I have no idea how the algorithm for the color manipulation works. If you have one, I would be glad, if you can tell me a little bit more, I am still searching.

After manipulation the colors you simply use the "flatten pixmal.vi" to write it back into the jpg-format ...

best regards,

CB

Link to comment
... i am really having difficulties learning labview.. because i really can't find good image processing examples..

...

This is really weird, as i have never seen so far anybody working in image processing .. (using labview intensively).. and i am not talking about Imaq vision or that type of processing..

There are a couple of good reasons you don't find many "native LabVIEW" image processing examples. First, LabVIEW simply is not as efficient with the large 2D array manipulations required as C is. (Although with the new matrix math functions it is closing the gap) Secondly there are a lot of image processing libraries already available ranging from $$$ like IMAQ down to no cost like the free Intel image processing libraries (which Irene He used to create her image processing toolkit) and various other open source solutions. You might be better off doing this in C and calling a DLL from LabVIEW.

Then again, if you just really really want to do this in LabVIEW, have a happy...

"Always listen to the experts, they'll tell you what can't be done, and why.

Then go do it."

~Excerpts from the Notebooks of Lazarus Long

(by Robert Heinlein)

Link to comment
  • 1 month later...

Thanks Michael for your help, it is really appreciated to listen to an expert advice,.. specially, that it would cut down my development time ... i was wondering if u can suggest ... an easy-to use library for image development on PDAS... perhaps, C# libs,.. i think the programming choice/ best toolkits will be a time-saver for me..

however, i need to make matrix multiplication.,.. and a lot of scientific,... manipulation.. .. i am looking for a freeware, mature tool that will get me started, instead of wasting my time building everything from scratch..

thanks

Maged

There are a couple of good reasons you don't find many "native LabVIEW" image processing examples. First, LabVIEW simply is not as efficient with the large 2D array manipulations required as C is. (Although with the new matrix math functions it is closing the gap) Secondly there are a lot of image processing libraries already available ranging from $$$ like IMAQ down to no cost like the free Intel image processing libraries (which Irene He used to create her image processing toolkit) and various other open source solutions. You might be better off doing this in C and calling a DLL from LabVIEW.

Then again, if you just really really want to do this in LabVIEW, have a happy...

"Always listen to the experts, they'll tell you what can't be done, and why.

Then go do it."

~Excerpts from the Notebooks of Lazarus Long

(by Robert Heinlein)

Link to comment

I have not yet had a project that used PDAs so I cannot suggest image processing libs for that platform. Nor do I get into C# much, LabVIEW is my baby.

That said, I think the best available is the Intel libraries I mentioned earlier. They are free, mature and you know that they will work with LabVIEW, because someone else has already done it. The downside with any external image lib is that it will take you some real work to make all the lib wrapper VIs.

Try Googling on Intel Imaging Library open source

or look here: Intel Open Source Computer Vision Library

If you just want to do very simple watermarking, use the image reading VIs, convert to flattened pixmap, then do the same with a black & white image of your logo, then add, then convert back to image. Simple.

Good luck.

Link to comment
Thanks Michael for your help, it is really appreciated to listen to an expert advice,.. specially, that it would cut down my development time ... i was wondering if u can suggest ... an easy-to use library for image development on PDAS... perhaps, C# libs,.. i think the programming choice/ best toolkits will be a time-saver for me..

however, i need to make matrix multiplication.,.. and a lot of scientific,... manipulation.. .. i am looking for a freeware, mature tool that will get me started, instead of wasting my time building everything from scratch..

Image processing on PDA is mostly like Formula 1 racing in an old VW "K

Link to comment
  • 4 weeks later...
Rolf is right, general image processing is pretty intensive. For the watermarking, you might want to stick to the matrix and other simple tools.

If you really really have to do real complex image processing, and your PDA is tied into your network you might consider studying the option of doing the heavy processing on a server on the network and using the PDA for I/O and portable access only. Most of them don't have the horsepower to do a lot of image processing. It might be faster to upload the image, process, retrieve the result. It also offers the advantage of archiving/databasing, etc.

I have seen a couple of tutorials on Image Processing with C# & GDI+... i think that this is where i should start from...

It is 6 parts (http://www.codeproject.com/cs/media/csharpgraphicfilters11.asp) ...

Share me your opinions... i guess.. although it is a little bit managed.... and got some downsides, as the author states

"My first real disappointment in building this code was to find that the BitmapData class in GDI+ does not allow us to access the data it stores, except through a pointer. This means we need to use the unsafe keyword to scope the block of code which accesses the data. The net effect of this is that a highly security level is required for our code to execute, i.e. any code using the BitmapData class is not likely to be run from a remote client. This is not an issue for us right now, though, and it is our only viable option, as GetPixel/SetPixel is simply too slow for us to use iterating through bitmaps of any real size."

however, it seems quite satisfactory to me

What do u think ?

Link to comment
I have seen a couple of tutorials on Image Processing with C# & GDI+... i think that this is where i should start from...

It is 6 parts (http://www.codeproject.com/cs/media/csharpgraphicfilters11.asp) ...

Share me your opinions... i guess.. although it is a little bit managed.... and got some downsides, as the author states

"My first real disappointment in building this code was to find that the BitmapData class in GDI+ does not allow us to access the data it stores, except through a pointer. This means we need to use the unsafe keyword to scope the block of code which accesses the data. The net effect of this is that a highly security level is required for our code to execute, i.e. any code using the BitmapData class is not likely to be run from a remote client. This is not an issue for us right now, though, and it is our only viable option, as GetPixel/SetPixel is simply too slow for us to use iterating through bitmaps of any real size."

however, it seems quite satisfactory to me

What do u think ?

I'm not sure how C#, GDI+ and .Net apply to PDA development. I have a feeling that at least some of these parts are not available at all on a PDA target.

Rolf Kalbermatter

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.