Can we use a binary mask to embed a watermark in the roi?

1 次查看(过去 30 天)
Inorder to embed a watermark in roi of an image, can we create a mask and on obtaining it can we embed it.

回答(2 个)

Walter Roberson
Walter Roberson 2013-11-4
Let I, R, W be binary. Then consider
I or (R and W)
  8 个评论
Image Analyst
Image Analyst 2013-11-7
I don't know what abstract form is. I'm envisioning either a list of x,y coordinates, or a logical image. In my work, either ROI or mask could be either form. ROIs are often simple shapes (boxes, circles) that are sometimes manually specified, though they don't have to be (they can have weird shapes). Masks can also be that, or they could be automatically generated irregularly shaped things, like you might get from thresholding. I don't think there's any general hard and fast definition but some people may have their own definitions. So I still don't know what akila means by "into the roi without mask".
Walter Roberson
Walter Roberson 2013-11-7
For example specifying a center and a radius of a circle is an abstraction compared to specifying on a pixel-by-pixel basis whether the pixel is in the ROI or not. But ultimately for any given pixel there must be a decision procedure to decide whether it is in the ROI or not, but that decision procedure does not have to be in the form of a logical matrix.

请先登录,再进行评论。


Image Analyst
Image Analyst 2013-11-5
See my demo, attached below.
  7 个评论
Image Analyst
Image Analyst 2013-11-7
Use poly2mask() to turn those coordinates into a binary image.
binaryImage = poly2mask(x, y, rows, columns);
Then use the code I gave you above.
outputImage(binaryImage) = inputImage(binaryImage);
Walter Roberson
Walter Roberson 2013-11-7
The non-mask way of doing it would be to use inpoly() on a vectorized approximation of the outline of the circle.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by