In this article, a few image processing/computer vision problems and their solutions with python libraries (scikit-image, PIL, opencv-python) will be discussed. Some of the problems are from the exercises from this book (available on Amazon). Here is the GitHub repository with the codes from the book and my blog on WordPress and a playlist on youtube. Also, here is the github repository of the codes for my new book (available on Amazon).
We shall use the mandrill image to implement the wave transform. The next python code fragment shows how to do it:
**from**
skimage.io **import**
imread
**from**
skimage.transform **import**
warp
**import**
matplotlib.pylab as plt
**def**
wave(xy):
xy[:, 1] **+=**
20*****np.sin(2*****np.pi*****xy[:, 0]**/**64)
**return**
xy
im **=**
imread('images/mandrill.jpg')
im **=**
warp(im, wave)
plt.imshow(im)
plt.show()
The next figure shows the original mandrill input image and the output image obtained after applying the wave transform.
We shall use the mandrill image to implement the wave transform. The next python code fragment shows how to do it:
#computer-vision #machine-learning #image-processing