Ask Your Question

Revision history [back]

I had the exact same question. Thanks Andrey for your reply. Following up on your approach, the following worked flawlessly:

        1.  Call the feature detection algorithm (in this case I am extracting ORB features)

        mFeatureDetector.detect(matOpFlowPrev,
                 mMOKORbPrevKeypoints);

          2. Define: referenceKeypointsList = new ArrayList <KeyPoint>();

//    and loop about referenceKeypointsList  as follows:

         referenceKeypointsList = mMOKORbPrevKeypoints.toList();

         ListPointValues.clear();


    for(int i=0;i<referenceKeypointsList.size();i++){

             dxx= referenceKeypointsList.get(i).pt.x;
            dyy= referenceKeypointsList.get(i).pt.y;

    //   Define new point and add corresponding values to vector pss:

             Point ppV = new Point(dxx,dyy);

            ListPointValues.add(i, ppV);

% note ListPointValues is defined as: private List<point> ListPointValues

         }

        3.  mMOP2fptsPrev.fromList(ListPointValues);
I had the exact same question. Thanks Andrey for your reply. Following up on your approach, the following worked flawlessly:

        1.  Call the feature detection algorithm (in this case I am extracting ORB features)

        mFeatureDetector.detect(matOpFlowPrev,
                 mMOKORbPrevKeypoints);

          2. Define: referenceKeypointsList = new ArrayList <KeyPoint>();

//    and loop about referenceKeypointsList  as follows:

         referenceKeypointsList = mMOKORbPrevKeypoints.toList();

         ListPointValues.clear();


    for(int i=0;i<referenceKeypointsList.size();i++){

             dxx= referenceKeypointsList.get(i).pt.x;
            dyy= referenceKeypointsList.get(i).pt.y;

    //   Define new point and add corresponding values to vector pss:
ListPointValues:

             Point ppV = new Point(dxx,dyy);

            ListPointValues.add(i, ppV);

% // note ListPointValues is defined as: private List<point> ListPointValues

         }

        3.  mMOP2fptsPrev.fromList(ListPointValues);