1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

inserted some C & old Python declarations into the reference manual

This commit is contained in:
Vadim Pisarevsky
2011-06-26 21:37:16 +00:00
parent c10fea8368
commit 8003831f93
14 changed files with 405 additions and 5 deletions
+20
View File
@@ -63,6 +63,8 @@ Changes parameters of a window dynamically.
.. ocv:function:: void setWindowProperty(const string& name, int prop_id, double prop_value)
.. ocv:cfunction:: void cvSetWindowProperty(const char* name, int propId, double propValue)
:param name: Name of the window.
:param prop_id: Window property to edit. The following operation flags are available:
@@ -95,6 +97,8 @@ Provides parameters of a window.
.. ocv:function:: void getWindowProperty(const string& name, int prop_id)
.. ocv:cfunction:: void cvGetWindowProperty(const char* name, int propId)
:param name: Name of the window.
:param prop_id: Window property to retrive. The following operation flags are available:
@@ -117,6 +121,8 @@ 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: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 pointSize: Size of the font. If not specified, equal zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points.
@@ -161,6 +167,8 @@ 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: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 text: Text to write on an image.
@@ -186,6 +194,8 @@ displayOverlay
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 text: Overlay text to write on a window image.
@@ -201,6 +211,8 @@ 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:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms)
:param name: Name of the window.
:param text: Text to write on the window statusbar.
@@ -217,6 +229,8 @@ Creates a callback function called to draw OpenGL on top the the image display b
.. 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: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 callbackOpenGL: Pointer to the function to be called every frame. This function should be prototyped as ``void Foo(*void);`` .
@@ -267,6 +281,8 @@ Saves parameters of the specified window.
.. ocv:function:: void saveWindowParameters(const string& name)
.. ocv:cfunction:: void cvSaveWindowParameters(const char* name)
:param name: Name of the window.
The function ``saveWindowParameters`` saves size, location, flags, trackbars value, zoom and panning location of the window
@@ -278,6 +294,8 @@ Loads parameters of the specified window.
.. ocv:function:: void loadWindowParameters(const string& name)
.. ocv:cfunction:: void cvLoadWindowParameters(const char* name)
:param name: Name of the window.
The function ``loadWindowParameters`` loads size, location, flags, trackbars value, zoom and panning location of the window
@@ -289,6 +307,8 @@ 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: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 on_change: Pointer to the function to be called every time the button changes its state. This function should be prototyped as ``void Foo(int state,*void);`` . *state* is the current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
+18
View File
@@ -9,6 +9,9 @@ Creates a trackbar and attaches it to the specified window.
.. ocv:function:: int createTrackbar( const string& trackbarname, const string& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0)
.. ocv:cfunction:: int cvCreateTrackbar( const char* trackbarName, const char* windowName, int* value, int count, CvTrackbarCallback onChange )
.. ocv:pyoldfunction:: CreateTrackbar(trackbarName, windowName, value, count, onChange) -> None
:param trackbarname: Name of the created trackbar.
:param winname: Name of the window that will be used as a parent of the created trackbar.
@@ -43,6 +46,9 @@ Returns the trackbar position.
.. ocv:function:: int getTrackbarPos( const string& trackbarname, const string& winname )
.. ocv:cfunction:: int cvGetTrackbarPos( const char* trackbarName, const char* windowName )
.. ocv:pyoldfunction:: GetTrackbarPos(trackbarName, windowName)-> None
:param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of the trackbar.
@@ -83,6 +89,9 @@ Creates a window.
.. ocv:function:: void namedWindow( const string& winname, int flags )
.. ocv:cfunction:: int cvNamedWindow( const char* name, int flags )
.. ocv:pyoldfunction:: NamedWindow(name, flags=CV_WINDOW_AUTOSIZE)-> None
:param name: Name of the window in the window caption that may be used as a window identifier.
:param flags: Flags of the window. Currently the only supported flag is ``CV_WINDOW_AUTOSIZE`` . If this is set, the window size is automatically adjusted to fit the displayed image (see :ref:`imshow` ), and you cannot change the window size manually.
@@ -122,6 +131,9 @@ Destroys a window.
.. ocv:function:: void destroyWindow( const string &winname )
.. ocv:cfunction:: void cvDestroyWindow( const char* name )
.. ocv:pyoldfunction:: DestroyWindow(name)-> None
:param winname: Name of the window to be destroyed.
The function ``destroyWindow`` destroys the window with the given name.
@@ -142,6 +154,9 @@ Sets the trackbar position.
.. ocv:function:: void setTrackbarPos( const string& trackbarname, const string& winname, int pos )
.. ocv:cfunction:: void cvSetTrackbarPos( const char* trackbarName, const char* windowName, int pos )
.. ocv:pyoldfunction:: SetTrackbarPos(trackbarName, windowName, pos)-> None
:param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of trackbar.
@@ -162,6 +177,9 @@ Waits for a pressed key.
.. ocv:function:: int waitKey(int delay=0)
.. ocv:cfunction:: int cvWaitKey( int delay=0 )
.. ocv:pyoldfunction:: WaitKey(delay=0)-> int
:param delay: Delay in milliseconds. 0 is the special value that means "forever".
The function ``waitKey`` waits for a key event infinitely (when