Create Tranck Bar:
Mat src = imread("MyPic.JPG"); namedWindow("My Window", 1); int iSliderValue1 = 50; createTrackbar("Brightness", "My Window", & iSliderValue1 , 100); int iSliderValue2 = 50; createTrackbar("Contrast", "My Window", & iSliderValue2 , 100); Mat dst; src .convertTo(dst, -1, dContrast, iBrightness); imshow("My Window", dst); IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII //Uncomment the following line if you are compiling this code in Visual Studio #include "stdafx.h" #include <opencv2/opencv.hpp> #include <iostream> #include <opencv2/cv.h> #include <opencv2/highgui.h> using namespace cv; using namespace std; /// Global Variables const int alpha_slider_max = 100; int alpha_slider; double alpha; double beta; /// Matrices to stor