代码如下:
#include
CvMat* g_pMatContour = NULL;
static void process(...)
{
if (g_pMatContour == NULL)
{
float points[] ={470,240, 1670,168, 1846,688, 714,928};
int nContourNum = 4;
g_pMatContour = cvCreateMat(1, nContourNum, CV_32FC2);
for (int i=0; ileft + pClip->width /2;
ptTest.y = pClip->top + pClip->height/2;
double jl = cvPointPolygonTest(g_pMatContour, ptTest, 1);
//jl > 0表示在内部。jl 0)
{
//WARNING MESSAGE
}