When the raspberry pie uses cv2.imshow() to display pictures, the display box can pop up, but the display is transparent and there is no image problem

The problem is as follows:
insert image description here
This kind of problem occurs because there is no delay when using the cv2.imshow() function, which leads to the problem that the display is too fast to be displayed.
Solution:
Add a line after cv2.imshow():

cv2.imshow()
cv2.waitKey(3)

Then it will display normally:

insert image description here

Guess you like

Origin blog.csdn.net/weixin_46235937/article/details/125487768
Recommended