hi i have some questions about image 's levels i should insert a watermark in 0 ,3 and 7 level of an image and calculate robustness against jpg, Gaussian noise attack but i do not know how to access these levels? is bitset function suitable for this? thanks

 採用された回答

Image Analyst
Image Analyst 2014 年 10 月 30 日

0 投票

See attached demo where you can specify what bitplane to insert the hidden/watermark image.

12 件のコメント

nadia
nadia 2014 年 10 月 30 日
thanks Image Analyst but i have some question about this code: 1- what means this line bitToSet = str2double(cell2mat(inputdlg(prompt, dialogTitle, numberOfLines, defaultResponse))); 2- the prompt is used for bitplane for example if i want to hide the image in lsb i should enter 1 in the box or for level 3 i should enter 3 in the message box?
Image Analyst
Image Analyst 2014 年 10 月 30 日
nadia's follow up question moved here:
Thanks Image Analyst but I have some questions about this code:
1- What does this line mean:
bitToSet = str2double(cell2mat(inputdlg(prompt, dialogTitle, numberOfLines, defaultResponse)));
2- The prompt is used for bitplane. For example if I want to hide the image in lsb 1, should the user enter 1 in the box, or for level 3, the user should enter 3 in the message box?
Image Analyst
Image Analyst 2014 年 10 月 30 日
1. I probably should have split it into 2 or 3 lines. Basically it gets a number as a double, because inputdlg returns a string. We want 3, not '3'.
2. Yes.
nadia
nadia 2014 年 10 月 30 日
thanks a lot for your answers if i want to check fidelity and robustness of my watermarking how can i use PSNR in matlab?
Image Analyst
Image Analyst 2014 年 10 月 30 日
It's a built in function in the Image Processing Toolbox. Just look it up in the help:
peaksnr = psnr(A,ref) calculates the peak signal-to-noise ratio for the image A, with the image ref as the reference. A and ref must be of the same size and class.
If you don't have that toolbox, I have a manual method, attached.
nadia
nadia 2014 年 10 月 31 日
thank you very much
nadia
nadia 2014 年 10 月 31 日
hi i have an other question if i want to have jpeg attack on this watermark how can i do it? for example if wm was watermarked image i can do it with this code:
imwrite(wm,'wmjpg.jpg','jpeg','Quality',10)
if i want to calculate the correlation between watermark image and watermark image after attack how can i do it?
Image Analyst
Image Analyst 2014 年 10 月 31 日
I guess you'd write it out very compressed, like you did. Then use imread() to read it back in. Then try to recover the watermark using your custom algorithm. Then have some kind of figure of merit as to how much you extracted resembles your original, expected, uncorrupted watermark. PSNR just compares images, which is not really what you're interested in, though it's a measure of how different the image is from your starting image to begin with. You should make up an ROC curve to determine how successful your algorithm is at finding the watermark.
nadia
nadia 2014 年 10 月 31 日
i have an other problem i produce a watermark image with rand function and round it now my watermark image is an zero-one image i should insert this watermark in lena image after i add Gaussian noise to final image and recover watermark from noisy watermark image it produce an error
Error using bitget
Inputs must be non-negative integers.
my noisy watermark image has values between 0-1 and every where its value is 1 it produce this error how can i solve this problem
Image Analyst
Image Analyst 2014 年 10 月 31 日
It's not much of a watermark if it was created with the rand() function. Watermarks have structure as far as I know, and to determine if your image was "stolen" you have to retrieve the watermark and determine if the structure is still there. There may be some fancier ones that watermark with other things than images. I saw one that used the Fibonacci series that was very robust to cropping, noise, etc.
Anyway, you need to multiply your image by 255 and then cast to uint8
grayImage = uint8(255 * normalizedImage);
nadia
nadia 2014 年 10 月 31 日
if i want to insert watermark in DCT of image how can i do it?
Image Analyst
Image Analyst 2014 年 10 月 31 日
I don't know. I'd have to research it because it's not my field. But I'll let you do that since it's your problem. Good luck.

サインインしてコメントする。

その他の回答 (0 件)

タグ

質問済み:

2014 年 10 月 30 日

コメント済み:

2014 年 10 月 31 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by