大恒相机录屏终于解决了(python+sdk+opencv)
一开始拿到大恒相机,就遇上了第一个坑:直接用opencv函数是打不开的,要用他自己sdk的gxipy。用了之后,给的示例只有采集图片的,录屏如下:
```python
import gxipy as gx
from PIL import Image
import cv2
import time
def main():
# print the demo information
print("")
print("-------------------------------------------------------------")
print("Sample to show how to acquire color image continuously and show acquired image.")
print("-------------------------------------------------------------")
print("")
print("Initializing......")
print("")
# create a device manager
device_manager = gx.DeviceManager()
dev_num, dev_info_list = device_manager.update_device_list()
if dev_num is 0:
print("Number of enumerated devices is 0")
return
# open the first device
cam = device_manager.open_device_by_index(1)
# exit when the camera is a mono camera
if cam.PixelColorFilter.is_implemented() is Fal

本文介绍了如何使用大恒相机的SDK(gxipy)与Python的OpenCV库结合,成功解决相机录屏的问题。通过示例代码,实现了稳定的视频录制功能。
1015

被折叠的 条评论
为什么被折叠?



