ipfml.filters.kernels

Kernel to apply on images using convolution

Functions

bilateral_diff(window[, func]) Bilaeral difference kernel to use with convolution process on image
plane_max_error(window) Plane max error kernel to use with convolution process on image
plane_mean(window) Plane mean kernel to use with convolution process on image
ipfml.filters.kernels.bilateral_diff(window, func=<built-in function max>)[source]
Bilaeral difference kernel to use with convolution process on image
Apply difference pixel to pixel and keep max on min difference before applying mean
Parameters:
  • window – the window part to use from image
  • func – max or min function to get difference between pixels
Returns:

mean of max or min difference of pixels

Example:

>>> from ipfml.filters.kernels import bilateral_diff
>>> import numpy as np
>>> window = np.arange(9).reshape([3, 3])
>>> result = bilateral_diff(window)
>>> result
3.0
ipfml.filters.kernels.plane_max_error(window)[source]

Plane max error kernel to use with convolution process on image

Parameters:window – the window part to use from image
Returns:Difference between max and min error from mean plane

Example:

>>> from ipfml.filters.kernels import plane_max_error
>>> import numpy as np
>>> window = np.arange(9).reshape([3, 3])
>>> result = plane_max_error(window)
>>> (result < 0.0001)
True
ipfml.filters.kernels.plane_mean(window)[source]

Plane mean kernel to use with convolution process on image

Parameters:window – the window part to use from image
Returns:Normalized residual error from mean plane

Example:

>>> from ipfml.filters.kernels import plane_mean
>>> import numpy as np
>>> window = np.arange(9).reshape([3, 3])
>>> result = plane_mean(window)
>>> (result < 0.0001)
True