Ask Your Question

Lusine's profile - activity

2016-05-15 14:46:50 -0500 commented answer identifier "cvSubdivDelaunay2DInsert" is undefined

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);
    }
2016-05-15 09:51:51 -0500 asked a question identifier "cvSubdivDelaunay2DInsert" is undefined

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);
        }
////
2016-04-17 15:07:36 -0500 asked a question I have a loop and in the 240th step bgrPixel = frame.at<Vec3b>(++rowCoord, ++colCoord); throws assert erroror at mat.hpp line 554

Mat frame;

for (int rowCoord = 1; rowCoord < rowheight - 1; rowCoord++) for (int colCoord = 1; colCoord < colwidth - 1; colCoord++) {

                    frame.at<Vec3b>(Point(rowCoord, colCoord)) = black;

            }
            if (counter == 239)
            {
                int o = 0;
            }
            c
            cout << counter << endl;
            counter++;
        }
2016-04-17 15:07:36 -0500 asked a question mat.hpp assert error at line 554

I have a loop and in the 240th step bgrPixel = frame.at<vec3b>(++rowCoord, ++colCoord); throws assert erroror at mat.hpp line 554

for (int rowCoord = 1; rowCoord <
> rowheight - 1; rowCoord++) for (int
> colCoord = 1; colCoord < colwidth - 1;
> colCoord++) { ///////////// //// /////
>                     frame.at<Vec3b>(Point(rowCoord,
> colCoord)) = black;
> 
>             }
>             if (counter == 239)
>             {
>                 int o = 0;
>             }
>             c
>             cout << counter << endl;
>             counter++;
>         }