Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

opencv draw two images side by side

import cv2
import numpy as np

img1 = cv2.imread("path/to/img1")
img2 = cv2.imread("path/to/img2")

vertical_concat = np.concatenate((img1, img2), axis=0)
cv2.imshow("Vertical plot", vertical_concat)
cv2.waitKey(0)

horizontal_concat = np.concatenate((img1, img2), axis=1)
cv2.imshow("Horizontal plot", horizontal_concat)
cv2.waitKey(0)

cv2.destroyAllWindows()
 
PREVIOUS NEXT
Tagged: #opencv #draw #images #side #side
ADD COMMENT
Topic
Name
9+1 =