Open In App

How to Display Multiple Images in One Window using OpenCV Python?

Prerequisites: Opencv

In this article, we will show how to display Multiple Images In One window using OpenCV in Python.



Approach 

Functions Used

Program:




import cv2
import numpy as np
  
# Read First Image
img1 = cv2.imread('GFG.png')
  
# Read Second Image
img2 = cv2.imread('GFG.png')
  
  
# concatenate image Horizontally
Hori = np.concatenate((img1, img2), axis=1)
  
# concatenate image Vertically
Verti = np.concatenate((img1, img2), axis=0)
  
cv2.imshow('HORIZONTAL', Hori)
cv2.imshow('VERTICAL', Verti)
  
cv2.waitKey(0)
cv2.destroyAllWindows()

Input:



GFG.png

Output:

Article Tags :