EKF-cs/dopt.EKF/Program.cs
2025-10-24 11:10:50 +02:00

36 lines
1011 B
C#

using dopt.SharpPython;
using Python.Runtime;
namespace dopt.EKF
{
class Program
{
static void Main(string[] args)
{
// basic program root
Console.WriteLine("This is the dopt basic CLI");
}
}
internal sealed class Plugin : SharpPython.BasePlugin
{
internal dynamic pyEkfModule;
public Plugin(string runtimePath, bool verbose) : base(PyOptimLevels.None, threaded:false, runtimePath:runtimePath, verbose:verbose)
{
Initialise();
using (Py.GIL())
{
pyEkfModule = Py.Import("dopt_sensor_anomalies._csharp_interface"); // add right import
}
}
public void SensorAnomaliesPipeline(string pathToImage, float pixelsPerMetricX, float pixelsPerMetricY)
{
using (Py.GIL())
{
pyEkfModule.sensor_anomalies_detection(pathToImage, pixelsPerMetricX, pixelsPerMetricY);
}
}
}
}