LC 对角线遍历
题目描述:
给你一个大小为 m x n 的矩阵 mat ,请以对角线遍历的顺序,用一个数组返回这个矩阵中的所有元素。
题目实例:
示例一: 输入:mat [[1,2,3],[4,5,6],[7,8,9]]
输出:[…
视频讲解 OpenCV读取摄像头窗口变大且很卡的解决方法 测试过程
读取摄像头窗口变大且很卡的代码
import cv2
cap cv2.VideoCapture(0)
if not cap.isOpened():print("Cannot open camera")exit()
while True:ret, frame cap.read()if not ret:print("no str…