필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
as825
as825 2013년 11월 4일
댓글: Walter Roberson 2013년 11월 7일
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