Skip to main content

Image Masking

1 reply [Last post]
smr99
Offline
Joined: 2005-04-11

Hi,

I need to "mask off" a certain region of my input image. For example, I might want to set all pixels outside a rectangle to zero.

What's the recommended approach: add some kind of RenderedOp to the display chain or just fiddle the input image myself? If the former, is there an existing RenderedOp that I could use (I couldn't find one that looked suitable) or do I write my own?

Thanks,
-Steve

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
smr99
Offline
Joined: 2005-04-11

Before someone suggests this: I realize that one option is to create a binary mask image and use the multiply operator.

We don't want to use this approach because the images are large and the mask shape is simple: rectangle, circle, maybe a simple polygon. So it would be a waste of memory to create the binary mask image.