From 390fa14a2a92c68fd07b3da4db45be4cca5145be Mon Sep 17 00:00:00 2001 From: Gustavo Vargas Date: Wed, 5 Feb 2014 21:25:16 -0200 Subject: [PATCH 1/3] Update py_image_display.rst --- doc/py_tutorials/py_gui/py_image_display/py_image_display.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst index 75f674a503..11f0d23ba1 100644 --- a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst +++ b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst @@ -59,6 +59,8 @@ A screenshot of the window will look like this (in Fedora-Gnome machine): **cv2.waitKey()** is a keyboard binding function. Its argument is the time in milliseconds. The function waits for specified milliseconds for any keyboard event. If you press any key in that time, the program continues. If **0** is passed, it waits indefinitely for a key stroke. It can also be set to detect specific key strokes like, if key `a` is pressed etc which we will discuss below. +.. note:: For beginners: besides binding keyboard events this function also process other GUI events. At least in windows 7 it's a must to use it to process ``WM_PAINT`` (which actually prints the image), and even to process the close window event. + **cv2.destroyAllWindows()** simply destroys all the windows we created. If you want to destroy any specific window, use the function **cv2.destroyWindow()** where you pass the exact window name as the argument. .. note:: There is a special case where you can already create a window and load image to it later. In that case, you can specify whether window is resizable or not. It is done with the function **cv2.namedWindow()**. By default, the flag is ``cv2.WINDOW_AUTOSIZE``. But if you specify flag to be ``cv2.WINDOW_NORMAL``, you can resize window. It will be helpful when image is too large in dimension and adding track bar to windows. From 44cc51dfb105315157afd7bb5002f6c04f644eb1 Mon Sep 17 00:00:00 2001 From: Gustavo Vargas Date: Thu, 6 Feb 2014 18:21:19 -0200 Subject: [PATCH 2/3] Update py_image_display.rst OS information removed. --- doc/py_tutorials/py_gui/py_image_display/py_image_display.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst index 11f0d23ba1..e38c84ca47 100644 --- a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst +++ b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst @@ -59,7 +59,7 @@ A screenshot of the window will look like this (in Fedora-Gnome machine): **cv2.waitKey()** is a keyboard binding function. Its argument is the time in milliseconds. The function waits for specified milliseconds for any keyboard event. If you press any key in that time, the program continues. If **0** is passed, it waits indefinitely for a key stroke. It can also be set to detect specific key strokes like, if key `a` is pressed etc which we will discuss below. -.. note:: For beginners: besides binding keyboard events this function also process other GUI events. At least in windows 7 it's a must to use it to process ``WM_PAINT`` (which actually prints the image), and even to process the close window event. +.. note:: Besides binding keyboard events this function also process other GUI events, so it's a must to use it to process ``WM_PAINT`` (which actually prints the image), and even to process the close window event. **cv2.destroyAllWindows()** simply destroys all the windows we created. If you want to destroy any specific window, use the function **cv2.destroyWindow()** where you pass the exact window name as the argument. From 0d199b40483b321cbc27bd35dbaf09a3201e70d7 Mon Sep 17 00:00:00 2001 From: Gustavo Vargas Date: Mon, 17 Feb 2014 23:22:18 -0300 Subject: [PATCH 3/3] Update py_image_display.rst --- doc/py_tutorials/py_gui/py_image_display/py_image_display.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst index e38c84ca47..a05db370c1 100644 --- a/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst +++ b/doc/py_tutorials/py_gui/py_image_display/py_image_display.rst @@ -59,7 +59,7 @@ A screenshot of the window will look like this (in Fedora-Gnome machine): **cv2.waitKey()** is a keyboard binding function. Its argument is the time in milliseconds. The function waits for specified milliseconds for any keyboard event. If you press any key in that time, the program continues. If **0** is passed, it waits indefinitely for a key stroke. It can also be set to detect specific key strokes like, if key `a` is pressed etc which we will discuss below. -.. note:: Besides binding keyboard events this function also process other GUI events, so it's a must to use it to process ``WM_PAINT`` (which actually prints the image), and even to process the close window event. +.. note:: Besides binding keyboard events this function also processes many other GUI events, so you MUST use it to actually display the image. **cv2.destroyAllWindows()** simply destroys all the windows we created. If you want to destroy any specific window, use the function **cv2.destroyWindow()** where you pass the exact window name as the argument.