Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
as825
as825 le 4 Nov 2013
Inorder to embed a watermark in roi of an image, can we create a mask and on obtaining it can we embed it.

Réponses (2)

Walter Roberson
Walter Roberson le 4 Nov 2013
Let I, R, W be binary. Then consider
I or (R and W)
  8 commentaires
Image Analyst
Image Analyst le 7 Nov 2013
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 le 7 Nov 2013
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.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 5 Nov 2013
See my demo, attached below.
  7 commentaires
Image Analyst
Image Analyst le 7 Nov 2013
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 le 7 Nov 2013
The non-mask way of doing it would be to use inpoly() on a vectorized approximation of the outline of the circle.

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