Images can be combined in different ways. Since they are regular matrices, they can be added, subtracted, multiplied, or divided. OpenCV offers various image arithmetic operators, and their use is discussed in this recipe.
Performing simple image arithmetic
Getting ready
Let's work with a second image that we will combine with our input image using an arithmetic operator. The following screenshot represents this second image:
Let's start with our recipe.
How to do it...
Here, we add two images. This is useful when you want to create some special effects or to...