Ask Your Question

Ahmed Arafa's profile - activity

2016-06-02 12:41:08 -0600 received badge  Editor (source)
2016-06-02 01:41:03 -0600 answered a question OpenCV4Android conversion from MatOfKeyPoint to MatOfPoint2f
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 ListPointValues:

             Point ppV = new Point(dxx,dyy);

            ListPointValues.add(i, ppV);

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

         }

        3.  mMOP2fptsPrev.fromList(ListPointValues);
2016-06-02 00:46:53 -0600 received badge  Supporter (source)