Squirrowse/Squirrowse.Client/Service/CameraService.cs

25 lines
660 B
C#
Raw Normal View History

2019-11-01 19:04:24 +01:00
using System;
using System.Threading.Tasks;
using OpenCvSharp;
namespace Squirrowse.Client.Service
{
public class CameraService : ICameraService
{
2019-11-04 09:29:37 +01:00
public VideoCapture GetCamera(int height = 480, int widght = 640, double fps = 15f, bool disposable = false)
2019-11-01 19:04:24 +01:00
{
2019-11-02 21:06:44 +01:00
var cam = new VideoCapture(CaptureDevice.Any);
cam.Fps = fps;
cam.FrameHeight = height;
cam.FrameWidth = widght;
cam.IsEnabledDispose = disposable;
2019-11-04 09:29:37 +01:00
2019-11-02 21:06:44 +01:00
return cam;
2019-11-01 19:04:24 +01:00
}
public Task<Mat> GetFrame(VideoCapture video)
{
throw new NotImplementedException();
}
}
2019-11-04 09:29:37 +01:00
}