MATLAB: How to change the location of watermark

image processing

i have embedded an image over another by using the code
i= imread(boat.jpg);
j=imread(image.jpg);
j=imresize(j,0.2)
i((size(i,1)-size(j,1)+1):end, (size(i,2)-size(j,2)+1):end,1:end) = j
the image used as the watermark appeared at the bottom right corner now i want to change the location of watermark for example i want to place it on bottom left corner or top left or top right corner.how can i do this?

Best Answer

Top right:
i = flipud(i); %once before doing the insertion, and once after again
Bottom left:
i = fliplr(i); %once before doing the insertion and once after again
Top left:
i = flipud(fliplr(i)); %before and after insertion
For example,
i= imread(boat.jpg);
j=imread(image.jpg);
j=imresize(j,0.2)
i = fliplr(i);
i((size(i,1)-size(j,1)+1):end, (size(i,2)-size(j,2)+1):end,1:end) = j
i = fliplr(i);