Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
zhusihan-python
HuarayCameraPy
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
HuarayCameraPy
/
Readme_Ch.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
48 lines (37 loc) · 2.24 KB
main
Breadcrumbs
HuarayCameraPy
/
Readme_Ch.txt
Copy path
Top
File metadata and controls
Code
Blame
48 lines (37 loc) · 2.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
1. python例程依赖Ver2.1.0_Build20180129版本SDK。
运行例程前,请先安装相应版本的SDK。
2. SDK的python接口,是将SDK的C接口(头文件详见include目录)转化为对应的Python可以调用的ctypes类型接口。
转换对应关系如下:
· SDK.h -> MVSDK.py
· ImageConvert.h -> ImageConvert.py ※图像格式转码模块
· RecordVideo.h -> RecordVideo.py ※视频录制模块
3. 该例程适配python2和python3版本
运行例程前,需安装好python,并在系统环境变量中设置好python相关信息。
然后,通过执行“python ./Demo.py”运行例程。
4. 例程默认为64位。
如需使用32位,需要修改加载的SDK库的处理。具体如下:
· MVSDK.py : Line20注释掉,Line18去注释
· ImageConvert.py : Line15注释掉,Line13去注释
· RecordVideo.py : Line15注释掉,Line13去注释
5. python例程中演示了以下功能:
· 发现相机
· 打开/关闭相机
· 开始/停止拉流
· 设置软/硬触发
· 单帧采集(采用软触发方式)
· 保存bmp图片
· 回调取图和主动取图
· 设置ROI以及设置曝光
· 视频录制--RecordVideo.py
6. 关于SDK的属性读写设置,SDK提供了两种方法
6.1.SDK提供的属性节点访问
通过相应的相机对象构造出相应的control节点,通过control节点构造出相应的属性节点,进行读写操作;
例程中 设置软/硬触发(setSoftTriggerConf/setLineTriggerConf) 即是通过这种方式进行属性读写操作的。
6.2.通用属性设置(节点)
根据属性的数据类型(double/int/bool等,可在相机客户端软件的属性窗口查看),通过属性名称,构造出属性节点,从而对属性进行读写操作。
例程中设置曝光和设置ROI(setExposureTime/setROI) 是通过这种方法进行属性读写操作的。
7. 注意
7.1.python只能运行对应位数的例程。即,32位python运行32位例程,64位python运行64位例程。
7.2.C接口在使用时应注意节点类型和相应的资源不再使用时应及时释放,调用相应的release接口。
该例程中同样给出了说明;
- END -
You can’t perform that action at this time.