title: detect if a pixel in RGB image belong to a line between two other pixels (MATLAB)
body: <p>I have a problem in my matlab project</p>
  
  <p>I have a RGB color image, and I have two specified pixel (x1,y1) and (x2,y2)
  I want to check each pixel in the image and determine if pixel is belong to the line between (x1,y1) and (x2,y2)</p>
  
  <p>I tried to use these functions</p>
  
  <p>m = (y2-y1)/(x2-x1);
  b= y1 - m*x1;
  if (y==m*x+b)  then TRUE</p>
  
  <p>but it almost fails</p>
  
  <p>anybody has another way to solve it ? please </p>
  
  <p>Thanks</p>