当前位置:网站首页>halcon:读取摄像头并二值化
halcon:读取摄像头并二值化
2022-06-30 07:12:00 【老李的森林】
打开Halcon,点击摄像头图标,打开设置窗口,接口选择DirectShow
连接选项卡中点击“实时”按钮,可以在主界面中看到摄像头采集的画面
最后点代码生成按钮,采集单幅图像,异步,插入代码,即可看到主界面有代码生成

在图像窗口上点右键,工具,灰度直方图,打开直方图窗口
点RGB选择2号通道,也就是绿色通道,会变成单色显示
随便设置一个最小化的值,比如50,可以看到直方图上多出来一条绿色的竖线,点击下图的这个按钮
再拖动这条绿色的竖线,即可看到二值化分割的效果,绘画中选择Fill或Margin可以选择显示效果是填充还是边界
当然二值化前也可以做一些其他的处理,这是后面的话题了。
点击插入代码,即可将二值化的相关代码插入到程序窗口
按F5运行,效果如下
边栏推荐
- grep命令用法
- 免实名域名是什么意思?
- Finished product upgrade procedure
- Write and run the first go language program
- [solved] failed! Error: Unknown error 1130
- Error reporting record
- 【已解决】MySQL异常:ERROR 1045 (28000): Unknown error 1045,忘记初始密码
- Basic fragmentary thoughts
- 【已解决】ERROR 1290 (HY000): Unknown error 1290
- Calculation and parameter quantity of neural network
猜你喜欢
![[most complete] install MySQL on a Linux server](/img/5d/8d95033fe577c161dfaedd2accc533.png)
[most complete] install MySQL on a Linux server

Egret P2 pit encountered by physical engine (1)

【最全】linux服务器上安装Mysql

Xshell transfer file

Jingwei Hengrun won the 10ppm quality award of paccar group again

Traverse map

Qtcreator debug code after configuring CDB debugger view variable value display card

MAX6675 usage notes

Go项目目录结构介绍

六,购物⻋与订单
随机推荐
网络安全-单臂路由、DHCP中继和ICMP协议
Introduction to go language pointer
Record common problems: spaces in encodeuricomponent decoding and the use of Schema in third-party apps to invoke apps
Realization of dissolve effect in unity and its principle analysis
2022年6月29日--使用C#迈出第一步--使用 C# 中的“if”、“else”和“else if”语句向代码添加决策逻辑
【docsify基本使用】
Develop common dependency Libraries
Go common commands
Connection flood attack principle
How to use string branches for switch case
大学刚毕业不知道做什么工作怎么办?
第一行代码(第三版)学习笔记
Vs2019 and SQL
【Hot100】11. Container with the most water
Essence of signal slot macros signal and slot
Running lantern effect JS text rotation effect realization
Traverse map
Binary tree traversal
All errors reported by NPM
The first up Master of station B paid to watch the video still came! Price "Persuading" netizens