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

开发一个电商app需要多少钱长沙seo管理

开发一个电商app需要多少钱,长沙seo管理,wordpress访问速度突然好慢,移动应用开发是学什么WPF开发者QQ群#xff1a;340500857由于微信群人数太多入群请添加小编微信号yanjinhuawechat 或 W_Feng_aiQ 邀请入群需备注WPF开发者 PS#xff1a;有更好的方式欢迎推荐。接着很久前的上一篇此项目使用了OpenCVSharp加载本地摄像头#xff0c;多个摄像头支持切换展示… WPF开发者QQ群340500857       由于微信群人数太多入群请添加小编微信号 yanjinhuawechat 或 W_Feng_aiQ 邀请入群 需备注WPF开发者   PS有更好的方式欢迎推荐。  接着很久前的上一篇  此项目使用了OpenCVSharp加载本地摄像头多个摄像头支持切换展示也可以展示rtsp地址。使用NuGet如下01—代码如下一、创建MainWindow.xaml代码如下。ws:Window x:ClassOpenCVSharpExample.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:wshttps://github.com/WPFDevelopersOrg.WPFDevelopers.Minimalxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:OpenCVSharpExampleIconOpenCV_Logo.pngmc:Ignorabled WindowStartupLocationCenterScreenTitleOpenCVSharpExample https://github.com/WPFDevelopersOrg Height450 Width800GridGrid.RowDefinitionsRowDefinition HeightAuto/RowDefinition /RowDefinition HeightAuto//Grid.RowDefinitionsComboBox NameComboBoxCamera ItemsSource{Binding CameraArray,RelativeSource{RelativeSource AncestorTypelocal:MainWindow}} Width200 SelectedIndex{Binding CameraIndex,RelativeSource{RelativeSource AncestorTypelocal:MainWindow}}SelectionChangedComboBoxCamera_SelectionChanged/Image Grid.Row1 NameimgViewport Margin0,4/StackPanel OrientationHorizontalHorizontalAlignmentCenterGrid.Row2!--Button NamebtRecord ClickbtRecord_Click ContentRecord Style{StaticResource PrimaryButton} Width100 Height50 Margin16/--Button NamebtStop ClickbtStop_Click ContentStop  Width100 Height50 Margin16//StackPanel/Grid /ws:Window二、MainWindow.xaml.cs代码如下。using OpenCvSharp; using OpenCvSharp.Extensions; using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Management; using System.Threading; using System.Windows; using System.Windows.Controls; using System.Windows.Media.Imaging; using System.Windows.Threading;namespace OpenCVSharpExample {/// summary/// MainWindow.xaml 的交互逻辑/// /summarypublic partial class MainWindow{private VideoCapture capCamera;private Mat matImage  new Mat();private Thread cameraThread;public Liststring CameraArray{get { return (Liststring)GetValue(CameraArrayProperty); }set { SetValue(CameraArrayProperty, value); }}public static readonly DependencyProperty CameraArrayProperty DependencyProperty.Register(CameraArray, typeof(Liststring), typeof(MainWindow), new PropertyMetadata(null));public int CameraIndex{get { return (int)GetValue(CameraIndexProperty); }set { SetValue(CameraIndexProperty, value); }}public static readonly DependencyProperty CameraIndexProperty DependencyProperty.Register(CameraIndex, typeof(int), typeof(MainWindow), new PropertyMetadata(0));public MainWindow(){InitializeComponent();Width  SystemParameters.WorkArea.Width / 1.5;Height  SystemParameters.WorkArea.Height / 1.5;this.Loaded  MainWindow_Loaded;}private void MainWindow_Loaded(object sender, RoutedEventArgs e){InitializeCamera();}private void ComboBoxCamera_SelectionChanged(object sender, SelectionChangedEventArgs e){if (CameraArray.Count - 1  CameraIndex)return;if (capCamera ! null  cameraThread ! null){cameraThread.Abort();StopDispose();}capCamera  new VideoCapture(CameraIndex);capCamera.Fps  30;CreateCamera();}private void InitializeCamera(){CameraArray  GetAllConnectedCameras();}Liststring GetAllConnectedCameras(){var cameraNames  new Liststring();using (var searcher  new ManagementObjectSearcher(SELECT * FROM Win32_PnPEntity WHERE (PNPClass  Image OR PNPClass  Camera))){foreach (var device in searcher.Get()){cameraNames.Add(device[Caption].ToString());}}return cameraNames;}void CreateCamera(){cameraThread  new Thread(PlayCamera);cameraThread.Start();}private void PlayCamera(){while (capCamera ! null  !capCamera.IsDisposed){capCamera.Read(matImage);if (matImage.Empty()) break;Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() {var converted  Convert(BitmapConverter.ToBitmap(matImage));imgViewport.Source  converted;}));}}private void btStop_Click(object sender, RoutedEventArgs e){StopDispose();btStop.IsEnabled  false;}void StopDispose(){if (capCamera ! null  capCamera.IsOpened()){capCamera.Dispose();capCamera  null;}}void CreateRecord(){cameraThread  new Thread(PlayCamera);cameraThread.Start();}BitmapImage Convert(Bitmap src){System.Drawing.Image img  src;var now  DateTime.Now;var g  Graphics.FromImage(img);var brush  new SolidBrush(System.Drawing.Color.Red);g.DrawString($北京时间{ now.ToString(yyyy年MM月dd日 HH:mm:ss)}, new System.Drawing.Font(Arial, 18), brush, new PointF(5, 5));brush.Dispose();g.Dispose();MemoryStream ms  new MemoryStream();img.Save(ms, ImageFormat.Bmp);ms.Seek(0, SeekOrigin.Begin);BitmapImage image  new BitmapImage();image.BeginInit();image.StreamSource  ms;image.EndInit();image.Freeze();return image;}protected override void OnClosed(EventArgs e){StopDispose();}} }02—效果预览鸣谢素材提供者 - 屈越源码地址如下Githubhttps://github.com/WPFDevelopersOrghttps://github.com/WPFDevelopersOrg/OpenCVSharpExampleGiteehttps://gitee.com/WPFDevelopersOrgWPF开发者QQ群 340500857 Githubhttps://github.com/WPFDevelopersOrg出处https://www.cnblogs.com/yanjinhua版权本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。转载请著名作者 出处 https://github.com/WPFDevelopersOrg扫一扫关注我们更多知识早知道点击阅读原文可跳转至源代码
http://www.yutouwan.com/news/176135/

