Opencv使用drawcontours显示轮廓,但获得空白窗口

Opencv使用drawcontours显示轮廓,但获得空白窗口,opencv,Opencv,我想显示一组轮廓中的一些轮廓,但我只得到一个空白窗口。我的代码: …………………………………… vector<vector<Point>> curvePointSet1;//contours from image1; vector<vector<Point>> curvePointSet2;contours from image2; vector<Point> curveMathcePair;//matched contour(curv

我想显示一组轮廓中的一些轮廓,但我只得到一个空白窗口。我的代码:

……………………………………
vector<vector<Point>> curvePointSet1;//contours from image1;
vector<vector<Point>> curvePointSet2;contours from image2;
vector<Point> curveMathcePair;//matched contour(curve) pairs,(x,y) stand for corresponding curves from image1 and image2 

Mat img1 = Mat( Size( 640, 480 ), CV_8U ,Scalar(0));
Mat img2 = Mat( Size( 640, 480 ), CV_8U ,Scalar(0));

for (int i = 0; i < curveMathcePair.size();i++)
{
    vector<vector<Point>> curveTemp1, curveTemp2;
    curveTemp1.push_back( curvePointSet1[curveMathcePair[i].x] );//curveMathcePair[i].x stand for curve form image1,and its corresponding curve form image2 denote as curveMathcePair[i].y;
    curveTemp2.push_back( curvePointSet2[curveMathcePair[i].y] );
    drawContours( img1, curveTemp1,0, Scalar(255),1 );
    drawContours( img2, curveTemp2,0, Scalar(255),1 );
}
imshow( "img1", img1 );
imshow( "img2", img2 );
……………………………………
向量曲线点集1//来自图像1的轮廓;
向量曲线点集2;来自图像2的轮廓;
矢量曲线//匹配的轮廓(曲线)对(x,y)代表来自图像1和图像2的对应曲线
Mat img1=Mat(尺寸(640480),CV_8U,标量(0));
Mat img2=Mat(尺寸(640480),CV_8U,标量(0));
对于(int i=0;i我认为我得到了原因。在上面的代码中,没有错误。我得到空白窗口的原因是我使用VisualStudio 2013编译代码,但是我的OpenCV适合VisualStudio 2010。抱歉,我犯了错误。转到ProjtProject -属性-一般设置的PultFrm工具集:“VisualStudio 2010”。(v100)”。

我的目标是在windows中显示相应的曲线(匹配的曲线对)。我看不到曲线点集1和曲线点集2在何处填充了轮廓。您是否感觉到这些向量在其他位置?