Class ConvolutionModule
java.lang.Object
|
+----ConvolutionModule
- class ConvolutionModule
- extends Object
- implements Modulable
Perform a convolution of filter on a Grey picture.
The convolution algorith works as follows: for pixels in the picture
a new value is calculated by weighing the values of its neighbours. If you
for example take a 3x3 mask that contains all 1's we will put it 'over'
the pixel we are calculating the new value of. (The middle value of the
mask is over the pixel). Multiply all 9 pixels by the value of the mask
that is 'over' the pixel, now add these values together and devide that
number by the sum of the values in the mask. The resulting value is the
new value for the pixel. Repeat this for all pixels in the picture.
Depending on the mask of the filters filters can be used in two ways: to
reduce noise in a picture or to sharpen edges (note: this increases noise).
- See Also:
- Grey, Mask
-
ConvolutionModule()
-
-
convolution(Grey, Mask, Grey)
- Do a convolution of the mask on the grey picture.
-
run(DataStore, DataStore, ParameterStore)
- Call the Convolution method.
ConvolutionModule
ConvolutionModule()
run
public boolean run(DataStore input,
DataStore output,
ParameterStore parameters)
- Call the Convolution method.
- See Also:
- convolution
convolution
private void convolution(Grey greyIn,
Mask mask,
Grey greyOut)
- Do a convolution of the mask on the grey picture.