Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

solved the problem, in real-time, i declared all the variables and vector and Mat outside the loop. here is the correction.

   `while (key != 27)
  {

    Mat frame;
    cap >> frame;

    if (framecount < 2)
    {
        framecount++;
        continue;
    }


    Mat des_image, img_matches;
    vector<KeyPoint> kp_image;
    //vector<vector<DMatch>> matches;
    vector<DMatch >matches;
    vector<DMatch > good_matches;
    vector<Point2f> obj;
    vector<Point2f> scene;
    vector<Point2f> scene_corners(4);
    Mat H;
    Mat image;`

solved the problem, in real-time, i declared all the variables and vector and Mat outside the loop. here is the correction.

 `while while (key != 27)
  {

    Mat frame;
    cap >> frame;

    if (framecount < 2)
    {
        framecount++;
        continue;
    }


    Mat des_image, img_matches;
    vector<KeyPoint> kp_image;
    //vector<vector<DMatch>> matches;
    vector<DMatch >matches;
    vector<DMatch > good_matches;
    vector<Point2f> obj;
    vector<Point2f> scene;
    vector<Point2f> scene_corners(4);
    Mat H;
    Mat image;`
image;

solved the problem, in real-time, i declared all the variables and vector and Mat outside the loop. here is the correction.

 while `while (key != 27)
  {

    Mat frame;
    cap >> frame;

    if (framecount < 2)
    {
        framecount++;
        continue;
    }


    Mat des_image, img_matches;
    vector<KeyPoint> kp_image;
    //vector<vector<DMatch>> matches;
    vector<DMatch >matches;
    vector<DMatch > good_matches;
    vector<Point2f> obj;
    vector<Point2f> scene;
    vector<Point2f> scene_corners(4);
    Mat H;
    Mat image;
image;`

solved the problem, in real-time, i declared all the variables and vector and Mat outside the loop. here is the correction.

   `while (key != 27)
  {

    Mat frame;
    cap >> frame;

    if (framecount < 2)
    {
        framecount++;
        continue;
    }


    Mat des_image, img_matches;
    vector<KeyPoint> kp_image;
    //vector<vector<DMatch>> matches;
    vector<DMatch >matches;
    vector<DMatch > good_matches;
    vector<Point2f> obj;
    vector<Point2f> scene;
    vector<Point2f> scene_corners(4);
    Mat H;
    Mat image;`