首页 > 解决方案 > Python open cv2 ip web cam 无法正常工作,显示错误

问题描述

Python open cv2 ip web cam 不工作它的显示错误....我的 ip 也是正确的但是

cap = cv2.VideoCapture('http://192.168.4.18:8080/Image')

while True:

    ret, frame = cap.read()
    cv2.imgshow("Capturing",frame)
    #print('Running..')

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

错误

Traceback (most recent call last):
    cv2.imgshow("Capturing",frame)
AttributeError: module 'cv2.cv2' has no attribute 'imgshow'
>>> 

标签: pythonopencv

解决方案


检查这是语法错误

cv2.imshow("正在捕获",frame)


推荐阅读