Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i solve the problem it was simple :p but same thing that give me things that not exist in fisrt image

      List<DMatch> goodMatchesList = new ArrayList<DMatch>();

    DMatch dm12[]=matches12.toArray();
    DMatch dm21[]=matches21.toArray();
    for(int i=0;i<dm12.length;i++)
     DMatch forward = dm12[i];  
        DMatch backward = dm21[forward.trainIdx];
        if( backward.trainIdx == forward.queryIdx ) 
            goodMatchesList.add(forward) ;


    matcher.match(descriptors,mIntermediateMat, matches);

    mIntermediateMat2.create(resultSize, CvType.CV_8UC1);

    Features2d.drawMatches( mGraySubmat, mKeyPoints, img1, keypoints,matches, mIntermediateMat2,GREEN, RED,  MATCH_MASK, Features2d.NOT_DRAW_SINGLE_POINTS);