filters module#
Filter library for the application
- class filters.add_margin(img)#
Bases:
img_filterAdd margin to the image.
- apply(params)#
- init(img)#
- class filters.bilateral(img)#
Bases:
img_filterBilateral filter from opencv.
- apply(params)#
- class filters.bilateral_scikit(img)#
Bases:
img_filterSkimage denoise_bilateral filter. Averages pixels based on their distance and color similarity. Preserves edges while removing unwanted noise. Much slower than opencv implementation.
- apply(params)#
- class filters.binarize(img)#
Bases:
img_filterBinarization filter from opencv.
- apply(params)#
- init(img)#
- class filters.binarize_otsu(img)#
Bases:
img_filterOtsu binarization filter from opencv.
- apply(_)#
- init(img)#
- class filters.block_match(img)#
Bases:
img_filterBlock matching filter from bm3d.
This filter is very slow and should be used only on small images
- apply(params)#
- class filters.dilate(img)#
Bases:
img_filterDilation morphological operation from OpenCV module.
- apply(params)#
- class filters.erode(img)#
Bases:
img_filterErosion morphological operation from OpenCV module.
- apply(params)#
- class filters.farid(img)#
Bases:
img_filterFarid filter from filters. Finds edges of the image.
- apply(_)#
- class filters.gaussian(img)#
Bases:
img_filterGaussian blur filter from scikit-image. Easier to use than opencv version.
- apply(params)#
- class filters.hessian(img)#
Bases:
img_filterHessian filter from scikit-image filters.
- apply(params)#
- class filters.img_filter(img)#
Bases:
objectParent class for all the filters.
- class filters.invert(img)#
Bases:
img_filterInvert the image using bitwise_not from opencv.
- apply(_)#
- class filters.median(img)#
Bases:
img_filterMedian blur filter from scikit-image. Using this over opencv version as that one is limited to 5x5 kernel.
- apply(params)#
- class filters.meijering(img)#
Bases:
img_filterMeijering filter from scikit-image filters. Finds continuous ridges.
- apply(_)#
- class filters.nlmeans(img)#
Bases:
img_filterNon-local means filter from scikit-image.
- apply(params)#
- class filters.sato(img)#
Bases:
img_filterMeijering filter from scikit-image filters. Exctracts continuous ridges.
- apply(_)#
- class filters.scale_values(img)#
Bases:
img_filterScale values of the image to use the entire range of data type. This should remove the line height issues.
- apply(_)#
- class filters.total_variation(img)#
Bases:
img_filterScikit image denoise_tv_chambolle filter from scikit-image.
Performs total variation denoising technique based on original Chambolle paper. This filter removes fine detail, but preserves details such as edges.
- apply(params)#
- class filters.unsharp_mask_pil(img)#
Bases:
img_filterUnsharp mask filter from PIL.
- apply(params)#
- class filters.unsharp_mask_scikit(img)#
Bases:
img_filterUnsharp mask filter from scikit.
Apply blurring using gaussian filter, then subtract the blurred image from the original image. Radius parameter is the sigma parameter of the gaussian filter. Amount parameter regulates the strength of the unsharp mask. Better results than using this from opencv.
- apply(params)#