OpenCV tool to display up to 9 windows side by side
In most computer vision projects, you might like to see several windows at the same time. This code allows you to display 9 windows side-by-side.
Calling the cv2.imshow( , )
function multiple times displays the windows on top of each other. This code offers you 2 huge benefits:
1) Replace cv2.imshow(‘image’,img)
by Display3x3(‘image’,img,1)
. That’s it! No additional code is required.
2) The original video will be automatically scaled to fit on your screen while preserving the aspect ratio.
Low-res Video Sample:
Python 2 or 3\numpy
\cv2
\tkinter
1) Make sure that you have the A3x3.py file in your working directory
2) Add from A3x3 import *
3) Type Display3x3(“image”,img,2)
, number “2” indicates the window position where you want the window to be.
Check A3x3.py for more info about window positions.