title: cv2.createTrackbar using python
body: <p>I'm a newbie in python and opencv, I want to create a track-bar to control the hierarchy of the function cv2.findContours
  but I don't know how to add it to the source code
  her is the code:</p>
  
  <pre><code>import cv2
  import cv2.cv as cv
  
  cv2.namedWindow("test")
  vc = cv2.VideoCapture(2);
  retVal, frame = vc.read();
  while True:
      if frame is not None:   
          imgray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
          ret,thresh = cv2.threshold(imgray,127,255,0)
          contours, hierarchy = cv2.findContours(thresh,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)
  
          cv2.drawContours(frame, contours, -1, (0,255,0), 2)
  
          cv2.imshow("test", frame)
  
       rval, frame = vc.read()
  
       if cv2.waitKey(1) &amp; 0xFF == 27:
            break
  
  cv.DestroyAllWindows()
  </code></pre>
  
  <p>thank you in advance</p>