title: Identifying person using optical flow and clustering?
body: <p>So I am using matlab and I've managed to modify one of their examples so that I can now plot the flow lines as people walk below (Camera is above a door).
  I use Lucas-Kanade optical flow and the computer vision toolbox.</p>
  
  <p>The lines are defined like so, I also defined the tracked points. These tracked points include cases where the original points haven't changed and so the real(tmp(:)) in this case will be zero and those points will be the same as the orgininally identified feature points.</p>
  
  <pre><code>vel_Lines = [Y(:)   X(:)   Y(:)+real(tmp(:))   X(:)+imag(tmp(:))];
  allTrackedPoints = [Y(:)+real(tmp(:))   X(:)+imag(tmp(:))]; 
  </code></pre>
  
  <p>My question is how can I JUST get the points which have successfully been tracked a certain distance? I want to somehow only retain values which the change is large enough. </p>
  
  <p>I'm not great with Matlab's syntax so was hoping this would be easy for someone.</p>
  
  <p>I want to get the points that were successfuly tracked pertaining to the motion, then cluster these points to determine how many people, and then tracked these sets of points using a multiple object tracker.</p>