Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem whit fillConvexPoly bad fill

hello guy, I write program in c++, and on this program I use cv::fillConvexPoly . Sometimes fillConvexPoly draw a good polygone sometimes he don't finsh filling my polygone, and I do not understand why... I put below an example with the algorithm I use

Part of code draw a red poly:

//...Blue poly already draw...
for(int i=0;i<tabVerse.size();i++)
{
    //..code..
    Point tabPointZone[tabVerse[i].getNbSommet()];
    for(int j=0; j<tabVerse[i].getNbSommet(); j++)
    {    
            tabPointZone[j]=tabVerse[i].getTabpt()[j];
    }
    fillConvexPoly(drawPatern2,tabPointZone,tabVerse[i].getNbSommet(),Scalar(0,0,255));
}

and result: image description

Thank if you can help me =D

[OpenCV 2.4.9.0]