© Karobben |
由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
Align
import cv2
import numpy as np
img1 = cv2.imread('/home/ken/Desktop/test/IMG_20210421_143828.jpg')
img2 = cv2.imread('/home/ken/Desktop/test/IMG_20210421_143832.jpg')
img3 = cv2.imread('/home/ken/Desktop/test/IMG_20210421_143834.jpg')
img4 = cv2.imread('/home/ken/Desktop/test.png')
img_result = cv2.resize(img1, (900,400))
img_1 = cv2.resize(img1, (300,200))
img_2 = cv2.resize(img2, (300,200))
img_3 = cv2.resize(img3, (300,200))
img_4 = cv2.resize(img4, (900,200))
img_result[0:200, 0:300] = img_1
img_result[0:200, 300:600] = img_2
img_result[0:200, 600:900] = img_3
img_result[200:400, 0:900] = img_4
cv2.imwrite('batch.png',img_result)
Enjoy~
由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
GitHub: Karobben
Blog:Karobben
BiliBili:史上最不正經的生物狗