title: OpenCV better detection of red color?
body: <p>I have the following image:</p>
  
  <p><a href="https://i.stack.imgur.com/LQ7qw.png"><img src="https://i.stack.imgur.com/LQ7qw.png" alt="enter image description here"></a></p>
  
  <p>I would like to detect the red rectangle using <code>cv::inRange</code> method and HSV color space. </p>
  
  <pre><code>int H_MIN = 0;
  int H_MAX = 10;
  int S_MIN = 70; 
  int S_MAX = 255;
  int V_MIN = 50;
  int V_MAX = 255;
  
  cv::cvtColor( input, imageHSV, cv::COLOR_BGR2HSV );
  
  cv::inRange( imageHSV, cv::Scalar( H_MIN, S_MIN, V_MIN ), cv::Scalar( H_MAX, S_MAX, V_MAX ), imgThreshold0 );
  </code></pre>
  
  <p>I already created dynamic trackbars in order to change the values for HSV, but I can't get the desired result. </p>
  
  <p>Any suggestion for best values (and maybe filters) to use?</p>