25 lines
660 B
C#
25 lines
660 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using OpenCvSharp;
|
|
|
|
namespace Squirrowse.Client.Service
|
|
{
|
|
public class CameraService : ICameraService
|
|
{
|
|
public VideoCapture GetCamera(int height = 480, int widght = 640, double fps = 15f, bool disposable = false)
|
|
{
|
|
var cam = new VideoCapture(CaptureDevice.Any);
|
|
cam.Fps = fps;
|
|
cam.FrameHeight = height;
|
|
cam.FrameWidth = widght;
|
|
cam.IsEnabledDispose = disposable;
|
|
|
|
return cam;
|
|
}
|
|
|
|
public Task<Mat> GetFrame(VideoCapture video)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |