- 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.
- 大學計算機基礎(第二版)
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- Learning ASP.NET Core 2.0
- 深入理解Java7:核心技術與最佳實踐
- Building a Recommendation Engine with Scala
- 算法訓練營:提高篇(全彩版)
- 名師講壇:Spring實戰開發(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- MATLAB for Machine Learning
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- JBoss:Developer's Guide
- 零代碼實戰:企業級應用搭建與案例詳解
- Xcode 6 Essentials
- 超簡單:Photoshop+JavaScript+Python智能修圖與圖像自動化處理
- 算法秘籍
- Microsoft Exchange Server 2016 PowerShell Cookbook(Fourth Edition)