I am making a motion detection program which first gets a reference frame from a live video feed and detects if anything changes from the reference frame it took when the program was started.
Variables:
refFrame = 3 dimensional image which is the colored frame you get from the webcam feed when the program is started. (Still image which is the first frame the webcam captured)
myFrame = 3 dimensional video feed which reflects the real time video feed of your webcam (Actual real time video feed directly from the webcam)
diffFrame = 2 dimensional binary video feed which displays the difference of the current video feed vs the reference image frame it took when you started the program. (Black and white video feed)
threshFrame = 2 dimensional binary video feed which displays the threshold format of the video live feed of diffFrame. (Black and white video feed in different format)
My goal is to stack all the 4 frames together in a 4x4 format using vstack as I have successfully stacked both 3 dimensional and 2 dimensional images together horizontally. Currently, I'm having a problem stacking the 4 images because of their dimension differences. How can I possibly stack these 4 images together?
# stack 'em
picsStack1 = np.hstack((refFrame,myFrame))
picsStack2 = np.hstack((diffFrame,threshFrame))
# show video frame
cv.imshow('Hidden Cam',np.vstack((picsStack1, picsStack2)))