0 Posted 2021-04-21Updated 2024-01-11Python / OpenCVa few seconds read (About 93 words)Image align by opencv in PythonAlign import cv2import numpy as npimg1 = 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_1img_result[0:200, 300:600] = img_2img_result[0:200, 600:900] = img_3img_result[200:400, 0:900] = img_4cv2.imwrite('batch.png',img_result) Image align by opencv in Pythonhttps://karobben.github.io/2021/04/21/Python/opencv-img-align/AuthorKarobbenPosted on2021-04-21Updated on2024-01-11Licensed under#PythonOpenCV