Created
December 9, 2022 08:04
-
-
Save realphongha/0e8ff73365416a71f959093466f24409 to your computer and use it in GitHub Desktop.
Concatenate two cv2 images horizontally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def horizontal_concat(img1, img2, img_size): | |
img1_resized = cv2.resize(img1, img_size) | |
img2_resized = cv2.resize(img2, img_size) | |
return np.concatenate((img1_resized, img2_resized), axis=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment