-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Hello, Sorry to disturb you!
I'm a beginner of C#, and I have a project, by using Kinect to capture the feature points of faces to classify different emotions (I'm using VS 2013). Now, I've got the data of feature points, and I want to use LibSVMsharp to do the classification. I've downloaded your LibSVMsharp, and done the installation "PM> Install-Package LibSVMsharp" successfully.
Then I met two problems.
First, when I tried to add libsvm.dll to the reference, it failed, and alerted that "A reference to .......\Debug\libsvm.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component." So I changed another method, by using DllImport, like below.
public class Libsvm
{
/// <param name="prob">svm_problem</param>
/// <param name="param">svm_parameter</param>
/// <returns>svm_model</returns>
[DllImport("libsvm.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr svm_train(IntPtr prob, IntPtr param);
/// <param name="prob">svm_problem</param>
/// <param name="param">svm_parameter</param>
/// <param name="nr_fold">int</param>
/// <param name="target">double[]</param>
[DllImport("libsvm.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void svm_cross_validation(IntPtr prob, IntPtr param, int nr_fold, IntPtr target);
.........
}
And then when I copy the "####Simple Classification" code to my project, there are many errors, like this:
Error 6 The type or namespace name 'SVMProblem' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Microsoft SDKs\Kinect\Developer Toolkit v1.8.0\Samples\C#\FaceTrackingBasics-WPF\MainWindow.xaml.cs 339 13 FaceTrackingBasics-WPF
Error 14 The type or namespace name 'SVMModel' could not be found (are you missing a using directive or an assembly reference?) C:\Program Files\Microsoft SDKs\Kinect\Developer Toolkit v1.8.0\Samples\C#\FaceTrackingBasics-WPF\MainWindow.xaml.cs 348 13 FaceTrackingBasics-WPF
........
I've searched a lot, but still couldn't solve my problems, can you help me?
Many thankss!
Shirley Ma