我正在模拟热像仪效果。我在一个聚会上有一个网络摄像头指向墙前的人。我使用了背景减法技术并使用 Aforge blobcounter 得到了我想用渐变色填充的 blob。我的问题 = GetBlobsEdgePoints 不返回排序的点云,所以我不能将它与 GDI+ 中的 PathGradientBrush 一起使用来简单地绘制渐变。
- 我正在寻找简单、快速的算法来将 blob 跟踪到路径中(可能会出错)。
- 一种跟踪 blobcounter 接收到的 blob 的方法。
- 对其他模拟效果的方法的建议。
我快速浏览了 Emgu.CV.VideoSurveillance 但没有让它工作(示例是 v1.5,我使用 v2+)但我放弃了,因为人们说它在论坛上很慢。
谢谢阅读。
aforge背景去除示例代码
Bitmap bmp =(Bitmap)e.VideoFrame.Clone();
if (backGroundFrame == null)
{
backGroundFrame = (Bitmap)e.VideoFrame.Clone();
difference.OverlayImage = backGroundFrame;
}
difference.ApplyInPlace(bmp);
bmp = grayscale.Apply(bmp);
threshold.ApplyInPlace(bmp);