我正在使用affdex SDk来检测情绪,而在检测情绪时,我需要向用户显示摄像头流,以便能够看到自己,我使用的是Aforge库和Affdex SDK。当我在主线程中编写两者时,摄像头流工作得很好,但情绪检测停止了,所以我尝试了线程,但仍然启用了摄像头,但检测不起作用。你知道怎么解决这个问题吗?
线程部分:
Thread camThread = new Thread(camStart);
camThread.Start();
public void camStart()
{
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);
videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
CloseVideoSource();
videoSource.Start();
}发布于 2018-05-18 07:05:03
affdexMe应用程序可能会提供一些有关如何执行此操作的线索,因为它提供了您所描述的类似功能:https://github.com/Affectiva/affdexme-win
https://stackoverflow.com/questions/50310856
复制相似问题