0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

imshowで灰色のウィンドウが表示されカーソルがぐるぐるになる[python,opencv2]

Last updated at Posted at 2024-07-15

このようになってしまった時の対処法

image.png

とにかくcv2.waitKey(10)を書きましょう。書く場所はimshowの後ろあたりですかね、詳しくは知りません。waitkey(0)でもいいですがなんか10の方が安定した気がするので一応10しとけばいいと思います。
正直自分も理屈は分かってないですが、これがないと終了できないどころか、まずまともに表示させることも叶わんようなので、そういう仕様なんでしょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?