OpenCV
3.0.0
Open Source Computer Vision
|
In this tutorial you will learn how to:
In this tutorial, we will briefly explore two ways of defining the extra padding (border) for an image:
This will be seen more clearly in the Code section.
Let the user choose what kind of padding use in the input image. There are two options:
The user chooses either option by pressing 'c' (constant) or 'r' (replicate)
After compiling the code above, you can execute it giving as argument the path of an image. The result should be:
Below some screenshot showing how the border changes color and how the BORDER_REPLICATE option looks: