当前位置: 首页 > news >正文

网站正在建设中php网站关键词重复

网站正在建设中php,网站关键词重复,企业建设网站目的,个人缴纳养老保险先展示效果 AForge介绍 AForge是一个专门为开发者和研究者基于C#框架设计的, 也是NET平台下的开源计算机视觉和人工智能库 它提供了许多常用的图像处理和视频处理算法、机器学习和神经网络模型#xff0c;并且具有高效、易用、稳定等特点。 AForge主要包括: 计算机视觉与人…先展示效果  AForge介绍 AForge是一个专门为开发者和研究者基于C#框架设计的, 也是NET平台下的开源计算机视觉和人工智能库 它提供了许多常用的图像处理和视频处理算法、机器学习和神经网络模型并且具有高效、易用、稳定等特点。 AForge主要包括: 计算机视觉与人工智能图像处理神经网络遗传算法机器学习模糊系统机器人控制等 AForge.Imaging ——日常的图像处理和过滤器AForge.Vision —— 计算机视觉应用类库AForge.Neuro —— 神经网络计算库AForge.Genetic -进化算法编程库AForge. MachineLearning —— 机械学习类库AForge. Robotics —— 提供一些机器学习的工具类库AForge.Video —— 一系列的视频处理类库AForge.Fuzzy —— 模糊推理系统类库AForge.Controls —— 图像 三维 图表显示控件 AForge的使用方向  1. 基于符号识别的3D显示增强技术 2. 基于模糊系统的自动导航 3. 运动检测 4. 2D增强技术 5. 计算机视觉与人工智能 6. 模拟识别 7. 神经网络 8. 图像处理 9. 遗传算法 10. 机器学习 11. 机器人控制等等 AForge的安装方法 1.右键项目名 2.打开 管理 NuGet程序包 3.点击浏览 在浏览上输入 AForge,并下载 注意:作者一般都是 aforge.net 4.全部下载之后,他会在你的winfrom的左边框会自动显示  一、下面是我做的一个相机拍摄小项目 1.我们先把页面搭好, 上面的字都是lable弄的不是textbox 控件: label  button  comboBox  picture  timer   VideoSourcePlayer 注意:  VideoSourcePlayer 是 我们下载的那个控件里的(AForge.NET) 2. 拉一个label , 右下角属性   label 的 属性 Auto False      BorderStyle Fixed3D   TextAlignMiddleCenter  ForeColorRed   BackGroundBlack 3.最上面时间的显示 注意:这里是timer的控件一个点击事件 timer的Enable  属性  修改成  True #region 显示实时时间private void timer1_Tick(object sender, EventArgs e){DateTime dtDateTime.Now;this.txtYear.Text dt.Year.ToString();this.txtMonth.Text dt.Month.ToString();this.txtDay.Text dt.Day.ToString();this.txtTime.Textdt.ToLongTimeString();string week ;switch(dt.DayOfWeek){case DayOfWeek.Sunday:week 日;break;case DayOfWeek.Monday:week 一;break;case DayOfWeek.Tuesday:week 二;break;case DayOfWeek.Wednesday:week 三;break;case DayOfWeek.Thursday:week 四;break;case DayOfWeek.Friday:week 五;break;case DayOfWeek.Saturday:week 六;break;default:break;}this.txtWeek.Text week;}#endregion 4.我们要把最基本的 给完善了,把该定义的全部完成,窗体加载我们要提前实例化相机 private FilterInfoCollection filterInfoCollection; //摄像头设备集合private VideoCaptureDevice videoCapture;//捕捉设备源private Bitmap imagenull; //设置图片接收的int Isopen 0; private void Form1_Load(object sender, EventArgs e){filterInfoCollection new FilterInfoCollection(FilterCategory.VideoInputDevice);//MessageBox.Show($检测到了{filterInfoCollection.Count.ToString()}个摄像头);//这下面的for循环是为了检测电脑连接几个相机 ,来吧相机数量写在combobox控件下for(int i 0; i filterInfoCollection.Count; i){comboBox1.Items.Add($摄像头{i});}} 5.下拉框(ComboBox)索引选择改变 CloseCamera(); //这个先提前关闭相机, 下面有介绍if (comboBox1.SelectedIndex 0 filterInfoCollection.Count 0){videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);}else if (comboBox1.SelectedIndex 1 filterInfoCollection.Count 1){videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);}else{MessageBox.Show(摄像头选择有误, 错误提示);return;}videoSourcePlayer1.VideoSourcevideoCapture;videoSourcePlayer1.Start(); 二、简化封装:相机关闭,相机连接(实时显示),保存图片 1.连接相机 #region 连接相机private void ConnCamera(){if(filterInfoCollection.Count0){ videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);videoSourcePlayer1.VideoSource videoCapture;videoSourcePlayer1.Start();}}#endregion 2.关闭相机 #region 关闭相机private void CloseCamera(){if(videoSourcePlayer1.VideoSource!null){videoSourcePlayer1.SignalToStop();videoSourcePlayer1.VideoSource.Stop();videoSourcePlayer1.VideoSource null;}}#endregion 3.保存图片 #region 保存图片private void SaveImage(){var date DateTime.Now.ToString(yyyy-MM-dd);date - DateTime.Now.TimeOfDay.ToString(hhmmss);if(!Directory.Exists(D:\\Saved_Pictures)){Directory.CreateDirectory(D:\\Saved_Pictures);}image.Save(string.Format(D:\\Saved_Pictures\\ date .jpg, date), System.Drawing.Imaging.ImageFormat.Png);}#endregion 三、实现相机拍照相机实时显示(打开)图片保存功能窗体关闭 1.打开相机实时显示 private void takeCamera_Click(object sender, EventArgs e){if(((uint)filterInfoCollection.Count)0){MessageBox.Show(检测不到你的摄像头, 错误提示);}else{Isopen;if(Isopen%2!0){takeCamera.Text 关闭摄像头;ConnCamera();}else if(Isopen%20){takeCamera.Text 打开摄像头;CloseCamera();}}} 2.相机拍照 private void takephoto_Click(object sender, EventArgs e){imagevideoSourcePlayer1.GetCurrentVideoFrame();pictureBox1.SizeModePictureBoxSizeMode.Zoom;pictureBox1.Image image;} 3.图片保存 private void SavePicture_Click(object sender, EventArgs e){if(pictureBox1.Image!null){SaveImage();}else{MessageBox.Show(请先进行拍照, 相机拍照);}} 4.窗体关闭 private void Form1_FormClosing(object sender, FormClosingEventArgs e){if(MessageBox.Show(将要关闭窗口是否继续, 询问, MessageBoxButtons.YesNo) DialogResult.Yes){e.Cancelfalse;CloseCamera();Application.Exit();}else{e.Cancel true;}} } 补充 窗体的关闭方法窗体跳转文件夹 1.关闭窗体的多种方法 1. this.Close() ; 只是关闭当前窗口如果不是主窗体的话它后台还会再运行是无法推出主程序的。 2.Application.Exit(); 强制所有消息中止退出所有的窗口但是有托管线程也无法干净退出 3.Applicat.ExitThread(); 强制中止调用线程上的所有消息同样面临其他线程无法正确退出问题 4.System.Environment.Exit(0); 这是彻底的强制退出能把程序结束很干净 2.跳转功能 由于一般程序保存图片后都会有个跳转功能这个我感觉保存后跳转他就不是一个功能了这里给大家写一下怎么去跳转。 System.Diagnostics.Process.Start(D:\\Saved_Pictures); 注意 括号里面是路径  四、完结代码展示和结果 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using AForge.Video.DirectShow;namespace Camera {public partial class Form1 : Form{public Form1(){InitializeComponent();}private FilterInfoCollection filterInfoCollection; //摄像头设备集合private VideoCaptureDevice videoCapture;//捕捉设备源private Bitmap imagenull;int Isopen 0;#region 显示实时时间private void timer1_Tick(object sender, EventArgs e){DateTime dtDateTime.Now;this.txtYear.Text dt.Year.ToString();this.txtMonth.Text dt.Month.ToString();this.txtDay.Text dt.Day.ToString();this.txtTime.Textdt.ToLongTimeString();string week ;switch(dt.DayOfWeek){case DayOfWeek.Sunday:week 日;break;case DayOfWeek.Monday:week 一;break;case DayOfWeek.Tuesday:week 二;break;case DayOfWeek.Wednesday:week 三;break;case DayOfWeek.Thursday:week 四;break;case DayOfWeek.Friday:week 五;break;case DayOfWeek.Saturday:week 六;break;default:break;}this.txtWeek.Text week;}#endregionprivate void Form1_Load(object sender, EventArgs e){filterInfoCollection new FilterInfoCollection(FilterCategory.VideoInputDevice);//MessageBox.Show($检测到了{filterInfoCollection.Count.ToString()}个摄像头);for(int i 0; i filterInfoCollection.Count; i){comboBox1.Items.Add($摄像头{i});}System.Diagnostics.Process.Start(D:\\Saved_Pictures);}private void comboBox1_SelectedIndexChanged(object sender, EventArgs e){CloseCamera();if (comboBox1.SelectedIndex 0 filterInfoCollection.Count 0){videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);}else if (comboBox1.SelectedIndex 1 filterInfoCollection.Count 1){videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);}else{MessageBox.Show(摄像头选择有误, 错误提示);return;}videoSourcePlayer1.VideoSourcevideoCapture;videoSourcePlayer1.Start();}#region 关闭相机private void CloseCamera(){if(videoSourcePlayer1.VideoSource!null){videoSourcePlayer1.SignalToStop();videoSourcePlayer1.VideoSource.Stop();videoSourcePlayer1.VideoSource null;}}#endregion#region 连接相机private void ConnCamera(){if(filterInfoCollection.Count0){ videoCapture new VideoCaptureDevice(filterInfoCollection[0].MonikerString);videoSourcePlayer1.VideoSource videoCapture;videoSourcePlayer1.Start();}}#endregion#region 保存图片private void SaveImage(){var date DateTime.Now.ToString(yyyy-MM-dd);date - DateTime.Now.TimeOfDay.ToString(hhmmss);if(!Directory.Exists(D:\\Saved_Pictures)){Directory.CreateDirectory(D:\\Saved_Pictures);}image.Save(string.Format(D:\\Saved_Pictures\\ date .jpg, date), System.Drawing.Imaging.ImageFormat.Png);}#endregionprivate void takeCamera_Click(object sender, EventArgs e){if(((uint)filterInfoCollection.Count)0){MessageBox.Show(检测不到你的摄像头, 错误提示);}else{Isopen;if(Isopen%2!0){takeCamera.Text 关闭摄像头;ConnCamera();}else if(Isopen%20){takeCamera.Text 打开摄像头;CloseCamera();}}}private void takephoto_Click(object sender, EventArgs e){imagevideoSourcePlayer1.GetCurrentVideoFrame();pictureBox1.SizeModePictureBoxSizeMode.Zoom;pictureBox1.Image image;}private void SavePicture_Click(object sender, EventArgs e){if(pictureBox1.Image!null){SaveImage();}else{MessageBox.Show(请先进行拍照, 相机拍照);}}private void Form1_FormClosing(object sender, FormClosingEventArgs e){if(MessageBox.Show(将要关闭窗口是否继续, 询问, MessageBoxButtons.YesNo) DialogResult.Yes){e.Cancelfalse;CloseCamera();Application.Exit();}else{e.Cancel true;}}} }
http://www.dnsts.com.cn/news/103601.html

