直线检测一般使用函数HoughLines或HoughLinesP,第二种方法为概率版本Hoygh变换,这个函数是优化版本,计算速度更快
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
x, y = frame.shape[0:2]
small_frame = cv2.resize(frame,
直线检测一般使用函数HoughLines或HoughLinesP,第二种方法为概率版本Hoygh变换,这个函数是优化版本,计算速度更快
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
x, y = frame.shape[0:2]
small_frame = cv2.resize(frame,