![]() |
Digital image processing makes the use of algorithms that help us to extract essential features from the images. The aim of the digital image processing is to enhance image quality so that we can extract useful information which can be used later for further detailed studies. Pixel is the smallest unit in the image that has some color value. Regions of Interest are those areas on the image on which we can perform many operations related to any digital image processing. What is Binary Image?There are three categories of images out of which Binary image is mostly used in Image Processing. There are two colors present in binary images: black and white. Black denotes background and white denotes regions of interest. There are two pixel values : 0 is used to denote black while 1 is used to denote white. How to Create a Binary Image?To create a Binary image we use the thresholding. In thresholding, we define the threshold for the pixel value where we compare the image pixel value with the threshold value. The steps are as follows:
Operations on Binary ImagesWe can perform several Boolean operations like AND, OR, NOT and XOR. Other than those operations we can perform some advanced operations like Morphological Operations. This type of operations focus on the shape of the images. The task of morphological operations is to process the shapes of the foregrounds. Some are as follows 1. DilationDilation is a technique that is used to add borders around the regions of interest or the objects whose pixel value is 1. This technique is used to fill the gaps or small holes that might be present between two or more objects. It first detects the objects and expands by adding the pixels of value 1. Let us consider an image ![]() ![]() Binary Image Now we are using OpenCV, a computer vision library to dilate our image. The code is as follows
The image after dilation is as follows ![]() As we can see the folds present on the flower has been filled a compared to the original Binary image 2. ErosionThis operation works completely opposite of Dilation. The aim of this operation is to remove the additional pixels around the images. This technique is useful when we want to remove the noises from the image. The code is as follows:
![]() In erosion we can see that the background has become more prominent and that the dots that were present at the center of the flower has been removed. 3. OpeningThis technique is basically combination of the above two techniques that is dilation and erosion. In this, erosion operation is performed then the dilation operation. It is used to smooth the curves along the boundaries by removing the additional pixels and fill up the necessary gaps using the dilation technique.
![]() As you can see that because of erosion technique being applied first, the background has become prominent and that excess pixels has been removed. Then with the help of dilation the lines present on the petals have been filled up. 4. ClosingClosing is just the opposite of Opening. In Closing dilation operation is first performed followed by erosion. This technique is useful to remove the small holes and the excess noise present.
![]() In this we can see that all the gaps have been filled up. Then to make the petals prominent, erosion technique has been applied. Advantages and Disadvantages of Binary ImagesAdvantages
Disadvantages
Applications of Binary Images
ConclusionBinary Images are simple but they are powerful in the world of Image Processing. This is because one can extract useful information despite less color codes and can highlight regions of interest effectively. Frequently Asked Questions on Binary Image-FAQ’SExplain the difference between Binary image and grayscale image?
What techniques can we use to handle noise in images?
What are some advanced operations other than morphological operations?
|
Reffered: https://www.geeksforgeeks.org
Electronics Engineering |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 24 |