相关文章:

  • 百度推广网站谁做西安建站模板厂家
  • 北京哪家公司做网站专业有哪些
  • 小程序建站工具提供搜索引擎优化公司
  • 免费网站入口在哪电商网站开发 知乎
  • 一个二手书网站的建设目标wordpress 格子广告
  • 做海报免费素材网站有哪些c 网站开发 书
  • 网站后台html页面wordpress上传图片教程
  • 泉州建站模板搭建网站开发 语言
  • 大型电子商务网站建设成本留学网站 模板
  • 自由策划网站建设it学校培训机构
  • 物流企业网站wordpress社交分享
  • mip 网站公司注销需要多少钱费用?
  • 安徽省住房和城乡建设厅网站6应用软件免费下载
  • 做纸棋的网站衡阳县住房和城乡建设局网站
  • c2c网站网址专注网站建站
  • 自己做的网站如何用手机去查看wordpress sql语句
  • 网站建设难不难app网站开发成功案例
  • 有哪些炫酷的官方网站wordpress 设置评论
  • 学做网站零基础如何设计网站
  • dede网站运行天数网页游戏软件制作专业
  • 网站免费高清素材软件有哪些郑州网站建设怎样
  • 东莞商务网站建设企业邮箱是怎么样的
  • 国外校友网站建设的现状网站建设属于什么行业分类
  • 建个企业网站需要多久免费好玩的网页游戏
  • 小说网站排名怎么做郴州网站建设公司哪个好
  • 昆明网站优化工具郑州seo优化服务
  • 我的网站现在没有排名_我想问是不是花钱做百度推广就会有排名南宁门户网站建设
  • 网站开发是什么语言网站没内容 可以备案么
  • 网站开发需要的技能专业番禺网站建设
  • 自助建网站企业网站的设计论文