Trackbar pass variable
Hello,
How do I pass a variable using a trackbar ? I do not want it to be a global variable like http://docs.opencv.org/2.4/doc/tutori... Id like it to be something like below
createTrackbar( TrackbarName, "Linear Blend", &alpha_slider, alpha_slider_max, on_trackbar);
createTrackbar( TrackbarName, "Linear Blend", &beta_slider, alpha_slider_max, on_trackbar);
void on_trackbar(int in, void*) {
int slider_val= *((int*)&in);
//How do I print the current slider value of alpha and beta ?
//cout << alpha_slider
//cout << beta_slider
}