I have absolutely zero idea of the openCV library before watching this tutorial. I hope I can take away some useful knowledge by noting down some code here.
whileTrue: isTrue, frame = capture.read() # if cv.waitKey(20) & 0xFF==ord('d'): # This is the preferred way - if `isTrue` is false (the frame could # not be read, or we're at the end of the video), we immediately # break from the loop. if isTrue: cv.imshow('Video', frame) if cv.waitKey(20) & 0xFF==ord('d'): break else: break
capture.release() cv.destroyAllWindows()
Resizing and Rescaling
We often resize and rescale the image to relieve the computational strain.