I am using the affdex SDK to detect emotions and while the detection of emotions I need to display the camera stream to the users to be able to see themselves, I am using the Aforge library and the Affdex SDk. when I wrote both in the main thread the camera stream worked fine but the emotion detection stopped, so I tried threading but still the camera is enabled but the detection doesn't work. any idea how to solve this issue?
Threading part:
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();
}