title: Drawing with cv::circle's over a line Iterator in c++ with openCV
body: <p>I'm creating an iterator line, which I pass through a <code>for()</code> and draw with <code>cv::circle</code> points. So far so good, form a line drawing, by the iterator's line points. But there is a <strong>small drawing in the upper left corner that is not my intention</strong>, does anyone know where I could be going wrong?</p>
  <p><a href="https://i.stack.imgur.com/6aQsB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6aQsB.png" alt="enter image description here" /></a></p>
  <pre><code>std::vector&lt;cv::Point&gt; createLineIterator(cv::Mat &amp;frame)
  {
      cv::Point p1(400, 0);
      cv::Point p2(200, 800);
  
      cv::LineIterator line(frame, p1, p2, 8);
      std::vector&lt;cv::Point&gt; points(line.count);
      for (int i = 0; i &lt;= line.count; i++, ++line)
      {
          points.push_back(line.pos());
      }
      return points; //points that I will iterate over to create circles and draw the line
  }
  int main(int argc, char const *argv[])
  {
      cv::Mat image(500, 1000, CV_8UC1); // cria imagem
  
      std::vector&lt;cv::Point&gt; points = createLineIterator(image);
      for (auto i : points)
      {
          cv::circle(image, i, 2, cv::Scalar(255, 100, 255)); //Point-by-point drawing of the iterator line
      }
  
      cv::imshow(&quot;image&quot;, image);
      cv::waitKey(0);
      return 0;
  }
  </code></pre>