简体   繁体   English

使用AForge.Net库和C#进行并行处理。

[英]Parallel processing using the AForge.Net library and C#.

My program works as follows: 我的程序工作如下:

  1. Get new frame from camera. 从相机获取新帧。
  2. Filter skin color in the frame (ie extract skin in the image). 过滤框架中的皮肤颜色(即,提取图像中的皮肤)。
  3. Apply motion detection on the result, based on the previous step. 根据上一步,对结果进行运动检测。

That is, I am trying to detect motion of objects that have skin color. 也就是说,我正在尝试检测具有肤色的对象的运动。 But I want to speed up my program, so I thought about using parallel programming, where I use two threads, one for skin filtering, and one for motion detection, and then do a logical AND of the results. 但是我想加快程序的速度,所以我考虑使用并行编程,在这里我使用两个线程,一个用于皮肤过滤,一个用于运动检测,然后对结果进行逻辑AND

I am using C# and the Aforge.Net library. 我正在使用C#和Aforge.Net库。 Can I do what I described using C#? 我可以使用C#进行描述吗? Could you please give me some hints on how to accomplish what I have described? 您能给我一些有关如何完成我所描述的内容的提示吗? All I have been able to find is Parallel.For . 我只能找到Parallel.For

There are several ways to do threaded and parallel processing in .NET: 在.NET中有几种方法可以执行线程和并行处理:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM