title: OpenCV inRange() function
body: <p>I try to run the following code:</p>
  
  <pre><code>#include&lt;opencv\cv.h&gt;
  #include&lt;opencv\highgui.h&gt;
  
  using namespace cv;
  
  
  int main() {
  
      VideoCapture cap;
      cap.open(0);
  
  
      while (1) {
  
  Mat src;
  Mat threshold;
  
  cap.read(src);
  
  inRange(src, Scalar(0, 0, 0), Scalar(255, 0, 0), threshold);
  imshow("thr", threshold);
  imshow("hsv", src);
  
          waitKey(33);
      }
      return 0;
  }
  </code></pre>
  
  <p>But it seems like it doesn't filter because there is only a blank window appearing when I run the code.</p>
  
  <p>How to get that code to detect red colors?</p>