title: python / opencv3 double thresholding (up and down)
body: <p>I'm new to python and opencv. I want to load an image (grayscale) and do some special thresholding. I want to keep brightness values between 20-30 as is and make zero (or 255) all other pixel's values. I mean pixels with brightness value below 20 and over 30.</p>
  
  <p>I made some tests with <code>inrange</code> but no luck. I also tried the following but it only does half the job:</p>
  
  <pre><code>ret,img = cv.threshold(img,30,255,cv.THRESH_BINARY)
  </code></pre>
  
  <p>Any suggestion?</p>