1
Matlab의 예제를 모델로하여 스테레오 이미지 처리 프로젝트를 만듭니다. 그 중 하나의 붙여 넣은 코드는 잘 작동하지 않습니다.에피 폴라 선을 그리려 할 때 인덱싱 작업 오류가 잘못되었습니다.
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');
오류 :
오류 epilineTest를 사용하여 (24 행) 잘못된 색인 작업. 당신은 MATLAB의 이전 버전을 가지고있는 것처럼
안부
전체 오류 자루를 포함하십시오. 어떤 라인이'epilineTest'라고 부릅니까? – Daniel
@Daniel epilineTest는이 코드 (epilineTest.m)를 포함하는 파일의 이름입니다. 오류의 전체 내용은 다음과 같습니다. <> epilineTest 사용 중 오류 (행 24) 색인 생성 작업이 잘못되었습니다. <> 기타 무엇이든 – janie
라인 24는 어느 것입니까? 코드의 행 수가 24 개 미만입니다. – Daniel