title: Making cv2.createTrackbar specified step size and discard certain values
body: <p>I have been running the trackbar program from the OpenCV documentation. 
  Here is the code: </p>
  
  <pre><code> import cv2
   import numpy as np
  
   def nothing(x):
      pass
  
   # Create a black image, a window
   img = np.zeros((300,512,3), np.uint8)
   cv2.namedWindow('image')
  
   # create trackbars for color change
   cv2.createTrackbar('R','image',5,255,nothing)
   cv2.createTrackbar('G','image',5,255,nothing)
   cv2.createTrackbar('B','image',5,255,nothing)
  
   # create switch for ON/OFF functionality
   switch = '0 : OFF \n1 : ON'
   cv2.createTrackbar(switch, 'image',0,1,nothing)
  
   while(1):
      cv2.imshow('image',img)
      k = cv2.waitKey(1) &amp; 0xFF
      if k == 27:
         break
  
      # get current positions of four trackbars
      r = cv2.getTrackbarPos('R','image')
      **if r%4 == 0 and r &gt;0 and r &lt;255:
         pass**
      g = cv2.getTrackbarPos('G','image')
      b = cv2.getTrackbarPos('B','image')
      s = cv2.getTrackbarPos(switch,'image')
  
      if s == 0:
        img[:] = 0
      else:
        img[:] = [b,g,r]
  
      cv2.destroyAllWindows()
  </code></pre>
  
  <p>I want the trackbar step size to be 4, i.e. as the range is set to 0-255, I want values that are divisible by 4. I have adjusted this thing in the <code>nothing</code> callback like this:</p>
  
  <pre><code>def nothing(x):
      if x &gt; 0 and x &lt;255 and x % 4 ==0 
         pass
  </code></pre>
  
  <p>Also I have also added a code (bold one), but this is also not working
  Anyone with a solution ? </p>