- OpenCV 4 with Python Blueprints
- Dr. Menua Gevorgyan Arsen Mamikonyan Michael Beyeler
- 213字
- 2021-06-24 16:49:59
Cartoonizing an image
Over the past few years, professional cartoonizer software has popped up all over the place. In order to achieve a basic cartoon effect, all we need is a bilateral filter and some edge detection.
The bilateral filter will reduce the color palette or the numbers of colors that are used in the image. This mimics a cartoon drawing, wherein a cartoonist typically has few colors to work with. Then, we can apply edge detection to the resulting image to generate bold silhouettes. The real challenge, however, lies in the computational cost of bilateral filters. We will, therefore, use some tricks to produce an acceptable cartoon effect in real time.
We will adhere to the following procedure to transform an RGB color image into a cartoon:
- First, apply a bilateral filter to reduce the color palette of the image.
- Then, convert the original color image into grayscale.
- After that, apply a median blur to reduce image noise.
- Use adaptive thresholding to detect and emphasize the edges in an edge mask.
- Finally, combine the color image from step 1 with the edge mask from step 4.
In the upcoming sections, we will learn about the previously mentioned steps in detail. First, we'll learn how to use a bilateral filter for edge-aware smoothing.
- Vue.js快跑:構建觸手可及的高性能Web應用
- Internet of Things with Intel Galileo
- 人人都是網站分析師:從分析師的視角理解網站和解讀數據
- Scala謎題
- 零基礎入門學習Python
- Symfony2 Essentials
- Create React App 2 Quick Start Guide
- Building Microservices with .NET Core
- Data Science Algorithms in a Week
- H5+移動營銷設計寶典
- Building a Media Center with Raspberry Pi
- Kotlin程序員面試算法寶典
- 軟件測試項目實戰之功能測試篇
- C#從入門到精通(微視頻精編版)
- 微信公眾平臺服務號開發:揭秘九大高級接口