Question: Write a program in Python using the OpenCV library that: A) Gets the name of an image from the command line and reads the image.
Write a program in Python using the OpenCV library that: A) Gets the name of an image from the command line and reads the image. B) Performs the dilation operation using a rectangular structuring element with dimensions of 5 in 5 on the image above. C) Performs the closing operation using a rectangular structuring element with dimensions of 5 in 5 on the image above. D) Performs the morphological gradient operation using a rectangular structuring element with dimensions of 5 in 5 on the image above. E) Performs the black hat operation using a rectangular structuring element with dimensions of 5 in 5 on the image above. F) Display the original image and images of sections (b), (c), (d) and (e) in a 2-by-3 window. To reply, send a file with a .py extension.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
