gbvision.utils.denoising package

Submodules

gbvision.utils.denoising.dilate module

class gbvision.utils.denoising.dilate.Dilate(ksize: Union[int, Tuple[int, int]], iterations=1)[source]

Bases: gbvision.utils.pipeline.PipeLine

creates a pipeline that dilates the image by a kernel of ones used mainly for Erode & Dilate denoise filters

Parameters:
  • ksize – The kernel size, either an integer (meaning an nxn kernel) or a tuple (nxm kernel)
  • iterations – Optional. The amount of Dilate iterations to perform, default is 1. Note! A large number of iterations will slow down the program
Returns:

A pipeline that dilates the given frame

gbvision.utils.denoising.distance_transform_threshold module

class gbvision.utils.denoising.distance_transform_threshold.DistanceTransformThreshold(min_distance_ratio: float)[source]

Bases: gbvision.utils.pipeline.PipeLine

A pipeline factory that performs normalized distance transform and then a minimum threshold on the frame which removes from the original frame all white pixels that are at most min_distance_ratio normalized distance from the nearest black frame

Parameters:min_distance_ratio – The minimum ratio between the maximum distance of a pixel from a white pixel in the frame and a certain pixel for it to be included in the threshold, between 0 and 1

gbvision.utils.denoising.erode module

class gbvision.utils.denoising.erode.Erode(ksize: Union[int, Tuple[int, int]], iterations=1)[source]

Bases: gbvision.utils.pipeline.PipeLine

Creates a pipeline that erodes the image by a kernel of ones Used mainly for Erode & Dilate denoise filters

Parameters:
  • ksize – The kernel size, either an integer (meaning an nxn kernel) or a tuple (nxm kernel)
  • iterations – Optional. The amount of Erode iterations to perform, default is 1. Note! a large number of iterations will slow down the program
Returns:

A pipeline that erodes the given frame

gbvision.utils.denoising.erode_and_dilate module

class gbvision.utils.denoising.erode_and_dilate.ErodeAndDilate(ksize: Union[int, Tuple[int, int]], iterations=1)[source]

Bases: gbvision.utils.pipeline.PipeLine

A pipeline class that erodes and dilates the given frame by the same kernel

Parameters:
  • ksize – The kernel size, either an integer (meaning an nxn kernel) or a tuple (nxm kernel)
  • iterations – Optional. The amount of Dilate iterations to perform, default is 1. Note! a large number of iterations will slow down the program

gbvision.utils.denoising.median_blur module

class gbvision.utils.denoising.median_blur.MedianBlur(ksize: int)[source]

Bases: gbvision.utils.pipeline.PipeLine

Creates a pipeline that blurs the given frame using the median blur method Works very good for denoising purposes

Parameters:ksize – The size of the kernel used by the filter, must be an odd number
Returns:A pipeline that filters the image using the median blur method

Module contents