Morphological operations are used to extract image components that are useful in the representation and description of region shape. Morphological operations are some basic tasks dependent on the picture shape. It is typically performed on binary images. It needs two data sources, one is the input image, the second one is called structuring component. Morphological operators take an input image and a structuring component as input and these elements are then combines using the set operators. The objects in the input image are processed depending on attributes of the shape of the image, which are encoded in the structuring component.
Opening is similar to erosion as it tends to remove the bright foreground pixels from the edges of regions of foreground pixels. The impact of the operator is to safeguard foreground region that has similarity with the structuring component, or that can totally contain the structuring component while taking out every single other area of foreground pixels. Opening operation is used for removing internal noise in an image.
Syntax: cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel)
-> image: Input Image array.
-> cv2.MORPH_OPEN: Applying the Morphological Opening operation.
-> kernel: Structuring element.
Below is the Python code explaining Opening Morphological Operation –
The system recognizes the defined blue book as the input as removes and simplifies the internal noise in the region of interest with the help of the Opening function.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Python | Morphological Operations in Image Processing (Closing) | Set-2
- Python | Morphological Operations in Image Processing (Gradient) | Set-3
- Image segmentation using Morphological operations in Python
- Difference between Opening and Closing in Digital Image Processing
- Morphological operations in MATLAB
- Point Processing in Image Processing using Python-OpenCV
- Image Processing in Java | Set 3 (Colored image to greyscale image conversion)
- Image Processing in Java | Set 4 (Colored image to Negative image conversion)
- Image Processing in Java | Set 6 (Colored image to Sepia image conversion)
- Image processing with Scikit-image in Python
- Mahotas - Opening Process on Image
- Image Processing in MATLAB | Fundamental Operations
- Image Processing in Java | Set 5 (Colored to Red Green Blue Image Conversion)
- Image Processing in Java | Set 7 (Creating a random pixel image)
- Image Processing in Java | Set 8 (Creating mirror image)
- Image Processing in Java | Set 11 (Changing orientation of image)
- Image Processing in Java | Set 10 ( Watermarking an image )
- Image Edge Detection Operators in Digital Image Processing
- Opening multiple color windows to capture using OpenCV in Python
- Python - Opening links using Selenium
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.