In this recipe, we will learn how to add UI elements, such as buttons and trackbars, into OpenCV windows and work with them. Trackbars are useful UI elements that:
- Show the value of an integer variable, assuming the value is within a predefined range
- Allow us to change the value interactively through changing the trackbar position
Let's create a program that allows users to specify the fill color for an image by interactively changing each Red, Green, Blue (RGB) channel value.