Image Processing and Acquisition using Python by Sridevi Pudipeddi Ravishankar Chityala

Image Processing and Acquisition using Python by Sridevi Pudipeddi Ravishankar Chityala

Author:Sridevi Pudipeddi, Ravishankar Chityala
Language: eng
Format: epub
Publisher: Chapman and Hall/CRC
Published: 2018-09-25T16:00:00+00:00


Figure 8.3(a) is an example of a binary image with 0’s and 1’s.

The background pixels are represented by 0 and the foreground by 1.

The structuring element that will be used for erosion is shown in Figure 8.3(b). The X on the 1 represents the reference pixel in the structuring element. In this case the structuring element is of size 1-by-2. Both the values in the structuring element play an important role in erosion.

Consider the first row in Figure 8.3(a) and apply the structuring element on each pixel of the row.

With this structuring element, we can only erode the boundary by one pixel to the right.

The structuring element is placed over the first pixel of that row and the pixel values in the structuring element are compared with the pixel values in the image. Since the reference value in the structuring element is 1 whereas the underlying pixel value in the image is 0, the pixel value remains unchanged. In Figure 8.3(c), the left side is the input to the erosion process and the right side is the intermediate output.

The structuring element is then moved one pixel over. The reference pixel in the structuring element and the image pixel value match. Since the next value to the reference value also matches with the 1 in the underlying pixel value, the pixel values in the output image do not change, as shown in Figure 8.3(d).

The structuring element is then moved one pixel over. The reference pixel in the structuring element and the image pixel value match but the non-reference value does not match with the 0 in the underlying pixel value. The structuring element is on the boundary. Hence, the pixel value below the reference value is replaced with 0, as shown in Figure 8.3(e).

The structuring element is then moved one pixel over. Since the structuring element is out of image bound, there is no change in the underlying image pixel value, as shown in Figure 8.3(f).

This process is repeated on every pixel in the input image. The output of the erosion process on the whole image is given in Figure 8.3(g).

The process can be iterated multiple times using the same structuring element. In such case, the output from the previous iteration (Figure 8.3(g)) is used as input to the next iteration.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.