目录
6.将取出的图像尽可能输出平面图
7.将图像结合在一起
6.将取出的图像尽可能输出平面图
import cv2
import numpy as np
img = cv2.imread("Resources/cards.jpg")
width,height = 250,250
pst1 = np.float32([[111,219],[287,188],[154,482],[352,440]])
pts2 = np.float32([[0,0],[width,0],[0,height],[width,height]])
matrix = cv2.getPerspectiveTransform(pst1,pst2)
cv2.imshow("image",img)
cv2.imshow("image Output",imgOutput)
cv2.waitKey(0)
7.将图像结合在一起
import cv2
import numpy as np
img = cv2.imread('Resources/lena.png')
imgHor = np.hstack((img,img))
imgVer = np.vstack((img,img))
cv2.imshow("Horizontal",imgHor)
cv2.imshow("Vertical",imgVer)
cv2.waitKey(0)