Thresholding is the simplest method of image segmentation. It is a non-linear operation that converts a gray-scale image into a binary image where the two levels are assigned to pixels that are below or above the specified threshold value. In other words, if pixel value is greater than a threshold value, it is assigned one value (may be white), else it is assigned another value (may be black). In OpenCV, I use the cv2.threshold() function.
###########################################################################################
# Converts graylevel to black&white. The user can define the threshold in the UI
###########################################################################################
#
[processing.image.black_white.Filter]
# The threshold defines all values below that "graylevel" are not part of the outline to carve
#
threshold = 89
# visible in the user menu bar
#
menu = true
Edge detection is one of the fundamental operations when we perform image processing. It helps us reduce the amount of data (pixels) to process and maintains the structural aspect of the image. We’re going to look into many people think it as the ultimate edge detectorm Canny Edge Detection. With this detector, we get clean, thin edges that are well connected to nearby edges.
[processing.image.edge_canny.Filter]
# visible for the user interaction
#
menu = true
# default threshold. Adjustable in the UI
threshold = 103
Converts color images to grayscale. Grayscale is the perfect starting point for edge detection and should be done at the very beginning of your pipeline.
###########################################################################################
# Converts colored image to graylevel
###########################################################################################
[processing.image.grayscale.Filter]
menu = true
Inverts the color of an grayscale image. Normaly black is carved as the deepest and white isn’t carved at all. This is the perfect filter if you want to invert this behaviour.
[processing.image.invert.Filter]
# visibility for the user.
#
menu = false
It is the difference between the dilation and the erosion of an grayscale image. The result is more detailed than that of Canny Edge. Here you can see the “belly button” of the mocha pot. This kind of detail is not visible in other edge detection filters.
Additional the result is grayscale in comparison to the canny edge, which is black&white.
[processing.image.outline.Filter]
# visibility for the user.
#
menu = true
This is done by convolving an image with a normalized box filter. It simply takes the average of all the pixels under the kernel area and replaces the central element.
[processing.image.smooth_average.Filter]
# visibility for the user.
#
menu = true
factor = 255
The bilateral filter is highly effective in noise removal while keeping edges sharp. But the operation is slower compared to other filters.
###########################################################################################
# Blur the image to remove some possible noise. This is good for noisy background of
# bad light
###########################################################################################
[processing.image.smooth_bilateral.Filter]
# the bilateral blur factor
#
factor = 1
# visible in the user menu bar
#
menu = true