title: openCV Thresholding negative values
body: <p>I am trying to calculate motion optical flow and I am trying to reduce noise, by thresholding smaller values. When calculating the motion flow, I also get negative values, which I would want to keep, but which get discarded once I apply the threshold.</p>
  
  <p>I have thought of using the absolute value in order to achieve this, but the, how would I get back my negatives?</p>
  
  <p>Also, I am using numpy arrays, if that helps:</p>
  
  <pre><code>flow = cv2.calcOpticalFlowFarneback(frameGray, frame1Gray, 0.5,1,3,15,3,5,1)
  
  thresh_flow = cv2.threshold(np.absolute(flow), 5, 255, cv2.THRESH_TOZERO)
  </code></pre>