title: how to delete repeating coordinates of vector<Point2f>
body: <p>I passed coordinates of points into vector, and there are some repeating points, so I want to delete other repeating points and just keep the only points.</p>
  
  <p>for example:</p>
  
  <pre><code>vector&lt;Point2f&gt;  points;
  
  points[0]=Point2f(1,1);
  points[1]=Point2f(2,3);
  points[2]=Point2f(1,1);
  points[3]=Point2f(2,3);
  points[4]=Point2f(1,1);
  points[5]=Point2f(4,1);
  </code></pre>
  
  <p>I want to get the result like this:</p>
  
  <pre><code>points[0]=Point2f(1,1);
  points[1]=Point2f(2,3);
  points[2]=Point2f(4,1);
  </code></pre>
  
  <p>PS The order of elements is unchanged.</p>
  
  <p>What I have tried is show as below:</p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  
  #include &lt;vector&gt;
  #include&lt;iostream&gt;
  
  using namespace std;
  using namespace cv;
  
  int main()
  {
      vector&lt;Point2f&gt;  pointTemp;
  
      pointTemp[0]=Point2f(1,1);
      pointTemp[1]=Point2f(2,3);
      pointTemp[2]=Point2f(1,1);
      pointTemp[3]=Point2f(2,3);
      pointTemp[4]=Point2f(1,1);
      pointTemp[5]=Point2f(4,1);
  
      for(vector&lt;Point2f&gt;::iterator it=pointTemp.begin();it!=pointTemp.end();it++)
      {
          for(vector&lt;Point2f&gt;::iterator it1=it+1;it1!=pointTemp.end();)
          {
              if(it-&gt;x==it1-&gt;x&amp;&amp;it-&gt;y==it1-&gt;y)
              {
                  it1=pointTemp.erase(it1);
              }
              else
              {
                  it1++;
              }
          }
      }
      //cout&lt;&lt;pointTemp.size()&lt;&lt;endl;
  
      return 0;
  }
  </code></pre>