when i apply crop attack on watermarked image it give me this error( Error in ==> extraction at 18 green = X(:,:,2);) while i embedd a watermark in blue channel how can i solve this problem? how can i apply crop attack?

3 vues (au cours des 30 derniers jours)
when i apply crop attack on watermarked image it give me this error( Error in ==> extraction at 18 green = X(:,:,2);) while i embedd a watermark in blue channel how can i solve this problem? how can i apply crop attack

Réponses (2)

Walter Roberson
Walter Roberson le 28 Mai 2015
Your watermarkrgb.png was created with a single layer, not as RGB.
You should get into the habit of writing in code to check for valid input before attempting operations.
  2 commentaires
shameen khan
shameen khan le 28 Mai 2015
NO. after embedding a watermark in blue channel i used cat function for cancatenation of three layer then write image as watermarkrgb
Walter Roberson
Walter Roberson le 28 Mai 2015
How much does it cost you to put in a test to see whether the image you read in actually has 3 layers? Do they still charge 20 cents per punched card like they used to in my day?

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 28 Mai 2015
Your code has lots of stuff commented out. Like Walter said, your X is not 3D, full color RGB. Your code is essentially this:
X=imread('watermarkrgb.png');
green = X(:,:,2);
And it needs to be this:
originalImage = imread('watermarkrgb.png');
[rows, columns, numberOfColorChannels] = size(originalImage);
if numberOfColorChannels == 1
% It's monochrome, not full RGB
% Create the needed color channels.
red = originalImage;
green = originalImage;
blue= originalImage;
else
% It's full color. Just extract the color channels
% from the RGB image.
red = originalImage(:,:,1);
green = originalImage(:,:,2);
blue = originalImage(:,:,3);
end
  3 commentaires
Image Analyst
Image Analyst le 29 Mai 2015
SW1=SU1*sW11*SV1'; is not in my code. This looks like a totally new error that can be solved with this link. You need to check the dimensions of all 3 of those arrays.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by