任何人都可以帮我解决这个错误,我试图在matlab中使用mexopencv库找到两个图像的基本矩阵,这是我的代码
global fmImage1;
global fmImage2;
%-------------Read First Image---------------------------------
[filename pathname]=uigetfile({'*.jpg'},'File Selector',...
'C:\Users\Public\Pictures\Sample Pictures');
if isequal(filename,0) | isequal(pathname,0);
return; end %Pressed Cancel
imagePath=strcat(pathname,filename);
fmImage1=imread(imagePath);
figure,
imshow(fmImage1);
%-------------Read Scond Image---------------------------------
[filename pathname]=uigetfile({'*.jpg'},'File Selector',...
'C:\Users\Public\Pictures\Sample Pictures');
if isequal(filename,0) | isequal(pathname,0);
return; end %Pressed Cancel
imagePath=strcat(pathname,filename);
fmImage2=imread(imagePath);
figure,
imshow(fmImage2);
%---------------------------------------------------------------------
%*********************************************************************
%detect features keypoints from both images
keypoints_1 = cv.SIFT(fmImage1);
keypoints_2 = cv.SIFT(fmImage2);
%convert keypoints to cell array of n points so that I can use them in findFM
l1=length(keypoints_1);
l2=length(keypoints_2);
if l1>l2
Lth=l2;
else
Lth=l1;
end
points1_cell=cell(1,20);
points2_cell=cell(1,20);
for i=1:20
point1_x=round(keypoints_1(i).pt (1));
point1_y=round(keypoints_2(i).pt (2));
%image2
point2_x=round(keypoints_1(i).pt (1));
point2_y=round(keypoints_2(i).pt (2));
points1_cell{i}={[point1_x,point1_y]};
points2_cell{i}={[point2_x,point2_y]};
end
% 8 points try
[F,mask] = cv.findFundamentalMat(points1_cell,points2_cell);
现在我收到了这个错误 ???使用==>时出错findFundamentalMat MxArray不是Point
==>中的错误drawEpipolarLineTest at 56 F = cv.findFundamentalMat(points1_cell,points2_cell);
*************** ***************** 8 在findFundamentalMat http://www3.cs.stonybrook.edu/~kyamagu/mexopencv/matlab/findFundamentalMat.html的mexopencv文档中 输入是n元素的单元格数组,我无法确定代码
的问题