code for different attacks on watermarking
이전 댓글 표시
please help for different types of attacks for watermarking
답변 (1개)
Image Analyst
2022년 4월 23일
0 개 추천
See section 24.3 here:
You'll find lots of papers on it.
(Anticipating your next question.....)
Sorry, I don't have any of them coded up for you.
댓글 수: 19
Sunita Pradhan
2022년 4월 23일
Image Analyst
2022년 4월 23일
Yep, I anticipated your next question perfectly.
Again, sorry I don't have any code to do that. I'd have to spend days developing it just like you will, or months like the people who wrote those papers did. If I had such code or could write it in 5 minutes or less, I'd give it to you. But I'm sure it's not trivial. That said, once you write your code if you have questions about an error message, we can answer that. But we can't write a whole turnkey application suite for you. We just don't have that much time to donate to you. I'm sure there are graduate students making image forensics their entire masters or Ph.D., so it's not trivial.
If you really need it done and can't do it yourself, the Mathworks would be delighted to write the code for you. Contact their consulting department here:
Of course they don't do it for free so you have to decide how much it's worth to you do get it done.
Walter Roberson
2022년 4월 23일
The code you attached appears to be from https://github.com/ShurenQi/FGPCET . You would need the rest of that third-party code in order to run that file.
Sunita Pradhan
2022년 4월 24일
Sunita Pradhan
2022년 4월 24일
Image Analyst
2022년 4월 24일
You forgot to attach the error. Please include ALL the red text. And we can't run your code anyway because you forgot to attach 128.jpg and 32.jpg.
Sunita Pradhan
2022년 4월 24일
Image Analyst
2022년 4월 24일
You need to assign m as the number of rows you want the resized image to be after resizing. Right now it's unknown/unassigned.
Sunita Pradhan
2022년 4월 24일
Image Analyst
2022년 4월 24일
Perhaps you mean
[hostRows, hostColumns, hostNumColorChannels] = size(host);
watermark=imresize(watermark, [hostRows, hostColumns]);
which will resize the watermark image to be the same size as the host image.
Sunita Pradhan
2022년 4월 25일
Walter Roberson
2022년 4월 25일
One of the arrays is based on the size of the original image. The other is based on the size of the 32 x 32 watermark. There is not going to be any way to add them together.
Sunita Pradhan
2022년 4월 25일
Sunita Pradhan
2022년 4월 25일
Image Analyst
2022년 4월 25일
I computed that here:
[hostRows, hostColumns, hostNumColorChannels] = size(host);
Notice that I did not use cryptics one-letter variable names that make your code look like an undecyperable alphabet soup mess of a code. I used descriptive variable names where it's glaring obvious what the variables recomment - a practice I hope you'll follow. If you still don't know, then
m = hostRows
n = hostColumns
p = hostNumColorChannels
For your error, it's saying that the two matrices are different sizes so you can't add them together. Put these lines in your code before the error line:
[LLRows, LLColumns, LLNumColorChannels] = size(watermarked_LL)
[hostLLRows, hostLLColumns, hostLLNumColorChannels] = size(host_LL)
What does that report to the command window? Evidently something does not match up.
Walter Roberson
2022년 4월 25일
read the documentation for dwt2 https://www.mathworks.com/help/wavelet/ref/dwt2.html#d123e27693 and see that the first output is half the size of the input. You resized your watermark to 32 by 32 so your first output from dwt2 of that would be about 16 x 16.
In order to be able to add that 16 x 16 array to the output of the dwt2 from the original image, that other dwt2 would also have to be 16 x 16. Which would require that the original image is 32 x 32. But that is clearly not the case.
You have a small number of options at this point:
1. You can resize the original image to 32 x 32 as well 2. You can resize the watermark to the same size as the image 3. you can give up on trying to add those matrices together 4. you can choose a subset of the larger dwt2 result to add the watermark to, leaving the rest unchanged.
SrinivasHarsha
2022년 4월 26일
Hi Image Analyst,
we need a help from you
can you send a response to my mail if possible.
we will contact you reg: image processing help
my mail id: srinivas.nato@gmail.com
SrinivasHarsha
2022년 4월 26일
Hi Image Analyst,
we need a help from you
can you send a response to my mail if possible.
we will contact you reg: image processing help
my mail id: srinivas.nato@gmail.com
Walter Roberson
2022년 4월 26일
Image Analyst does not volunteer email support. He will not help you through email.
카테고리
도움말 센터 및 File Exchange에서 Watermarking에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!