Commit 83f25a34 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

merged the latest changes (grammar & style fix) and pre-latest changes (C & old…

merged the latest changes (grammar & style fix) and pre-latest changes (C & old Python interface and relocated short descriptions). Also, made some additional corrections
parent ea520d13
Qt* New Functions Qt New Functions
================ ================
.. highlight:: cpp .. highlight:: cpp
...@@ -56,15 +56,14 @@ See below the example used to generate the figure: :: ...@@ -56,15 +56,14 @@ See below the example used to generate the figure: ::
return 0; return 0;
} }
.. index:: setWindowProperty
.. _setWindowProperty:
setWindowProperty setWindowProperty
--------------------- ---------------------
Changes parameters of a window dynamically.
.. ocv:function:: void setWindowProperty(const string& name, int prop_id, double prop_value) .. ocv:function:: void setWindowProperty(const string& name, int prop_id, double prop_value)
Changes parameters of a window dynamically. .. ocv:cfunction:: void cvSetWindowProperty(const char* name, int propId, double propValue)
:param name: Name of the window. :param name: Name of the window.
...@@ -72,9 +71,9 @@ setWindowProperty ...@@ -72,9 +71,9 @@ setWindowProperty
* **CV_WND_PROP_FULLSCREEN** Change if the window is fullscreen ( ``CV_WINDOW_NORMAL`` or ``CV_WINDOW_FULLSCREEN`` ). * **CV_WND_PROP_FULLSCREEN** Change if the window is fullscreen ( ``CV_WINDOW_NORMAL`` or ``CV_WINDOW_FULLSCREEN`` ).
* **CV_WND_PROP_AUTOSIZE** Change if the window is resizable (texttt {CV\_WINDOW\_NORMAL} or ``CV_WINDOW_AUTOSIZE`` ). * **CV_WND_PROP_AUTOSIZE** Change if the window is resizable (``CV_WINDOW_NORMAL`` or ``CV_WINDOW_AUTOSIZE`` ).
* **CV_WND_PROP_ASPECTRATIO** Change if the aspect ratio of the image is preserved (texttt {CV\_WINDOW\_FREERATIO} or ``CV_WINDOW_KEEPRATIO`` ). * **CV_WND_PROP_ASPECTRATIO** Change if the aspect ratio of the image is preserved ( ``CV_WINDOW_FREERATIO`` or ``CV_WINDOW_KEEPRATIO`` ).
:param prop_value: New value of the window property. The following operation flags are available: :param prop_value: New value of the window property. The following operation flags are available:
...@@ -87,18 +86,18 @@ setWindowProperty ...@@ -87,18 +86,18 @@ setWindowProperty
* **CV_WINDOW_FREERATIO** Make the window resizable without any ratio constraints. * **CV_WINDOW_FREERATIO** Make the window resizable without any ratio constraints.
* **CV_WINDOW_KEEPRATIO** Make the window resizable but preserve the proportions of the displayed image. * **CV_WINDOW_KEEPRATIO** Make the window resizable, but preserve the proportions of the displayed image.
The function ``setWindowProperty`` enables changing properties of a window. The function ``setWindowProperty`` enables changing properties of a window.
.. index:: getWindowProperty
getWindowProperty getWindowProperty
--------------------- ---------------------
Provides parameters of a window.
.. ocv:function:: void getWindowProperty(const string& name, int prop_id) .. ocv:function:: void getWindowProperty(const string& name, int prop_id)
Provides parameters of a window. .. ocv:cfunction:: void cvGetWindowProperty(const char* name, int propId)
:param name: Name of the window. :param name: Name of the window.
...@@ -106,9 +105,9 @@ getWindowProperty ...@@ -106,9 +105,9 @@ getWindowProperty
* **CV_WND_PROP_FULLSCREEN** Change if the window is fullscreen ( ``CV_WINDOW_NORMAL`` or ``CV_WINDOW_FULLSCREEN`` ). * **CV_WND_PROP_FULLSCREEN** Change if the window is fullscreen ( ``CV_WINDOW_NORMAL`` or ``CV_WINDOW_FULLSCREEN`` ).
* **CV_WND_PROP_AUTOSIZE** Change if the window is resizable (texttt {CV\_WINDOW\_NORMAL} or ``CV_WINDOW_AUTOSIZE`` ). * **CV_WND_PROP_AUTOSIZE** Change if the window is resizable (``CV_WINDOW_NORMAL`` or ``CV_WINDOW_AUTOSIZE`` ).
* **CV_WND_PROP_ASPECTRATIO** Change if the aspect ratio of the image is preserved (texttt {CV\_WINDOW\_FREERATIO} or ``CV_WINDOW_KEEPRATIO`` ). * **CV_WND_PROP_ASPECTRATIO** Change if the aspect ratio of the image is preserved (``CV_WINDOW_FREERATIO`` or ``CV_WINDOW_KEEPRATIO`` ).
See See
...@@ -116,15 +115,13 @@ See ...@@ -116,15 +115,13 @@ See
The function ``getWindowProperty`` returns properties of a window. The function ``getWindowProperty`` returns properties of a window.
.. index:: fontQt
.. _fontQt:
fontQt fontQt
---------- ----------
Creates the font to draw a text on an image.
.. ocv:function:: CvFont fontQt(const string& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0) .. ocv:function:: CvFont fontQt(const string& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0)
Creates the font to draw a text on an image. .. ocv:cfunction:: CvFont cvFontQt(const char* nameFont, int pointSize=-1, CvScalar color=cvScalarAll(0), int weight=CV_FONT_NORMAL, int style=CV_STYLE_NORMAL, int spacing=0)
:param nameFont: Name of the font. The name should match the name of a system font (such as *Times*). If the font is not found, a default one is used. :param nameFont: Name of the font. The name should match the name of a system font (such as *Times*). If the font is not found, a default one is used.
...@@ -163,13 +160,14 @@ A basic usage of this function is the following: :: ...@@ -163,13 +160,14 @@ A basic usage of this function is the following: ::
CvFont font = fontQt(''Times''); CvFont font = fontQt(''Times'');
addText( img1, ``Hello World !'', Point(50,50), font); addText( img1, ``Hello World !'', Point(50,50), font);
.. index:: addText
addText addText
----------- -----------
Creates the font to draw a text on an image.
.. ocv:function:: void addText(const Mat& img, const string& text, Point location, CvFont *font) .. ocv:function:: void addText(const Mat& img, const string& text, Point location, CvFont *font)
Creates the font to draw a text on an image. .. ocv:cfunction:: void cvAddText(const CvArr* img, const char* text, CvPoint location, CvFont *font)
:param img: 8-bit 3-channel image where the text should be drawn. :param img: 8-bit 3-channel image where the text should be drawn.
...@@ -185,16 +183,17 @@ on an image ...@@ -185,16 +183,17 @@ on an image
*img* *img*
using a specific font using a specific font
*font* *font*
(see example (see example :ocv:func:`fontQt` )
:ocv:func:`fontQt` )
.. index:: displayOverlay .. index:: displayOverlay
displayOverlay displayOverlay
------------------ ------------------
Displays a text on a window image as an overlay for a specified duration.
.. ocv:function:: void displayOverlay(const string& name, const string& text, int delay) .. ocv:function:: void displayOverlay(const string& name, const string& text, int delay)
Displays a text on a window image as an overlay for a specified duration. .. ocv:cfunction:: void cvDisplayOverlay(const char* name, const char* text, int delay)
:param name: Name of the window. :param name: Name of the window.
...@@ -204,13 +203,14 @@ displayOverlay ...@@ -204,13 +203,14 @@ displayOverlay
The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time *delay*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored. The function ``displayOverlay`` displays useful information/tips on top of the window for a certain amount of time *delay*. The function does not modify the image, displayed in the window, that is, after the specified delay the original content of the window is restored.
.. index:: displayStatusBar
displayStatusBar displayStatusBar
-------------------- --------------------
Displays a text on the window statusbar during the specified period of time.
.. ocv:function:: void displayStatusBar(const string& name, const string& text, int delay) .. ocv:function:: void displayStatusBar(const string& name, const string& text, int delay)
Displays a text on the window statusbar during the specified period of time. .. ocv:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms)
:param name: Name of the window. :param name: Name of the window.
...@@ -222,14 +222,13 @@ The function ``displayOverlay`` displays useful information/tips on top of the w ...@@ -222,14 +222,13 @@ The function ``displayOverlay`` displays useful information/tips on top of the w
*delay* *delay*
. This information is displayed on the window statubar (the window must be created with the ``CV_GUI_EXPANDED`` flags). . This information is displayed on the window statubar (the window must be created with the ``CV_GUI_EXPANDED`` flags).
.. index:: createOpenGLCallback
createOpenGLCallback createOpenGLCallback
------------------------ ------------------------
Creates a callback function called to draw OpenGL on top the the image display by ``windowname``.
.. ocv:function:: void createOpenGLCallback( const string& window_name, OpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(NULL), double angle CV_DEFAULT(-1), double zmin CV_DEFAULT(-1), double zmax CV_DEFAULT(-1) .. ocv:function:: void createOpenGLCallback( const string& window_name, OpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(NULL), double angle CV_DEFAULT(-1), double zmin CV_DEFAULT(-1), double zmax CV_DEFAULT(-1)
Creates a callback function called to draw OpenGL on top the the image display by ``windowname``. .. ocv:cfunction:: void cvCreateOpenGLCallback( const char* windowName, CvOpenGLCallback callbackOpenGL, void* userdata=NULL, double angle=-1, double zmin=-1, double zmax=-1
:param window_name: Name of the window. :param window_name: Name of the window.
...@@ -243,7 +242,7 @@ createOpenGLCallback ...@@ -243,7 +242,7 @@ createOpenGLCallback
:param zmax: Parameter specifying the distance from the viewer to the far clipping plane (always positive). Default value is 1000. *(Optional)* :param zmax: Parameter specifying the distance from the viewer to the far clipping plane (always positive). Default value is 1000. *(Optional)*
The function ``createOpenGLCallback`` can be used to draw 3D data on the window. See the callback example below: :: The function ``createOpenGLCallback`` can be used to draw 3D data on the window. See the example of callback use below: ::
void on_opengl(void* param) void on_opengl(void* param)
{ {
...@@ -274,42 +273,40 @@ The function ``createOpenGLCallback`` can be used to draw 3D data on the window. ...@@ -274,42 +273,40 @@ The function ``createOpenGLCallback`` can be used to draw 3D data on the window.
} }
} }
.. index:: saveWindowParameters
saveWindowParameters saveWindowParameters
------------------------ ------------------------
Saves parameters of the specified window.
.. ocv:function:: void saveWindowParameters(const string& name) .. ocv:function:: void saveWindowParameters(const string& name)
Saves parameters of the window ``windowname`` . .. ocv:cfunction:: void cvSaveWindowParameters(const char* name)
:param name: Name of the window. :param name: Name of the window.
The function ``saveWindowParameters`` saves size, location, flags, trackbars value, zoom and panning location of the window The function ``saveWindowParameters`` saves size, location, flags, trackbars value, zoom and panning location of the window
``window_name`` . ``window_name`` .
.. index:: loadWindowParameters
loadWindowParameters loadWindowParameters
------------------------ ------------------------
Loads parameters of the specified window.
.. ocv:function:: void loadWindowParameters(const string& name) .. ocv:function:: void loadWindowParameters(const string& name)
Loads parameters of the window ``windowname`` . .. ocv:cfunction:: void cvLoadWindowParameters(const char* name)
:param name: Name of the window. :param name: Name of the window.
The function ``loadWindowParameters`` loads size, location, flags, trackbars value, zoom, and panning location of the window The function ``loadWindowParameters`` loads size, location, flags, trackbars value, zoom and panning location of the window
``window_name`` . ``window_name`` .
.. index:: createButton
createButton createButton
---------------- ----------------
Attaches a button to the control panel.
.. ocv:function:: createButton( const string& button_name CV_DEFAULT(NULL),ButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL), int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0)) .. ocv:function:: createButton( const string& button_name CV_DEFAULT(NULL),ButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL), int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0))
Attaches a button to the control panel. .. ocv:cfunction:: cvCreateButton( const char* buttonName=NULL, CvButtonCallback onChange=NULL, void* userdata=NULL, int buttonType=CV_PUSH_BUTTON, int initialButtonState=0
:param button_name: Name of the button. :param button_name: Name of the button.
...@@ -323,7 +320,7 @@ createButton ...@@ -323,7 +320,7 @@ createButton
* **CV_CHECKBOX** Checkbox button * **CV_CHECKBOX** Checkbox button
* **CV_RADIOBOX** Radiobox button. The radiobox on the same buttonbar (same line) are exclusive, that is, only one can be selected at a time. * **CV_RADIOBOX** Radiobox button. The radiobox on the same buttonbar (same line) are exclusive, that is only one can be selected at a time.
:param initial_button_state: Default state of the button. Use for checkbox and radiobox. Its value could be 0 or 1. *(Optional)* :param initial_button_state: Default state of the button. Use for checkbox and radiobox. Its value could be 0 or 1. *(Optional)*
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment