首页
壁纸
直播
留言板
更多
视频
统计
友情链接
实用工具
Search
1
给孙小姐的一封情书
159 阅读
2
LabVIEW | 各版本及开发工具模块下载
107 阅读
3
armUbuntu | uboot常用指令
84 阅读
4
armUbuntu系统构建
73 阅读
5
编译 openwrt 及初始配置-及部分排错
73 阅读
取次花丛懒回顾
默认分类
C#
MySQL
LabVIEW
Java
Android
PHP
Python
handsome
相册
百度地图
嵌入式
嵌入式Ubuntu
linux
Unity
Golang
Rust
OpenHD
教学计划
Search
标签搜索
C#
handsome
Git
动态壁纸
开源
Unity3d
Unity
csharp
魔傲手记
累计撰写
154
篇文章
累计收到
18
条评论
首页
栏目
取次花丛懒回顾
默认分类
C#
MySQL
LabVIEW
Java
Android
PHP
Python
handsome
相册
百度地图
嵌入式
嵌入式Ubuntu
linux
Unity
Golang
Rust
OpenHD
教学计划
页面
壁纸
直播
留言板
视频
统计
友情链接
实用工具
搜索到
128
篇与
的结果
2020-04-08
测试图床
https://ifshy.gitee.io/pic/图床地址{target="_blank"}图床地址
2020年04月08日
11 阅读
0 评论
0 点赞
2018-09-19
adb install -r -l -t -s -d -g 的解释
adb install -r 替换已存在的应用程序,也就是说强制安装adb install -l 锁定该应用程序adb install -t 允许测试包adb install -s 把应用程序安装到sd卡上adb install -d 允许进行将见状,也就是安装的比手机上带的版本低adb install -g 为应用程序授予所有运行时的权限
2018年09月19日
28 阅读
0 评论
0 点赞
2018-05-20
C#,Aforge调用摄像头,实时处理图像,灰度化/二值化
https://img-blog.csdn.net/20180520180903818?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dhbmd5dTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70//声明全局函数private FilterInfoCollection videoDevices; private VideoCaptureDevice videoSource; private static int jj; //Aforge调用摄像头private void Form1_Load(object sender, EventArgs e) { videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); if (videoDevices.Count == 0) { throw new ApplicationException(); } foreach(FilterInfo device in videoDevices) { comboBox1.Items.Add(device.Name); } comboBox1.SelectedIndex = 0; } //链接摄像头private void button1_Click(object sender, EventArgs e) { CameraConn(); } private void CameraConn() { VideoCaptureDevice videoSource = new VideoCaptureDevice(videoDevices[comboBox1.SelectedIndex].MonikerString); videoSourcePlayer1.VideoSource = videoSource; videoSourcePlayer1.Start(); } //捕获摄像头当前画面,生成灰度化图片private void button2_Click_1(object sender, EventArgs e) { pictureBox1.Image= videoSourcePlayer1.GetCurrentVideoFrame(); } //捕获摄像头当前画面,生成成二值化图片private void button2_Click(object sender, EventArgs e) { Bitmap b = videoSourcePlayer1.GetCurrentVideoFrame(); pictureBox1.Image = ConvertTo1Bpp1(b); } --------------------------------------------------------灰度化,二值化函数操作方法-------------------------------------------// 图像灰度化操作函数public static Bitmap ToGray(Bitmap bmp){ for (int i = 0; i < bmp.Width; i++) { for (int j = 0; j < bmp.Height; j++) { //获取该点的像素的RGB的颜色 Color color = bmp.GetPixel(i, j); //利用公式计算灰度值 int gray = (int)(color.R * 0.3 + color.G * 0.59 + color.B * 0.11); Color newColor = Color.FromArgb(gray, gray, gray); bmp.SetPixel(i, j, newColor); } } return bmp; } // 图像二值化1:取图片的平均灰度作为阈值,低于该值的全都为0,高于该值的全都为255public static Bitmap ConvertTo1Bpp1(Bitmap bmp){ int average = 0; average = 122; jj = average; //将阈值传递出来 for (int i = 0; i < bmp.Width; i++) { for (int j = 0; j < bmp.Height; j++) { //获取该点的像素的RGB的颜色 Color color = bmp.GetPixel(i, j); int value = 255 - color.B; Color newColor = value > average ? Color.FromArgb(0, 0, 0) : Color.FromArgb(255, 255, 255); bmp.SetPixel(i, j, newColor); } } return bmp; } //用到的指令集using AForge.Video.DirectShow; using System; using System.Drawing; using System.IO; using System.Windows.Forms;
2018年05月20日
26 阅读
1 评论
0 点赞
1
...
25
26