Squirrowse/Squirrowse.Client/Service/Camera.cs
2019-11-05 10:30:31 +01:00

29 lines
691 B
C#

using OpenCvSharp;
namespace Squirrowse.Client.Service
{
public class Camera : CameraFactory
{
private readonly bool Disposable;
private readonly double Fps;
private readonly int Height;
private readonly int Width;
public Camera(int height = 480, int width = 640, double fps = 30f)
{
Height = height;
Width = width;
Fps = fps;
}
public override VideoCapture GetCamera()
{
var cam = new VideoCapture(CaptureDevice.Any)
{
Fps = Fps, FrameHeight = Height, FrameWidth = Width
};
return cam;
}
}
}