Python and OpenCV - How can I make a slider window in which I can use to change the value of parameters set? : <p>For example, a simple threshold code in Python and OpenCV would be:</p>

<pre><code>ret, thresh = threshold(img,127,255,cv2.THRESH_BINARY)
</code></pre>

<p>The second argument, that is the value of 127 would determine the kind of output of the thresholded image. It is kinda hard to change the value every time manually by replacing the value of 127 with other values (because I want to find the most optimum value that I needed to get the best result). Is it possible to make some kind of slider (or anything else similar) in which I can use to change the value of the second argument on the spot (while the program is running)?</p>
