1 | initial version |
which should be convex, right? NO Convex : If you choose two points inside shape then All points of line segment defined by end points belong to shape.
your shape :
this segment proove that shape is not convex
Discrete geometry : should convex right ? I'm agree but reality it is not convex
2 | No.2 Revision |
which should be convex, right?
NONO
Convex : If you choose two points inside shape then All points of line segment defined by end points belong to shape.
your shape :
this segment proove that shape is not convex
Discrete geometry : should convex right ? I'm agree but reality it is not convex
3 | No.3 Revision |
which should be convex, right? NO
Convex : If you choose two points inside shape then All points of line segment defined by end points belong to shape.
your shape :
this segment proove that shape is not convex
Discrete geometry : should convex right ? I'm agree but reality it is not convex
this one is convex :
Point p1(10,10),p4(10,100), p3(100,100), p2(100,10) ;
vector<Point> ctr;
ctr.push_back(p1);
ctr.push_back(p4);
ctr.push_back(p3);
ctr.push_back(p2);
ctrImg.push_back(ctr);
if (isContourConvex(ctr))
cout << "Contour is convex\n";
else
cout << "Contour is not convex\n";
4 | No.4 Revision |
which should be convex, right? NO
Convex : If you choose two points inside shape then All points of line segment defined by end points belong to shape.
your shape :
this segment proove that shape is not convex
Discrete geometry : should convex right ? I'm agree but reality it is not convex
this one is convex :
Point p1(10,10),p4(10,100), p3(100,100), p2(100,10) ;
vector<Point> ctr;
ctr.push_back(p1);
ctr.push_back(p4);
ctr.push_back(p3);
ctr.push_back(p2);
ctrImg.push_back(ctr);
if (isContourConvex(ctr))
cout << "Contour is convex\n";
else
cout << "Contour is not convex\n";