I'm getting an error running this code. About a month ago it was working. When I type 'ver' in command line I get the following:
MATLAB Version 9.2 (R2017a)Simulink Version 8.9 (R2017a)Bioinformatics Toolbox Version 4.8 (R2017a)Communications System Toolbox Version 6.4 (R2017a)Computer Vision System Toolbox Version 7.3 (R2017a)Control System Toolbox Version 10.2 (R2017a)Curve Fitting Toolbox Version 3.5.5 (R2017a)DSP System Toolbox Version 9.4 (R2017a)Data Acquisition Toolbox Version 3.11 (R2017a)Image Processing Toolbox Version 10.0 (R2017a)Instrument Control Toolbox Version 3.11 (R2017a)Optimization Toolbox Version 7.6 (R2017a)Parallel Computing Toolbox Version 6.10 (R2017a)Signal Processing Toolbox Version 7.4 (R2017a)Simscape Version 4.2 (R2017a)Simscape Multibody Version 5.0 (R2017a)Simulink Control Design Version 4.5 (R2017a)Stateflow Version 8.9 (R2017a)Statistics and Machine Learning Toolbox Version 11.1 (R2017a)Symbolic Math Toolbox Version 7.2 (R2017a) clc clear I1 = imread('Image1.jpg'); I1 = rgb2gray(I1); I2 = imread('Image2.jpg'); I2 = rgb2gray(I2); I1_pts = detectSURFFeatures(I1,'MetricThreshold',100,'NumOctaves',5,'NumScaleLevels',3) I2_pts = detectSURFFeatures(I2,'MetricThreshold',100,'NumOctaves',5,'NumScaleLevels',3) figure(1) subplot(1,2,1) imshow(I1); hold on plot(I1_pts) title('Image 1 Surf Features Default Number of Points, Threshold = 200') hold off subplot(1,2,2) imshow(I2); hold on plot(I2_pts) title('Image 2 Surf Features Default Number of Points, Threshold = 200') hold off figure(2) subplot(1,2,1) imshow(I1); hold on plot(I1_pts.selectStrongest(20)) title('Image 1 Surf Features 20 Strongest Points, Threshold = 200') hold off subplot(1,2,2) imshow(I2); hold on plot(I2_pts.selectStrongest(20)) title('Image 2 Surf Features 20 Strongest Points, Threshold = 200') hold off %Last part
%Matching Overall Features
[f1, vpts1] = extractFeatures(I1,I1_pts); [f2, vpts2] = extractFeatures(I2,I2_pts); indexPairs = matchFeatures(f1,f2); matchedPoints1 = vpts1(indexPairs(:,1)); matchedPoints2 = vpts2(indexPairs(:,2)); figure(3); showMatchedFeatures(I1,I2,matchedPoints1,matchedPoints2); legend('matched points 1','matched points 2'); title('Matching Overall Features') %Matching Top 20 Features
[f1, vpts1] = extractFeatures(I1,I1_pts.selectStrongest(20)); [f2, vpts2] = extractFeatures(I2,I2_pts.selectStrongest(20)); indexPairs = matchFeatures(f1,f2); matchedPoints1 = vpts1(indexPairs(:,1)); matchedPoints2 = vpts2(indexPairs(:,2)); figure(4); showMatchedFeatures(I1,I2,matchedPoints1,matchedPoints2); legend('matched points 1','matched points 2'); title('Matching top 20 Features')
Best Answer