我目前正在做一个项目,我必须使用Affectiva SDK来分析我录制的一些视频。我已经下载了他们给我的文件,并开始编写SDK的代码来工作,但是当我在代码中调用回调函数时,Visual Studio似乎不接受放入的参数。所以我想回调函数的接口必须完成。我不清楚如何做到这一点,因为我认为这些都是在汇编代码中完成的。到目前为止我的代码看起来是这样的:Affdex视频检测器
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Affdex;
namespace ConsoleApplication2
{
class Program
{
public interface FaceListener { }
public interface ImageListener { }
public interface ProcessStatusListener { }
static void Main(string[] args)
{
VideoDetector detector = new VideoDetector(15);
String licensePath = "C:/Users/hamud/Desktop/[email protected]";
detector.setLicensePath(licensePath);
String classifierPath = "C:/Programmer/Affectiva/Affdex SDK/data";
detector.setClassifierPath(classifierPath);
detector.setFaceListener(this);
detector.setImageListener(this);
detector.setProcessStatusListener(this);
detector.setDetectSmile(true);
detector.setDetectSurprise(false);
detector.setDetectBrowRaise(false);
detector.setDetectAnger(false);
detector.setDetectDisgust(false);
detector.setDetectAllExpressions(false);
detector.start();
detector.stop();
}
}
}
据我知道,我必须编写代码的接口,如果我没有记错......还是我?请帮忙。
我已经试过了这个教程,但是我似乎无法得到它的工作。顺便说一句,你指的是相机探测器的链接? –
@MartinMansour:我已经编辑了上面的回复请看看。 –
@MartinMansour是否解决了您的问题? –