# VideoCapture **Repository Path**: catzhou/video-capture ## Basic Information - **Project Name**: VideoCapture - **Description**: Wpf使用的摄像头视频捕捉类 - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 7 - **Created**: 2021-02-04 - **Last Updated**: 2024-03-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # VideoCapture #### 介绍 Wpf使用的摄像头视频捕捉类 DirectShowLib-2005.dll功能很强大,但: 1. 我只要显示摄像头视频,偶尔拍张照; 1. 不想拖个dll; 1. 洁癖 所以把能删的都删了,只留下我想要的,编译后才17K。需要的时候可以直接嵌入到项目中。 #### 使用 ``` public interface IVideo { /// /// 摄像头初始化 /// /// 摄像头序号 /// 摄像头角度 /// 视频输出的宽度 /// 视频输出的高度 /// void Init(int index, int frameWidth = 640, int frameHeight = 480, ECameraAngle angle = ECameraAngle.A0); /// /// 打开摄像头 /// void Play(); /// /// 关闭摄像头 /// void Stop(); event Action ImageSourceChanged; /// /// 获取当前帧 /// Bitmap GetCurrentFrame(); } ```