In the research and application of images, people are often only interested in certain parts of the images. These parts are often called targets or foregrounds, and they generally correspond to specific, unique areas of the image. In order to identify and analyze the target, these relevant areas need to be separated and extracted. Image segmentation refers to the technique and process of dividing an image into characteristic areas and extracting objects of interest.

This article will first introduce and simply derive the formula, and then use the code to explore the effect of traditional image segmentation method.

_Note __: The full code is available on _Google Colab

Otsu’s algorithm

Assuming an image is composed of brighter objects on a dark background, an obvious way to extract objects from the background is to choose an appropriate grayscale threshold T. The pixels with brightness greater than T are called object points, otherwise they are called Background point. Give the object point and the background point two gray values ​​that are obviously different, then the object can be separated from the background. As shown below.

Image for post

Example illustrates automatic Otsu thresholding.

Otsu’s method is based on finding a threshold to split the image into two separate segments, based simply on their grey-level values. Since the maximum number of grey-levels is finite (and small, 256), we can use an exhaustive search for the threshold t that minimizes the variance within the class.

#image-segmentation #machine-learning #image-processing #computer-vision #deep learning

Introduction To Image Segmentation
4.15 GEEK