C++ MxArray不是mexopencv中的一个点

C++ MxArray不是mexopencv中的一个点,c++,matlab,computer-vision,C++,Matlab,Computer Vision,有人能帮我解决这个错误吗?我正在用matlab中的mexopencv库寻找两幅图像的基本矩阵,这是我的代码 global fmImage1; global fmImage2; %-------------Read First Image--------------------------------- [filename pathname]=uigetfile({'*.jpg'},'File Selector',... 'C:\Users\Pub

有人能帮我解决这个错误吗?我正在用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不是一个点

在56处的==>LineTest中出错 F=cv.findFundamentalMat(点1_单元格,点2_单元格)

****************************************************************八, 在mexopencv findFundamentalMat文档中

输入是n元素的单元格数组,我不知道我的代码有什么问题

您可以尝试使用计算机视觉系统工具箱中的
estimateFundamentalMatrix
函数。我在matlab中没有计算机视觉工具箱,所以我使用的是这个软件包mexopencv