motion/Camera.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Motion Detector
//
// Copyright ?Andrew Kirillov, 2005
// andrew.kirillov@gmail.com
//
namespace motion
{
using System;
using System.Drawing;
using System.Threading;
using VideoSource;
/// <summary>
/// Camera class
/// </summary>
public class Camera
{
private IVideoSource videoSource = null;
private IMotionDetector motionDetecotor = null;
private Bitmap lastFrame = null;
// image width and height
private int width = -1, height = -1;
// alarm level
private double alarmLevel = 0.005;
//
public event EventHandler NewFrame;
public event EventHandler Alarm;
// LastFrame property
public Bitmap LastFrame
{
get { return lastFrame; }
}
// Width property
public int Width
{
get { return width; }
}
// Height property
public int Height
{
get { return height; }
}
// FramesReceived property
public int FramesReceived
{
get { return ( videoSource == null ) ? 0 : videoSource.FramesReceived; }
}
// BytesReceived property
public int BytesReceived
{
get { return ( videoSource == null ) ? 0 : videoSource.BytesReceived; }
}
// Running property
public bool Running
{
get { return ( videoSource == null ) ? false : videoSource.Running; }
后面还有 126 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。