OpenCV  4.5.3-pre
Open Source Computer Vision
Adding a Trackbar to our applications!

Next Tutorial: Reading Geospatial Raster files with GDAL

Original author Ana Huamán
Compatibility OpenCV >= 3.0


In this tutorial you will learn how to:


Let's modify the program made in the tutorial Adding (blending) two images using OpenCV. We will let the user enter the \(\alpha\) value by using the Trackbar.


We only analyze the code that is related to Trackbar:

Note the following (C++ code):

Finally, we have to define the callback function on_trackbar for C++ and Python code, using an anonymous inner class listener in Java

Note that (C++ code):