大恒相机录屏终于解决了(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 devi