I want ask how works the code bellow. I understand cv2 is module, cv2.imread() and cv2.imshow() are probably static methods for reading images and showing. So how are connected together cv2.imshow() and cv2.waitKey() and cv2.destroyAllWindows? How is sent the information from the cv2.waitKey() and cv2.waitKey() to the cv2.imshow()? Why it won't work without these methods or what is it?
import cv2
img=cv2.imread("1.jpg")
cv2.imshow("obrazek",img)
cv2.waitKey(0)
cv2.destroyAllWindows()