相关文章:

  • 义乌网站建设公司哪家好论坛类网站备案吗
  • 公司付的网站费怎么做分录世界著名小型建筑设计
  • 自适应网页模板建站学视频剪辑报个班的多少钱
  • 错题网站开发wordpress建设中
  • 做前端常用的网站及软件北京网站代运营公司
  • 帝国cms 商城网站视频教程定制开发生产管理软件推荐
  • 中国移动积分兑换商城官方网站旅游网站建设报价方案
  • 网站架构设计图怎么做急招一天一结临时工
  • 什么情况下网站需要备案成都网站建设设计
  • 温州网站建设价格wordpress 屏蔽特定国家ip
  • 网站建设哪家好 思创网络大公司网站搭建公司
  • 宝山青岛网站建设网站开发项目介绍
  • 莆田建设网站wordpress wiki使用
  • 爱站网关键字挖掘重庆房地产信息官网
  • 网站新建网页物流网络货运平台
  • 移动网站建设学习人工智能自动做网站
  • 唐山房产网站建设青岛网站建设多少钱
  • 怎么做网站底部版权信息深圳网站建设联系方式
  • 网站开发任务响应式网站 翻译代码
  • 咋么做网站百度合伙人答题兼职赚钱
  • 献县做网站的昆明做网站建设硬件设备
  • 好看的网站源码免费seo视频教学
  • 十大网站管理系统网站建设与管理实训主要内容
  • 中英文网站源码免费网站建设软件
  • 设计坞网站怎么样wordpress 文章点赞插件
  • php网站怎么做后台管理山东响应式网站建设
  • 泊头做网站的公司锦州网站建设更好
  • 信息化建设网站上海自助建站系统
  • 网站建设推广招代理加盟顺企网网站建设
  • 卫生局网站建设实施方案WordPress背景图片编辑