Ask Your Question
0

identifier "cvSubdivDelaunay2DInsert" is undefined

asked 2016-05-15 09:51:51 -0600

Lusine gravatar image

the code throws exception

#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include "PAW.h"
#include "Triangle.h"
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <string>
#include <algorithm>
#include <set>
///
//insert srcLandmark points in Delaunay subdivision
        for (int i = 0; i<pointsToWarp.size(); i++){
            double x = pointsToWarp.at(i).x;
            double y = pointsToWarp.at(i).y;
            points.push_back(cvPoint(x, y));
            CvPoint2D32f fp = cvPoint2D32f(x, y);
            cvSubdivDelaunay2DInsert(subdiv, fp);
        }
////
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-05-15 10:13:26 -0600

berak gravatar image

the legacy c-interface for delauny triangulation has been removed from opencv 3, please use the cv::SubDiv class instead.

edit flag offensive delete link more

Comments

Thank you for you reply. I ave changed my code, but it still throws an exception, now at insert operation subdiv is undefined

Rect rect = { 0, 0, imagefrom.cols, imagefrom.rows };
    storage = cvCreateMemStorage(0);
    Subdiv2D subdiv(rect);
    //subdiv.cvCreateSubdivDelaunay2D(rect, storage);


    //insert srcLandmark points in Delaunay subdivision
    for (int i = 0; i<pointsToWarp.size(); i++){
        double x = pointsToWarp.at(i).x;
        double y = pointsToWarp.at(i).y;
        points.push_back(cvPoint(x, y));
        CvPoint2D32f fp = cvPoint2D32f(x, y);
        subdiv.insert(fp);
    }
Lusine gravatar imageLusine ( 2016-05-15 14:46:50 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-15 09:51:51 -0600

Seen: 277 times

Last updated: May 15 '16