
Binary processing
Masks
Method
A mask is a tool for image processing, It defined the area of pixels that will be used for treatment.
Imagine you want to make a computing between a pixel is its neighbors. You define a mask containing the
pixels you need to do your calculation. You can see below some examples of very common masks. In the order
we have 3 pixels line with neighbors left and right, three pixels in a column with the neighbors up and down,
square: neighboring pixels of row 1 (8 closest pixels) and finally the cross with the neighbors top bottom left and right.

Care must be taken at several things when using masques for treatments. The result of treatment should not always
be placed in the same matrix as the image of origine so as not to erase the value of a pixel that will be useful for
a future computing. We must be sure the pixels that are used by the mask exist, it may be better to use pixels
p(i-n, j-m) with n and m possitive. For example, in an streamof image, the image t +1 does not exist.
A mask can be extended to three dimensions if using multiple images (or colors).
Masks can have shapes and sizes according to the calculation will be done. You are free to build it in consequence.
The order of the mask provides an indication of the depth of the mask relative to the focus of treatment. such an order 3,
the pixels to the mask will be included a distance of 3 pixels from the center. Masks are generally square.
Copyright © 2010-2014, all rights reserved, contact: operationpixel@free.fr