Ask Your Question

tonyNoel's profile - activity

2015-03-09 03:55:08 -0600 commented answer Problem whit fillConvexPoly bad fill

OK , problem is relsolved . I change fillConvexPoly by FillPoly , its work.

2015-03-09 03:54:08 -0600 received badge  Scholar (source)
2015-03-06 09:38:40 -0600 commented answer Problem whit fillConvexPoly bad fill

my fonction FillPoly dont drow for the moment --' I'll fix that..

2015-03-06 07:49:04 -0600 commented answer Problem whit fillConvexPoly bad fill

ok, now to test, I add FillPoly function after FillConvexPoly

for(int i=0;i<polyZoneVerse.size();i++)
{
Point rook_points[1][polyZoneVerse[i].getNbSommet()];
//..code..
for(int j=0; j<polyZoneVerse[i].getNbSommet(); j++)
{//..code..}
fillConvexPoly(drawPatern2,tabPointZone,polyZoneVerse[i].getNbSommet(),Scalar(255,0,0));
int npt[] = { polyZoneVerse[i].getNbSommet() };
const Point* ppt[1] = { rook_points[0] };
fillPoly(drawPatern2,ppt,npt,1,Scalar(255,0,0));
}

I just add the last line (+parameters required) and I always have poor filling. So i don't think is about convex or non-convex ( I can't show you a result because I'm a new member, so I can't put new comment with photo ^^ must apparently wait 1day)

2015-03-06 04:30:49 -0600 commented answer Problem whit fillConvexPoly bad fill

i agree with you but the objetc "sometimes GOOD" isn't convex too, But it's good, you think is lucky?

2015-03-06 03:06:49 -0600 asked a question 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]