from VideoCapture import Device
cam = Device()
cam.setResolution(320, 240)
cam.saveSnapshot('demo.jpg')
我在Windows下使用VideoCapture Python2.7。我不知道什麼是錯誤的。我該如何解決這個問題。VideoCapture錯誤:vidcap.Error:無法設置捕獲分辨率
Traceback (most recent call last):
File "D:/ideaProject/python_workspace/webcap/webcap/test/vc.py", line 8, in <module>
cam.setResolution(320, 240)
File "D:\SoftWare\Python27\lib\VideoCapture.py", line 90, in setResolution
self.dev.setresolution(width, height)
vidcap.Error: Cannot set capture resolution.
是的,我想捕獲一張原始圖片,調整大小並保存。 – wyx