title: Invalid indexing operation error when trying to draw epipolar lines
body: <p>I'm creating Stereo images processing project modeled on Matlab's examples. A copy pasted code from one of them don't works well.</p>
  
  <pre><code>I1 = rgb2gray(imread('viprectification_deskLeft.png'));
  I2 = rgb2gray(imread('viprectification_deskRight.png'));
  
  points1 = detectHarrisFeatures(I1);
  points2 = detectHarrisFeatures(I2);
  
  [features1, valid_points1] = extractFeatures(I1, points1);
  [features2, valid_points2] = extractFeatures(I2, points2);
  
  indexPairs = matchFeatures(features1, features2);
  
  matchedPoints1 = valid_points1(indexPairs(:, 1),:);
  matchedPoints2 = valid_points2(indexPairs(:, 2),:);
  
  figure; showMatchedFeatures(I1, I2, matchedPoints1, matchedPoints2);
  load stereoPointPairs
  
  [fLMedS, inliers] = estimateFundamentalMatrix(matchedPoints1,matchedPoints2,'NumTrials',4000);
  
  figure;
  subplot(121); imshow(I1);
  title('Inliers and Epipolar Lines in First Image'); hold on;
  plot(matchedPoints1(inliers,1), matchedPoints1(inliers,2), 'go');
  </code></pre>
  
  <p>An error:</p>
  
  <p>Error using epilineTest (line 24) Invalid indexing operation.</p>
  
  <p>Best regards</p>