title: how to use "cv2.createTrackbar()" function to resize the streaming video frame?
body: <p>I am an enthusiastic learner of opencv and  write down a code  for video streaming with opencv I want to learn the use of cv2.createTrackbar()  to add some interactive functionality. Though, I tried  this function but its not working for me :</p>
  
  <p>For streaming and resizing the frame  i use this code </p>
  
  <pre><code>import cv2
  import sys
  import scipy.misc
  import scipy 
  
  cap = cv2.VideoCapture(sys.argv[1])
  
  new_size = 0.7  # value range(0,1) can be used for resizing the  frame size 
  
  while(1):
  
      ret, frame = cap.read() 
  
      frame = scipy.misc.imresize(frame, new_size)
  
      cv2.imshow("t",frame)
      k = cv2.waitKey(30) &amp; 0xff
      if k == 27:
          break
  </code></pre>
  
  <p>Then i have transformed the above code like this to add the track bar functionality to resize the frame.  </p>
  
  <pre><code>import cv2
  import sys
  import scipy.misc
  import scipy
  
  def nothing(x):
      pass
  
  cv2.createTrackbar('t','frame',0,1,nothing)
  
  cap = cv2.VideoCapture(sys.argv[1])
  
  
  while(1):
  
  
  
      ret, frame = cap.read() 
      j = cv2.getTrackbarPos('t','frame')
      frame = scipy.misc.imresize(frame, j)
  
       cv2.imshow("t",frame)
       k = cv2.waitKey(30) &amp; 0xff
           if k == 27:
               break
  </code></pre>
  
  <p>but this code is not working and ended up with this error given bellow:</p>
  
  <pre><code>me@ubuntu:~/Desktop/final_video_soft$ python GUI_STREAM.py p.3gp
  Traceback (most recent call last):
    File "GUI_STREAM.py", line 20, in &lt;module&gt;
      frame = scipy.misc.imresize(frame, j)
    File "/usr/lib/python2.7/dist-packages/scipy/misc/pilutil.py", line 365, in imresize
      imnew = im.resize(size, resample=func[interp])
    File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1305, in resize
      im = self.im.resize(size, resample)
  TypeError: must be 2-item sequence, not float
  </code></pre>