해리스 코너 감지기를 사용하여 피쳐 포인트를 플롯 한 이미지 (.fig)를 저장 한 다음 두 번째 이미지에 피쳐 포인트를 매핑하고 표시된 이미지와 비교하여 표시하려고합니다 일치하는 특징점. 이 문제를 해결하는 방법에 대한 도움을 받고 싶습니다. "-> 다른 이름으로 저장 파일"옵션이 그려진 된해리스 피쳐 포인트와 저장된 이미지 비교
I1 = rgb2gray(imread('/home/colin/downloads/matlabImages/template.jpg'));
points1 = detectHarrisFeatures(I1);
imshow(I1); hold on;
plot(points1);
난 그냥를 사용하여 이미지를 저장 :
코드 "템플릿"이미지를 매핑합니다.
다음 새 이미지에 기능을 플롯하기 위해 별도의 스크립트를 실행하고 비교하려고합니다. 여기에서 문제가 발생합니다.
는 스크립트 비교 :
I1 = hgload('/home/colin/tmp/untitled.fig');
I2 = rgb2gray(imread('/home/colin/downloads/matlabImages/small.jpg'));
points2 = detectHarrisFeatures(I2);
[features2, valid_points2] = extractFeatures(I2, points2);
indexPairs = matchFeatures(I1, features2);
matched_points2 = valid_points2(indexPairs(:, 2), :);
figure; showMatchedFeatures(I1, I2, matched_points2);
당신은 내가 오류의 일련 얻고 상상할 수 있듯이 :
Error using coder.internal.errorIf (line 9)
Expected FEATURES1 and FEATURES2 to be the same class.
Error in matchFeatures>assignFeaturesAndMetric (line 356)
coder.internal.errorIf(~isequal(class(f1), class(f2)),...
Error in matchFeatures>parseInputs (line 343)
[features1, features2, metric] = assignFeaturesAndMetric(f1, f2, metric);
Error in matchFeatures (line 196)
[features1, features2, metric, match_thresh, method, maxRatioThreshold, ...
Error in comparePoints (line 6)
indexPairs = matchFeatures(I1, features2);
대단한 답변을 보내 주셔서 감사합니다. – Colin747