是否可以在特定仪表板上设置权限?就像只有“user1”和“user2”会查看/看到“dashboard1”,而其他人将看不到“dashboard1”。
这是我保存 web_cam 流的代码。它正在工作,但输出视频文件的问题。
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
# Define the codec and create VideoWriter object
#fourcc = cv2.cv.CV_FOURCC(*'DIVX')
#out = cv2.VideoWriter('output.avi',fourcc, 20.0, (640,480))
out = cv2.VideoWriter('output.avi', -1, 20.0, (640,480))
while(cap.isOpened()):
ret, frame = cap.read()
if ret==True:
frame = cv2.flip(frame,0)
# write the flipped frame
out.write(frame)
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
# Release everything if job is finished
cap.release()
out.release()
cv2.destroyAllWindows()
Run Code Online (Sandbox Code Playgroud) 我是Python的新手.我无法理解错误.我按照教程编写了代码.但它没有用
代码可在此链接中找到