摘要: def getContours(img): contours, hierarchy = cv2.findContours(img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) for cnt in contours: area = cv2.contourAre 阅读全文
posted @ 2025-09-21 21:03 SpongeBob~ 阅读(8) 评论(0) 推荐(0)
摘要: img = cv2.imread('images/lambo.png') def stackImages(scale, imgArray): rows = len(imgArray) cols = len(imgArray[0]) rowsAvailable = isinstance(imgArra 阅读全文
posted @ 2025-09-21 20:18 SpongeBob~ 阅读(11) 评论(0) 推荐(0)
摘要: # 这个是numpy的功能 # imgHor = np.hstack((img, img)) # imgVer = np.vstack((img, img)) def stackImages(scale, imgArray): rows = len(imgArray) cols = len(imgA 阅读全文
posted @ 2025-09-21 11:42 SpongeBob~ 阅读(6) 评论(0) 推荐(0)
摘要: # width, height = 458, 371 width, height = 250, 350 pts1 = np.float32([[109, 220], [282, 189], [154, 483], [353, 434]]) pst2 = np.float32([[0, 0], [wi 阅读全文
posted @ 2025-09-21 11:25 SpongeBob~ 阅读(5) 评论(0) 推荐(0)
摘要: # [[0. 0. 0 # img = np.zeros(shape=(512, 512)) # [[[0 0 0] img = np.zeros(shape=(512, 512, 3), dtype=np.uint8) # print(img) # Blue 这里还是先 Height,然后是 Wi 阅读全文
posted @ 2025-09-21 11:11 SpongeBob~ 阅读(6) 评论(0) 推荐(0)
摘要: img = cv2.imread('images/lambo.png') # (462, 623, 3) print(img.shape) # 先是width(x轴),然后是height(y轴),可以看出 resize 是放大或缩小并不是裁剪 imgResized = cv2.resize(img, 阅读全文
posted @ 2025-09-21 10:14 SpongeBob~ 阅读(4) 评论(0) 推荐(0)