我目前正在做一个项目,我必须使用 Affectiva SDK 来分析我录制的一些视频。我已经下载了他们给我的文件并开始编写 SDK 工作的代码,但是在我的代码中调用回调函数时,Visual Studio 似乎不接受放入的参数。所以我想回调函数的接口必须完成。不过,我不太清楚如何做到这一点,因为我认为这一切都是在他们的汇编代码中完成的。到目前为止,我的代码如下所示:
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/sdk_ahmedmudi1992@gmail.com.license";
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();
}
}
}
据我所知,如果我没记错的话,我必须为接口编写代码......或者我是吗?请帮忙。