title: OpenCV: Threshold and Invert an image
body: <p>I'm trying to threshold and invert an image with Cinder OpenCV block.
  In openFrameworks I would use something like that:</p>
  
  <pre><code>someImage.threshold(230, true);
  </code></pre>
  
  <p>...where true is the parameter to specify to threshold and invert.</p>
  
  <p>In Cinder I'm trying the following:</p>
  
  <pre><code>cv::threshold (input, threshNear, 230, 255, CV_THRESH_BINARY_INV);     
  </code></pre>
  
  <p>... that doesn't work, or</p>
  
  <pre><code>cv::threshold (input, threshNear, 100, 255, CV_8U);
  cv::invert ( threshNear,  threshNearInverted);
  </code></pre>
  
  <p>...that produces and error and let the program stuck.</p>
  
  <p>Any suggestion?</p>