Question
In Python: Below is the Given Code %matplotlib inline import matplotlib.pyplot as plt import imageio import scipy.ndimage as nd url = 'https://raw.githubusercontent.com/joefoxva1/CDS468/master/Lecture_6_7_8_9/alien73.png' amg = imageio.imread(url,as_gray=True)
In Python: Below is the Given Code
%matplotlib inline import matplotlib.pyplot as plt import imageio import scipy.ndimage as nd
url = 'https://raw.githubusercontent.com/joefoxva1/CDS468/master/Lecture_6_7_8_9/alien73.png' amg = imageio.imread(url,as_gray=True)
bmg = nd.binary_dilation(amg, iterations=12) ^ nd.binary_dilation(amg, iterations=9) cmg = nd.binary_dilation(amg, iterations=6) ^ nd.binary_dilation(amg, iterations=3)
dmg = amg + bmg ^ cmg
plt.title('Original Image') plt.imshow(amg, cmap='gray') plt.show()
plt.title('Three Dialation Image') plt.imshow(dmg, cmap='gray') plt.show()
'sebeu! Bu!|nsedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started