Answer the question
In order to leave comments, you need to log in
Why doesn't OpenCV+Python work?
After much torment and dancing with a tambourine, I installed OpenCV. But the above code refuses to work: the window that I create appears and freezes...
import cv2
image = cv2.imread("plan.png")
cv2.namedWindow("main", cv2.WINDOW_AUTOSIZE)
cv2.imshow("main", image)
Answer the question
In order to leave comments, you need to log in
Try like this:
import cv2
image = cv2.imread("plan.png")
cv2.namedWindow("main", cv2.WINDOW_AUTOSIZE)
while(1):
cv2.imshow("main", image)
k = cv2.waitKey(1) & 0xFF
if k == 27:
break
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question