image processing - Invalid indexing operation error when trying to draw epipolar lines -
    i'm creating stereo images processing project modeled on matlab's examples. copy pasted code 1 of them don't works well.   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 , epipolar lines in first image'); hold on; plot(matchedpoints1(inliers,1), matchedpoints1(inliers,2), 'go');   an error: ...