沒有的話就扣分。
而最主要的程式碼是
for (int y=0; y
uchar* ptr1=(uchar*) (maskImg->imageData +y*maskImg->widthStep);
uchar* ptr2=(uchar*) (difference1->imageData +y*difference1->widthStep);
for (int x=0; x
if (ptr1[3*x] != 255 && ptr1[3*x+1] != 255 && ptr1[3*x+2] != 255 )
score3++;
if (ptr2[x] == 255) {
if (ptr1[3*x] == 255 && ptr1[3*x+1] == 255 && ptr1[3*x+2] == 255 )
score1++;
else
score2++;
}
}
}
就可以簡單的算出得失分,這是有趣的作業,開始有了視訊區域偵測的基礎概念。
沒有留言:
張貼留言