AVS Modules maskgen (6) NAME maskgen - circlular and elliptical mask generator AUTHOR INFO: David E. Harris, Georgia Tech Research Institute SOURCE FILE: maskgen.c TYPE: data INPUTS: none OUTPUTS: field 2D uniform scalar byte PARAMETERS: Name Type Default Min Max X Size dial 64 2 1024 Y Size dial 64 2 1024 X Radius dial 4.0 0.1 unbounded Y Radius dial 4.0 0.1 unbounded X Position dial 32 unbounded unbounded Y Position dial 32 unbounded unbounded Center oneshot - - - Invert BG toggle off - - Mask Value typein 255 0 255 DESCRIPTION: This module generates a field that is intended to be interpreted as a binary mask for filtering FFTs, a gray scale image, or a structuring element for various morphological operations. The field can be any size from 2x2 pixels on up and an ellipse of any size major and minor axes from one pixel on up. The background can be either black or white and the intensity value of the ellipse can be any gray level. The position of the ellipse within the field is arbitrary and can intersect the edges of the field or be outside the field entirely. PARAMETERS: X Size - Horizontal and vertical dimensions of the field being Y Size generated. 2x2 pixels minimum, 1024x1024 pixels maximum. X Radius - Major and minor axes of the elliptical mask. Floating point Y Radius values are used to give better control over the size of the ellipse. X Position - Position of the center of the ellipse. Values outside the Y Position field boundaries are allowed giving partial ellipses. Center - Brings the center of the ellipse to the center of the field. Invert BG - Toggles the background between black and white. Mask Value - Gray scale value given to the pixels in the ellipse. EXAMPLE: This network demonstrates the mask generator module. MASK GENERATOR | COLORIZER | DISPLAY IMAGE EXAMPLE2: This network shows the mask generator used with a companion module called dilate. (image) READ FIELD | MASK GENERATOR FIELD TO BYTE |___________ _______| | | DILATE | COLORIZER | DISPLAY IMAGE See also: FFT2D, IFFT2D, DILATE, ERODE, CLOSEING, OPENING