MATLAB: How to extract the watermark image in this code

embedextractImage Processing Toolbox

i = imread('im.png');
imshow(i)
j=rgb2gray(i);
imshow(j)
n=imread('hand.jpg');
l=imresize(n,0.5);
m=rgb2gray(l);
imshow(m);
[r,c]=size(j);
startrow=1;
startcol=1;
j(startrow:startrow+size(m,1)-1,startcol:startcol+size(m,2)-1) = m;
imshow(j);

Best Answer

Your code so far does nothing other than read in the image and copy a grayscale version of it to another (badly-named) variable j. There is no way that it could extract a watermark. To extract a watermark, you have to know how it was created and then "undo" the algorithm, like I do in my attached demo.
Read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup to learn how to format your code, which I did for you this time.
Also, read this.