Squirrowse/Squirrowse.Client/Service/Camera.cs

29 lines
691 B
C#
Raw Normal View History

2019-11-04 14:28:45 +01:00
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;
2019-11-05 10:30:31 +01:00
public Camera(int height = 480, int width = 640, double fps = 30f)
2019-11-04 14:28:45 +01:00
{
Height = height;
Width = width;
Fps = fps;
}
public override VideoCapture GetCamera()
{
var cam = new VideoCapture(CaptureDevice.Any)
{
Fps = Fps, FrameHeight = Height, FrameWidth = Width
};
return cam;
}
}
}