cv2.createTrackbar pass userdata parameter into callback
<p>I read the doc about <a href="http://www.opencv.org.cn/opencvdoc/2.3.2/html/modules/highgui/doc/user_interface.html#createtrackbar" rel="noreferrer">cv2.createTrackbar</a>. It said that</p>

<blockquote>
  <p>onChange – Pointer to the function to be called every time the slider
  changes position. This function should be prototyped as void
  Foo(int,void*); , where the first parameter is the trackbar position
  and the second parameter is the user data (see the next parameter). If
  the callback is the NULL pointer, no callbacks are called, but only
  value is updated.</p>
</blockquote>

<p>But I don't know how to pass userdata into the onChange callback in Python.</p>

<p>I define my callback function:</p>

<pre><code>def callback(value,cur_img):
    cv2.GaussianBlur(cur_img, (5, 5), value)
</code></pre>

<p>I got the error: </p>

<pre><code>callback() takes exactly 2 arguments (1 given)
</code></pre>

<p>Because it only passes the bar value parameter into the callback. <br>
But I really need the cur_img for cv2.GaussianBlur function. How can I pass cur_img argument into the callback ? </p>