| MIL 10 User Guide
| Customize Help

Buffer overscan region



See also
Availability
Available in MIL-Lite

Available in MIL

Buffer overscan pixels are pixels added around an image. MIL neighborhood operations, such as MimConvolve(), use these pixels to process the border pixels of an image since these pixels don't have a complete neighborhood.

For example, in the image above, if MimConvolve() is called with the M_HORIZONTAL_EDGE_PREWITT FIR filter (which operates on 3 by 3 neighborhoods), the neighborhoods of the image border pixels would be incomplete. In such cases, overscan pixels might be used.

Note that MIL recursive neighborhood operations ignore the values of overscan pixels (for example, MimConvolve() called with M_SHEN_FILTER()).

To set the values of overscan pixels, use MbufControlNeighborhood() with M_OVERSCAN. However, some MIL neighborhood operations with predefined kernels or structuring elements do not require that you set the values of overscan pixels. For example, if you call MimErode(), the overscan pixels are automatically set to the highest possible buffer value, which will produce the most accurate possible results for the image border pixels.

Set the number of overscan pixels that should be added to an image buffer during allocation, using MsysControl() with M_ALLOCATION_OVERSCAN_SIZE. The specified size represents the number of rows/columns added to each side of the image buffer. For example, in the image above, the size of the overscan is 2. Each buffer allocated on a particular system will have the same overscan size. You can inquire the size of the overscan using either the MbufInquire() or MsysInquire() function.

When the results of operations performed on image border pixels are not important, and you want to speed up your application, you can use the MbufControlNeighborhood() function to disable the use of overscan pixels. In addition, several functions allow you to disable the use of overscan pixels for neighborhood operations.