# A question about imshow

**URL:** https://forum.opencv.org/t/a-question-about-imshow/11226
**Category:** C++
**Tags:** highgui
**Created:** [December 6, 2022, 10:21am UTC](https://forum.opencv.org/t/a-question-about-imshow/11226 "2022-12-06T10:21:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![yuanlu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/yuanlu/32/6677_2.png) [@yuanlu](https://forum.opencv.org/u/yuanlu)
#### Post date: [December 6, 2022, 10:21am UTC](https://forum.opencv.org/t/a-question-about-imshow/11226/1 "2022-12-06T10:21:39Z")

</div>

I’m using imshow to display the debug image, but it will get stuck in one place. I don’t know how to solve it.

```cpp
cv::imshow("view", img);

```

 ![图片](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/2/2891156456d5730c3b971fd8b018614590a96288.jpeg)

Stuck code file:

```auto
opencv-4.6.0\modules\highgui\src\window_w32.cpp

```

Line 1364

```cpp
MoveWindow(window.hwnd, rect.left, rect.top,
               rect.right - rect.left,
               rect.bottom - rect.top, TRUE);

```

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [December 6, 2022, 9:49pm UTC](https://forum.opencv.org/t/a-question-about-imshow/11226/2 "2022-12-06T21:49:30Z")

</div>

you are failing to call `waitKey()`

---

<div class="post-metadata">

### Author: ![yuanlu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/yuanlu/32/6677_2.png) [@yuanlu](https://forum.opencv.org/u/yuanlu)
#### Post date: [December 7, 2022, 1:13am UTC](https://forum.opencv.org/t/a-question-about-imshow/11226/3 "2022-12-07T01:13:06Z")

</div>

No, I called it at first, but actually I didn’t execute that line of statements.  
Every time I pause the program, he will stop at that position.

 ![图片](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/8/8bef59cee49c62fd408ce2f955d2832f6cf76d7d.png)
