官术网_书友最值得收藏!

  • OpenCV 4 with Python Blueprints
  • Dr. Menua Gevorgyan Arsen Mamikonyan Michael Beyeler
  • 351字
  • 2021-06-24 16:49:56

Fun with Filters

The goal of this chapter is to develop a number of image processing filters and then apply them to the video stream of a webcam in real time. These filters will rely on various OpenCV functions to manipulate matrices through splitting, merging, arithmetic operations, and applying lookup tables for complex functions.

We will cover the following three effects, which will help familiarize you with OpenCV, and we will build on these effects in future chapters of this book:

  • Warming and cooling filters: We will implement our own curve filters using a lookup table.
  • Black-and-white pencil sketch: We will make use of two image-blending techniques, known as dodging and burning.
  • Cartoonizer: We will combine a bilateral filter, a median filter, and adaptive thresholding.

OpenCV is an advanced toolchain. It often raises the question, that is, not how to implement something from scratch, but which precanned implementation to choose for your needs. Generating complex effects is not hard if you have a lot of computing resources to spare. The challenge usually lies in finding an approach that not only gets the job done but also gets it done in time.

Instead of teaching the basic concepts of image manipulation through theoretical lessons, we will take a practical approach and develop a single end-to-end app that integrates a number of image filtering techniques. We will apply our theoretical knowledge to arrive at a solution that not only works but also speeds up seemingly complex effects so that a laptop can produce them in real time.

In this chapter, you will learn how to do the following using OpenCV:

  • Creating a black-and-white pencil sketch
  • Applying pencil sketch transformation
  • Generating a warming and cooling filter
  • Cartoonizing an image
  • Putting it all together

Learning this will allow you to familiarize yourself with loading images into OpenCV and applying different transformations to those images using OpenCV. This chapter will help you learn the basics of how OpenCV operates, so we can focus on the internals of the algorithms in the following chapters.

Now, let's take a look at how to get everything up and running.

主站蜘蛛池模板: 玛曲县| 桂林市| 广灵县| 沛县| 鄂托克前旗| 奉贤区| 桂阳县| 凤山县| 漳州市| 崇礼县| 桓仁| 都昌县| 互助| 郎溪县| 贡觉县| 岳西县| 涪陵区| 昌邑市| 澄江县| 石林| 浦东新区| 安义县| 聊城市| 井研县| 永昌县| 翁源县| 察雅县| 南丹县| 岐山县| 澄城县| 南郑县| 锦屏县| 靖安县| 吉林省| 吉木乃县| 玛纳斯县| 射洪县| 汕头市| 嵊州市| 开鲁县| 肇东市|