Commit 762bc0f8 authored by Bernat Gabor's avatar Bernat Gabor

Some reST syntax correction. Now the PDF documentation builds correctly under…

Some reST syntax correction. Now the PDF documentation builds correctly under Windows using MIKTEX. Some update on the tutorial structure. Some CSS syntax correction. Windows Install Tutorial v0.4. 
parent d8ea8ef9
...@@ -261,14 +261,14 @@ pre { ...@@ -261,14 +261,14 @@ pre {
} }
tt { tt {
color: {{ theme_headtext_color }} color: {{ theme_headtextcolor }};
background-color: #ecf0f3; background-color: #ecf0f3;
padding: 0 1px 0 1px; padding: 0 1px 0 1px;
font-size: 1.2em; font-size: 1.2em;
} }
tt.descname { tt.descname {
color: {{ theme_headtext_color }} color: {{ theme_headtextcolor }};
background-color: #ecf0f3; background-color: #ecf0f3;
padding: 0 1px 0 1px; padding: 0 1px 0 1px;
font-size: 1.4em; font-size: 1.4em;
...@@ -283,7 +283,7 @@ dl.function > dt:first-child { ...@@ -283,7 +283,7 @@ dl.function > dt:first-child {
margin-bottom: 7px; margin-bottom: 7px;
} }
dl.cfunction > dt:first-child { dl.c\:function > dt:first-child {
margin-bottom: 7px; margin-bottom: 7px;
color: #8080B0; color: #8080B0;
} }
...@@ -308,3 +308,7 @@ table.field-list { ...@@ -308,3 +308,7 @@ table.field-list {
ul.simple { ul.simple {
list-style: none; list-style: none;
} }
.enumeratevisibleitems .simple {
list-style: square;
}
\ No newline at end of file
...@@ -6,7 +6,6 @@ pygments_style = sphinx ...@@ -6,7 +6,6 @@ pygments_style = sphinx
[options] [options]
rightsidebar = false rightsidebar = false
stickysidebar = false stickysidebar = false
footerbgcolor = #004068 footerbgcolor = #004068
footertextcolor = #ffffff footertextcolor = #ffffff
sidebarbgcolor = #006090 sidebarbgcolor = #006090
...@@ -26,7 +25,6 @@ codetextcolor = #333333 ...@@ -26,7 +25,6 @@ codetextcolor = #333333
feedbackbgcolor = #004068 feedbackbgcolor = #004068
feedbacktextcolor = #ffffff feedbacktextcolor = #ffffff
feedbacklinkcolor = #ffffff feedbacklinkcolor = #ffffff
bodyfont = sans-serif bodyfont = sans-serif
headfont = 'Trebuchet MS', sans-serif headfont = 'Trebuchet MS', sans-serif
lang = none lang = none
\ No newline at end of file
...@@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('.')) ...@@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('.'))
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.todo', 'sphinx.ext.extlinks', 'ocv'] extensions = ['sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.todo', 'sphinx.ext.extlinks', 'ocv', 'sphinx.ext.doctest']
doctest_test_doctest_blocks = 'block' doctest_test_doctest_blocks = 'block'
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
...@@ -170,7 +170,7 @@ htmlhelp_basename = 'opencv' ...@@ -170,7 +170,7 @@ htmlhelp_basename = 'opencv'
# OpenCV docs use some custom LaTeX macros in the formulae. Make sure we include the definitions # OpenCV docs use some custom LaTeX macros in the formulae. Make sure we include the definitions
pngmath_latex_preamble = r""" pngmath_latex_preamble = r"""
\usepackage{euler}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm} \usepackage[usenames,dvipsnames]{color}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}
\newcommand{\matTT}[9]{ \newcommand{\matTT}[9]{
\[ \[
\left|\begin{array}{ccc} \left|\begin{array}{ccc}
......
Include in this directory only defintion files. None of the reST files entered here will be parsed by the Sphinx Builder.
\ No newline at end of file
...@@ -206,6 +206,7 @@ Explanation ...@@ -206,6 +206,7 @@ Explanation
#. Create a window to display the results #. Create a window to display the results
.. code-block:: cpp .. code-block:: cpp
namedWindow( window_name, CV_WINDOW_AUTOSIZE ); namedWindow( window_name, CV_WINDOW_AUTOSIZE );
#. Create a Trackbar for the user to enter the lower threshold for our Canny detector: #. Create a Trackbar for the user to enter the lower threshold for our Canny detector:
......
.. _copyMakeBorder: .. _copyMakeBorderTutorial:
Adding borders to your images Adding borders to your images
****************************** ******************************
......
...@@ -132,6 +132,7 @@ Code ...@@ -132,6 +132,7 @@ Code
return 0; return 0;
} }
Explanation Explanation
============= =============
......
...@@ -65,6 +65,7 @@ How does it work? ...@@ -65,6 +65,7 @@ How does it work?
:alt: Polar plot of the family of lines for three points :alt: Polar plot of the family of lines for three points
:height: 200pt :height: 200pt
:align: center :align: center
The three plots intersect in one single point :math:`(0.925, 9.6)`, these coordinates are the parameters (:math:`\theta, r`) or the line in which :math:`(x_{0}, y_{0})`, :math:`(x_{1}, y_{1})` and :math:`(x_{2}, y_{2})` lay. The three plots intersect in one single point :math:`(0.925, 9.6)`, these coordinates are the parameters (:math:`\theta, r`) or the line in which :math:`(x_{0}, y_{0})`, :math:`(x_{1}, y_{1})` and :math:`(x_{2}, y_{2})` lay.
#. What does all the stuff above mean? It means that in general, a line can be *detected* by finding the number of intersections between curves.The more curves intersecting means that the line represented by that intersection have more points. In general, we can define a *threshold* of the minimum number of intersections needed to *detect* a line. #. What does all the stuff above mean? It means that in general, a line can be *detected* by finding the number of intersections between curves.The more curves intersecting means that the line represented by that intersection have more points. In general, we can define a *threshold* of the minimum number of intersections needed to *detect* a line.
......
...@@ -231,6 +231,7 @@ Explanation ...@@ -231,6 +231,7 @@ Explanation
Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT ); Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT );
/// Gradient Y /// Gradient Y
Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT ); Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT );
The function takes the following arguments: The function takes the following arguments:
* *src_gray*: In our example, the input image. Here it is *CV_8U* * *src_gray*: In our example, the input image. Here it is *CV_8U*
......
...@@ -13,6 +13,13 @@ In this section you will learn about the image processing (manipulation) functio ...@@ -13,6 +13,13 @@ In this section you will learn about the image processing (manipulation) functio
../opening_closing_hats/opening_closing_hats ../opening_closing_hats/opening_closing_hats
../pyramids/pyramids ../pyramids/pyramids
../threshold/threshold ../threshold/threshold
../imgtrans/filter_2d/filter_2d
../imgtrans/copyMakeBorder/copyMakeBorder
../imgtrans/sobel_derivatives/sobel_derivatives
../imgtrans/laplace_operator/laplace_operator
../imgtrans/canny_detector/canny_detector
../imgtrans/hough_lines/hough_lines
../imgtrans/hough_circle/hough_circle
.. |Author_AnaH| unicode:: Ana U+0020 Huam U+00E1 n .. |Author_AnaH| unicode:: Ana U+0020 Huam U+00E1 n
...@@ -126,7 +133,7 @@ In this section you will learn about the image processing (manipulation) functio ...@@ -126,7 +133,7 @@ In this section you will learn about the image processing (manipulation) functio
:width: 100pt :width: 100pt
* :ref:`copyMakeBorder` * :ref:`copyMakeBorderTutorial`
===================== ============================================== ===================== ==============================================
|CopyMakeBorder| *Title:* **Adding borders to your images** |CopyMakeBorder| *Title:* **Adding borders to your images**
......
...@@ -9,43 +9,43 @@ Using OpenCV with Eclipse (plugin CDT) ...@@ -9,43 +9,43 @@ Using OpenCV with Eclipse (plugin CDT)
Prerequisites Prerequisites
=============== ===============
#. Having installed `Eclipse <http://www.eclipse.org/>`_ in your workstation (only the CDT plugin for C/C++ is needed). You can follow the following steps: 1. Having installed `Eclipse <http://www.eclipse.org/>`_ in your workstation (only the CDT plugin for C/C++ is needed). You can follow the following steps:
* Go to the Eclipse site * Go to the Eclipse site
* Download `Eclipse IDE for C/C++ Developers <http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliossr2>`_ . Choose the link according to your workstation. * Download `Eclipse IDE for C/C++ Developers <http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliossr2>`_ . Choose the link according to your workstation.
#. Having installed OpenCV. If not yet, go :ref:`here <Linux_Installation>` #. Having installed OpenCV. If not yet, go :ref:`here <Linux-Installation>`.
Making a project Making a project
================= =================
#. Start Eclipse. Just run the executable that comes in the folder. 1. Start Eclipse. Just run the executable that comes in the folder.
#. Go to **File -> New -> C/C++ Project** #. Go to **File -> New -> C/C++ Project**
.. image:: images/Eclipse_Tutorial_Screenshot-0.png .. image:: images/a0.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 0 :alt: Eclipse Tutorial Screenshot 0
:align: center :align: center
#. Choose a name for your project (i.e. DisplayImage). An **Empty Project** should be okay for this example. #. Choose a name for your project (i.e. DisplayImage). An **Empty Project** should be okay for this example.
.. image:: images/Eclipse_Tutorial_Screenshot-1.png .. image:: images/a1.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 1 :alt: Eclipse Tutorial Screenshot 1
:align: center :align: center
#. Leave everything else by default. Press **Finish**. #. Leave everything else by default. Press **Finish**.
.. image:: images/Eclipse_Tutorial_Screenshot-2.png .. image:: images/a2.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 2 :alt: Eclipse Tutorial Screenshot 2
:align: center :align: center
#. Your project (in this case DisplayImage) should appear in the **Project Navigator** (usually at the left side of your window). #. Your project (in this case DisplayImage) should appear in the **Project Navigator** (usually at the left side of your window).
.. image:: images/Eclipse_Tutorial_Screenshot-3.png .. image:: images/a3.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 3 :alt: Eclipse Tutorial Screenshot 3
:align: center :align: center
...@@ -55,28 +55,28 @@ Making a project ...@@ -55,28 +55,28 @@ Making a project
* Right click on **DisplayImage** (in the Navigator). **New -> Folder** . * Right click on **DisplayImage** (in the Navigator). **New -> Folder** .
.. image:: images/Eclipse_Tutorial_Screenshot-4.png .. image:: images/a4.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 4 :alt: Eclipse Tutorial Screenshot 4
:align: center :align: center
* Name your folder **src** and then hit **Finish** * Name your folder **src** and then hit **Finish**
.. image:: images/Eclipse_Tutorial_Screenshot-5.png .. image:: images/a5.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 5 :alt: Eclipse Tutorial Screenshot 5
:align: center :align: center
* Right click on your newly created **src** folder. Choose **New source file**: * Right click on your newly created **src** folder. Choose **New source file**:
.. image:: images/Eclipse_Tutorial_Screenshot-6.png .. image:: images/a6.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 6 :alt: Eclipse Tutorial Screenshot 6
:align: center :align: center
* Call it **DisplayImage.cpp**. Hit **Finish** * Call it **DisplayImage.cpp**. Hit **Finish**
.. image:: images/Eclipse_Tutorial_Screenshot-7.png .. image:: images/a7.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 7 :alt: Eclipse Tutorial Screenshot 7
:align: center :align: center
...@@ -114,7 +114,7 @@ Making a project ...@@ -114,7 +114,7 @@ Making a project
* *
Go to **Project-->Properties** Go to **Project-->Properties**
.. image:: images/Eclipse_Tutorial_Screenshot-8.png .. image:: images/a8.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 8 :alt: Eclipse Tutorial Screenshot 8
:align: center :align: center
...@@ -125,7 +125,7 @@ Making a project ...@@ -125,7 +125,7 @@ Making a project
a. a.
In **GCC C++ Compiler**, go to **Includes**. In **Include paths(-l)** you should include the path of the folder where opencv was installed. In our example, this is ``/usr/local/include/opencv``. In **GCC C++ Compiler**, go to **Includes**. In **Include paths(-l)** you should include the path of the folder where opencv was installed. In our example, this is ``/usr/local/include/opencv``.
.. image:: images/Eclipse_Tutorial_Screenshot-9.png .. image:: images/a9.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 9 :alt: Eclipse Tutorial Screenshot 9
:align: center :align: center
...@@ -147,15 +147,27 @@ Making a project ...@@ -147,15 +147,27 @@ Making a project
b. b.
Now go to **GCC C++ Linker**,there you have to fill two spaces: Now go to **GCC C++ Linker**,there you have to fill two spaces:
* In **Library search path (-L)** you have to write the path to where the opencv libraries reside, in my case the path is: First in **Library search path (-L)** you have to write the path to where the opencv libraries reside, in my case the path is:
:: ::
/usr/local/lib /usr/local/lib
.. Then in **Libraries(-l)** add the OpenCV libraries that you may need. Usually just the 3 first on the list below are enough (for simple applications) . In my case, I am putting all of them since I plan to use the whole bunch:
* * In **Libraries(-l)** add the OpenCV libraries that you may need. Usually just the 3 first on the list below are enough (for simple applications) . In my case, I am putting all of them since I plan to use the whole bunch:
In **Libraries(-l)** add the OpenCV libraries that you may need. Usually just the 3 first on the list below are enough (for simple applications) . In my case, I am putting all of them since I plan to use the whole bunch:
opencv_core
opencv_imgproc
opencv_highgui
opencv_ml
opencv_video
opencv_features2d
opencv_calib3d
opencv_objdetect
opencv_contrib
opencv_legacy
opencv_flann
* opencv_core * opencv_core
...@@ -174,26 +186,39 @@ Making a project ...@@ -174,26 +186,39 @@ Making a project
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 10 :alt: Eclipse Tutorial Screenshot 10
:align: center :align: center
.. image:: images/a10.png
:height: 400px
:alt: Eclipse Tutorial Screenshot 10
:align: center
.. note:: .. note::
If you don't know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in **Terminal**:
If you don't know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in **Terminal**: If you don't know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in **Terminal**:
.. code-block:: bash
.. code-block:: bash .. code-block:: bash
pkg-config --libs opencv pkg-config --libs opencv
pkg-config --libs opencv
My output (in case you want to check) was:
My output (in case you want to check) was: My output (in case you want to check) was:
.. code-block:: bash
.. code-block:: bash .. code-block:: bash
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann -L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
Now you are done. Click **OK** Now you are done. Click **OK**
* Your project should be ready to be built. For this, go to **Project->Build all** * Your project should be ready to be built. For this, go to **Project->Build all**
.. image:: images/Eclipse_Tutorial_Screenshot-11.png .. image:: images/Eclipse_Tutorial_Screenshot-11.png
.. image:: images/a11.png
:height: 400px :height: 400px
:alt: Eclipse Tutorial Screenshot 11 :alt: Eclipse Tutorial Screenshot 11
:align: center :align: center
...@@ -201,6 +226,7 @@ Making a project ...@@ -201,6 +226,7 @@ Making a project
In the Console you should get something like In the Console you should get something like
.. image:: images/Eclipse_Tutorial_Screenshot-12.png .. image:: images/Eclipse_Tutorial_Screenshot-12.png
.. image:: images/a12.png
:height: 200px :height: 200px
:alt: Eclipse Tutorial Screenshot 12 :alt: Eclipse Tutorial Screenshot 12
:align: center :align: center
...@@ -218,12 +244,14 @@ So, now we have an executable ready to run. If we were to use the Terminal, we w ...@@ -218,12 +244,14 @@ So, now we have an executable ready to run. If we were to use the Terminal, we w
cd src cd src
./DisplayImage ../images/HappyLittleFish.jpg ./DisplayImage ../images/HappyLittleFish.jpg
Assuming that the image to use as the argument would be located in <DisplayImage_directory>/images/HappyLittleFish.jpg. We can still do this, but let's do it from Eclipse: Assuming that the image to use as the argument would be located in <DisplayImage_directory>/images/HappyLittleFish.jpg. We can still do this, but let's do it from Eclipse:
#. Go to **Run->Run Configurations** #. Go to **Run->Run Configurations**
.. image:: images/Eclipse_Tutorial_Screenshot-13.png .. image:: images/Eclipse_Tutorial_Screenshot-13.png
.. image:: images/a13.png
:height: 300px :height: 300px
:alt: Eclipse Tutorial Screenshot 13 :alt: Eclipse Tutorial Screenshot 13
:align: center :align: center
...@@ -233,6 +261,7 @@ Assuming that the image to use as the argument would be located in <DisplayImage ...@@ -233,6 +261,7 @@ Assuming that the image to use as the argument would be located in <DisplayImage
#. Now, in the right side of the window, choose the **Arguments** Tab. Write the path of the image file we want to open (path relative to the workspace/DisplayImage folder). Let's use **HappyLittleFish.jpg**: #. Now, in the right side of the window, choose the **Arguments** Tab. Write the path of the image file we want to open (path relative to the workspace/DisplayImage folder). Let's use **HappyLittleFish.jpg**:
.. image:: images/Eclipse_Tutorial_Screenshot-14.png .. image:: images/Eclipse_Tutorial_Screenshot-14.png
.. image:: images/a14.png
:height: 300px :height: 300px
:alt: Eclipse Tutorial Screenshot 14 :alt: Eclipse Tutorial Screenshot 14
:align: center :align: center
...@@ -240,8 +269,10 @@ Assuming that the image to use as the argument would be located in <DisplayImage ...@@ -240,8 +269,10 @@ Assuming that the image to use as the argument would be located in <DisplayImage
#. Click on the **Apply** button and then in Run. An OpenCV window should pop up with the fish image (or whatever you used). #. Click on the **Apply** button and then in Run. An OpenCV window should pop up with the fish image (or whatever you used).
.. image:: images/Eclipse_Tutorial_Screenshot-15.png .. image:: images/Eclipse_Tutorial_Screenshot-15.png
.. image:: images/a15.png
:alt: Eclipse Tutorial Screenshot 15 :alt: Eclipse Tutorial Screenshot 15
:align: center :align: center
#. Congratulations! You are ready to have fun with OpenCV using Eclipse. #. Congratulations! You are ready to have fun with OpenCV using Eclipse.
#. Congratulations! You are ready to have fun with OpenCV using Eclipse.
...@@ -81,4 +81,3 @@ You should get a nice window as the one shown below: ...@@ -81,4 +81,3 @@ You should get a nice window as the one shown below:
.. image:: images/GCC_CMake_Example_Tutorial.png .. image:: images/GCC_CMake_Example_Tutorial.png
:alt: Display Image - Lena :alt: Display Image - Lena
:align: center :align: center
...@@ -15,7 +15,7 @@ Goals ...@@ -15,7 +15,7 @@ Goals
In this tutorial you will learn how to: In this tutorial you will learn how to:
* Load an image using :imread:`imread <> ` * Load an image using :imread:`imread <>`
* Transform an image from RGB to Grayscale format by using :cvt_color:`cvtColor <>` * Transform an image from RGB to Grayscale format by using :cvt_color:`cvtColor <>`
* Save your transformed image in a file on disk (using :imwrite:`imwrite <>`) * Save your transformed image in a file on disk (using :imwrite:`imwrite <>`)
......
...@@ -2,4 +2,62 @@ ...@@ -2,4 +2,62 @@
Installation in Windows Installation in Windows
*********************** ***********************
For now this is just a stub article. It will be updated with valuable content as soon as possible. Make sure to check back for it!
The description here was tested by the author using the Windows 7 SP1 **o**\ perating **s**\ ystem (OS). Nevertheless, it should also work on any other Windows OS too. If you encounter errors after following the steps described here feel free to contact us via our :opencv_group:`user group <>` and we will try to fix your problem.
.. note:: To use the OpenCV library you have two options:
.. container:: enumeratevisibleitems
- download and install our pre-built libraries
- make your own ones from the source files.
While the first one is easier to complete, it only works if you are coding inside the latest Microsoft Visual Studio integrated development environments and doesn't takes advantage of the most novel technologies we integrate into our library.
Installation by using the pre-built libraries
=============================================
1. Open up a web browser and go to: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
#. Open the folder for the latest version (currently this is 2.3).
#. Choose a build you want to use and download it. The naming conventions used will show what kind of support they offer. For example:
.. container:: enumeratevisibleitems
* *vs2010* means the Visual Studio
* *win32* means that it is for 32 bit applications in the OS
* *gpu* means that it includes the support for using your GPU in order to further increase the performance of the library).
If you downloaded the source files present here see :ref:`CppTutWindowsMakeOwn`.
#. Make sure you have admin rights. Start the setup and follow the wizard. Agree to the \" License Agreement \" .
#. Adding the OpenCV library to the system path is a good decision unless you want to play around with multiple flavors of the same OpenCV version. You will use the OpenCV library in form of *\"Dynamic-link library\"* (also known as **DLL**). Inside these are stored all the algorithms and information the OpenCV library contains. The operating system will load them only on demand during runtime. However, to do this he needs to know where they are. The systems **PATH** contains a list of folders where DLLs can be found. Add the OpenCV library path to this and the OS will know of the existence of the OpenCV binaries. Otherwise you will need to copy the used DLLs right beside the applications executable file (*exe*) for the OS to find it.
.. note::
A good way to check your systems path folders is by using the \"*Path Editor*\" application. You can download it `from here <http://www.redfernplace.com/software-projects/patheditor/>`_. Use this if you are not sure the systems path was updated with the OpenCV entry. You can also add manually new folders to the system path by using this application.
#. Most of the time it is a good idea to install the source files as this will allow for you to debug into the OpenCV library, if it is necessary. Therefore, just follow the default settings of the wizard and finish the installation.
#. In the end you can check the installation at the chosen path. If you added the OpenCV Path to the system PATH inside the *Path Editor* you should see an entry with the *bin* folder of the OpenCV directory.
.. image:: images/OpenCV_Install_Directory.png
:alt: An example of how the installation directory should look in case of success.
:align: center
Szia.
.. _CppTutWindowsMakeOwn:
Installation by making your own libraries
=========================================
If you are building your own libraries you can either take the source files from our latest:
.. container:: enumeratevisibleitems
+ stable/tested build - https://code.ros.org/svn/opencv/branches/
+ development build - https://code.ros.org/svn/opencv/trunk/
While the later one may contain a couple of new and experimental algorithms, performance increases and interface improvements be aware that it may also contain many-many bugs. Using the first one is recommended in most of the cases, unless you are extending the OpenCV library itself or really need to most up to date version of it.
############
Tutorials Tutorials
########### ###########
......
...@@ -14,7 +14,7 @@ Matching keypoints ...@@ -14,7 +14,7 @@ Matching keypoints
================== ==================
The code The code
------- --------
We will start with a short sample ``opencv/samples/cpp/matcher_simple.cpp``: :: We will start with a short sample ``opencv/samples/cpp/matcher_simple.cpp``: ::
Mat img1 = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE); Mat img1 = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);
......
...@@ -10,9 +10,6 @@ Welcome to opencv documentation! ...@@ -10,9 +10,6 @@ Welcome to opencv documentation!
:maxdepth: 2 :maxdepth: 2
modules/refman.rst modules/refman.rst
doc/opencv2/py/py_index.rst
doc/opencv1/c/c_index.rst
doc/opencv1/py/py_index.rst
doc/user_guide/user_guide.rst doc/user_guide/user_guide.rst
doc/tutorials/tutorials.rst doc/tutorials/tutorials.rst
......
...@@ -34,6 +34,7 @@ where: ...@@ -34,6 +34,7 @@ where:
* :math:`A` is a camera matrix, or a matrix of intrinsic parameters * :math:`A` is a camera matrix, or a matrix of intrinsic parameters
* :math:`(cx, cy)` is a principal point that is usually at the image center * :math:`(cx, cy)` is a principal point that is usually at the image center
* :math:`fx, fy` are the focal lengths expressed in pixel-related units * :math:`fx, fy` are the focal lengths expressed in pixel-related units
Thus, if an image from the camera is Thus, if an image from the camera is
scaled by a factor, all of these parameters should scaled by a factor, all of these parameters should
be scaled (multiplied/divided, respectively) by the same factor. The be scaled (multiplied/divided, respectively) by the same factor. The
...@@ -1205,8 +1206,7 @@ stereoCalibrate ...@@ -1205,8 +1206,7 @@ stereoCalibrate
:param imagePoints2: Vector of vectors of the projections of the calibration pattern points, observed by the second camera. :param imagePoints2: Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
:param cameraMatrix1: Input/output first camera matrix: :math:`\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}` , :param cameraMatrix1: Input/output first camera matrix: :math:`\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}` , :math:`j = 0,\, 1` . If any of ``CV_CALIB_USE_INTRINSIC_GUESS`` , ``CV_CALIB_FIX_ASPECT_RATIO`` , ``CV_CALIB_FIX_INTRINSIC`` , or ``CV_CALIB_FIX_FOCAL_LENGTH`` are specified, some or all of the matrix components must be initialized. See the flags description for details.
:math:`j = 0,\, 1` . If any of ``CV_CALIB_USE_INTRINSIC_GUESS`` , ``CV_CALIB_FIX_ASPECT_RATIO`` , ``CV_CALIB_FIX_INTRINSIC`` , or ``CV_CALIB_FIX_FOCAL_LENGTH`` are specified, some or all of the matrix components must be initialized. See the flags description for details.
:param distCoeffs1: Input/output vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. The output vector length depends on the flags. :param distCoeffs1: Input/output vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. The output vector length depends on the flags.
...@@ -1391,6 +1391,6 @@ The function computes the rectification transformations without knowing intrinsi ...@@ -1391,6 +1391,6 @@ The function computes the rectification transformations without knowing intrinsi
.. [BouguetMCT] J.Y.Bouguet. MATLAB calibration tool. http://www.vision.caltech.edu/bouguetj/calib_doc/ .. [BouguetMCT] J.Y.Bouguet. MATLAB calibration tool. http://www.vision.caltech.edu/bouguetj/calib_doc/
.. [Hartley99] Hartley, R.I., “Theory and Practice of Projective Rectification”. IJCV 35 2, pp 115-127 (1999) .. [Hartley99] Hartley, R.I., “Theory and Practice of Projective Rectification”. IJCV 35 2, pp 115-127 (1999)
.. [Zhang2000] Z. Zhang. A Flexible New Technique for Camera Calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330-1334, 2000. .. [Zhang2000] Z. Zhang. A Flexible New Technique for Camera Calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330-1334, 2000.
...@@ -303,6 +303,8 @@ The static method ``Range::all()`` returns a special variable that means "the wh ...@@ -303,6 +303,8 @@ The static method ``Range::all()`` returns a special variable that means "the wh
} }
.. _Ptr:
Ptr Ptr
--- ---
.. ocv:class:: Ptr .. ocv:class:: Ptr
...@@ -955,6 +957,8 @@ so that the destination matrix is reallocated if needed. While ``m.copyTo(m);`` ...@@ -955,6 +957,8 @@ so that the destination matrix is reallocated if needed. While ``m.copyTo(m);``
When the operation mask is specified, and the ``Mat::create`` call shown above reallocated the matrix, the newly allocated matrix is initialized with all zeros before copying the data. When the operation mask is specified, and the ``Mat::create`` call shown above reallocated the matrix, the newly allocated matrix is initialized with all zeros before copying the data.
.. _Mat::convertTo:
Mat::convertTo Mat::convertTo
------------------ ------------------
.. ocv:function:: void Mat::convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const .. ocv:function:: void Mat::convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const
...@@ -1728,7 +1732,7 @@ To use ``Mat_`` for multi-channel images/matrices, pass ``Vec`` as a ``Mat_`` pa ...@@ -1728,7 +1732,7 @@ To use ``Mat_`` for multi-channel images/matrices, pass ``Vec`` as a ``Mat_`` pa
NAryMatIterator NAryMatIterator
-------------- ---------------
.. ocv:class:: NAryMatIterator .. ocv:class:: NAryMatIterator
n-ary multi-dimensional array iterator. :: n-ary multi-dimensional array iterator. ::
......
...@@ -76,4 +76,4 @@ http://en.wikipedia.org/wiki/Disjoint-set_data_structure ...@@ -76,4 +76,4 @@ http://en.wikipedia.org/wiki/Disjoint-set_data_structure
. The function . The function
returns the number of equivalency classes. returns the number of equivalency classes.
.. [Arthur2007] Arthur and S. Vassilvitskii “k-means++: the advantages of careful seeding”, Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 2007 .. [Arthur2007] Arthur and S. Vassilvitskii “k-means++: the advantages of careful seeding”, Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 2007
...@@ -34,7 +34,7 @@ Draws a circle. ...@@ -34,7 +34,7 @@ Draws a circle.
.. ocv:pyfunction:: cv2.circle(img, center, radius, color[, thickness[, lineType[, shift]]]) -> None .. ocv:pyfunction:: cv2.circle(img, center, radius, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:cfunction:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.Circle(img, center, radius, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.Circle(img, center, radius, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image where the circle is drawn. :param img: Image where the circle is drawn.
...@@ -63,7 +63,7 @@ Clips the line against the image rectangle. ...@@ -63,7 +63,7 @@ Clips the line against the image rectangle.
.. ocv:pyfunction:: cv2.clipLine(imgRect, pt1, pt2) -> retval, pt1, pt2 .. ocv:pyfunction:: cv2.clipLine(imgRect, pt1, pt2) -> retval, pt1, pt2
.. ocv:cfunction:: int cvClipLine( CvSize imgSize, CvPoint* pt1, CvPoint* pt2 ) .. ocv:function:: int cvClipLine( CvSize imgSize, CvPoint* pt1, CvPoint* pt2 )
.. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (clippedPt1, clippedPt2) .. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (clippedPt1, clippedPt2)
:param imgSize: Image size. The image rectangle is ``Rect(0, 0, imgSize.width, imgSize.height)`` . :param imgSize: Image size. The image rectangle is ``Rect(0, 0, imgSize.width, imgSize.height)`` .
...@@ -88,10 +88,10 @@ Draws a simple or thick elliptic arc or fills an ellipse sector. ...@@ -88,10 +88,10 @@ Draws a simple or thick elliptic arc or fills an ellipse sector.
.. ocv:pyfunction:: cv2.ellipse(img, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]]) -> None .. ocv:pyfunction:: cv2.ellipse(img, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:pyfunction:: cv2.ellipse(img, box, color[, thickness[, lineType]]) -> None .. ocv:pyfunction:: cv2.ellipse(img, box, color[, thickness[, lineType]]) -> None
.. ocv:cfunction:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double startAngle, double endAngle, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double startAngle, double endAngle, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.Ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.Ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness=1, lineType=8, shift=0)-> None
.. ocv:cfunction:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
...@@ -161,7 +161,7 @@ Fills a convex polygon. ...@@ -161,7 +161,7 @@ Fills a convex polygon.
.. ocv:pyfunction:: cv2.fillConvexPoly(img, points, color[, lineType[, shift]]) -> None .. ocv:pyfunction:: cv2.fillConvexPoly(img, points, color[, lineType[, shift]]) -> None
.. ocv:cfunction:: void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts, CvScalar color, int lineType=8, int shift=0 ) .. ocv:function:: void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts, CvScalar color, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
...@@ -190,7 +190,7 @@ Fills the area bounded by one or more polygons. ...@@ -190,7 +190,7 @@ Fills the area bounded by one or more polygons.
.. ocv:pyfunction:: cv2.fillPoly(img, pts, color[, lineType[, shift[, offset]]]) -> None .. ocv:pyfunction:: cv2.fillPoly(img, pts, color[, lineType[, shift[, offset]]]) -> None
.. ocv:cfunction:: void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0 ) .. ocv:function:: void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
...@@ -220,7 +220,7 @@ Calculates the width and height of a text string. ...@@ -220,7 +220,7 @@ Calculates the width and height of a text string.
.. ocv:pyfunction:: cv2.getTextSize(text, fontFace, fontScale, thickness) -> retval, baseLine .. ocv:pyfunction:: cv2.getTextSize(text, fontFace, fontScale, thickness) -> retval, baseLine
.. ocv:cfunction:: void cvGetTextSize( const char* textString, const CvFont* font, CvSize* textSize, int* baseline ) .. ocv:function:: void cvGetTextSize( const char* textString, const CvFont* font, CvSize* textSize, int* baseline )
.. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline) .. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline)
:param text: Input text string. :param text: Input text string.
...@@ -271,7 +271,7 @@ InitFont ...@@ -271,7 +271,7 @@ InitFont
-------- --------
Initializes font structure (OpenCV 1.x API). Initializes font structure (OpenCV 1.x API).
.. cfunction:: void cvInitFont( CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8 ) .. c:function:: void cvInitFont( CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8 )
:param font: Pointer to the font structure initialized by the function :param font: Pointer to the font structure initialized by the function
...@@ -315,6 +315,7 @@ The function initializes the font structure that can be passed to text rendering ...@@ -315,6 +315,7 @@ The function initializes the font structure that can be passed to text rendering
.. seealso:: :ocv:cfunc:`PutText` .. seealso:: :ocv:cfunc:`PutText`
.. _Line:
line line
-------- --------
...@@ -324,7 +325,7 @@ Draws a line segment connecting two points. ...@@ -324,7 +325,7 @@ Draws a line segment connecting two points.
.. ocv:pyfunction:: cv2.line(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None .. ocv:pyfunction:: cv2.line(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:cfunction:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
...@@ -405,7 +406,7 @@ Draws a simple, thick, or filled up-right rectangle. ...@@ -405,7 +406,7 @@ Draws a simple, thick, or filled up-right rectangle.
.. ocv:pyfunction:: cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None .. ocv:pyfunction:: cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:cfunction:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
...@@ -436,7 +437,7 @@ Draws several polygonal curves. ...@@ -436,7 +437,7 @@ Draws several polygonal curves.
.. ocv:pyfunction:: cv2.polylines(img, pts, isClosed, color[, thickness[, lineType[, shift]]]) -> None .. ocv:pyfunction:: cv2.polylines(img, pts, isClosed, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:cfunction:: void cvPolyLine( CvArr* img, CvPoint** pts, int* npts, int contours, int isClosed, CvScalar color, int thickness=1, int lineType=8, int shift=0 ) .. ocv:function:: void cvPolyLine( CvArr* img, CvPoint** pts, int* npts, int contours, int isClosed, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: cv.PolyLine(img, polys, isClosed, color, thickness=1, lineType=8, shift=0)-> None .. ocv:pyoldfunction:: cv.PolyLine(img, polys, isClosed, color, thickness=1, lineType=8, shift=0)-> None
...@@ -470,7 +471,7 @@ Draws a text string. ...@@ -470,7 +471,7 @@ Draws a text string.
.. ocv:pyfunction:: cv2.putText(img, text, org, fontFace, fontScale, color[, thickness[, linetype[, bottomLeftOrigin]]]) -> None .. ocv:pyfunction:: cv2.putText(img, text, org, fontFace, fontScale, color[, thickness[, linetype[, bottomLeftOrigin]]]) -> None
.. ocv:cfunction:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color ) .. ocv:function:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
.. ocv:pyoldfunction:: cv.PutText(img, text, org, font, color)-> None .. ocv:pyoldfunction:: cv.PutText(img, text, org, font, color)-> None
:param img: Image. :param img: Image.
......
...@@ -175,6 +175,7 @@ Multi-channel (``n``-channel) types can be specified using the following options ...@@ -175,6 +175,7 @@ Multi-channel (``n``-channel) types can be specified using the following options
* ``CV_8UC(n)`` ... ``CV_64FC(n)`` or ``CV_MAKETYPE(CV_8U, n)`` ... ``CV_MAKETYPE(CV_64F, n)`` macros when the number of channels is more than 4 or unknown at the compilation time. * ``CV_8UC(n)`` ... ``CV_64FC(n)`` or ``CV_MAKETYPE(CV_8U, n)`` ... ``CV_MAKETYPE(CV_64F, n)`` macros when the number of channels is more than 4 or unknown at the compilation time.
.. note:: ``CV_32FC1 == CV_32F``, ``CV_32FC2 == CV_32FC(2) == CV_MAKETYPE(CV_32F, 2)``, and ``CV_MAKETYPE(depth, n) == ((x&7)<<3) + (n-1)``. This means that the constant type is formed from the ``depth``, taking the lowest 3 bits, and the number of channels minus 1, taking the next ``log2(CV_CN_MAX)`` bits. .. note:: ``CV_32FC1 == CV_32F``, ``CV_32FC2 == CV_32FC(2) == CV_MAKETYPE(CV_32F, 2)``, and ``CV_MAKETYPE(depth, n) == ((x&7)<<3) + (n-1)``. This means that the constant type is formed from the ``depth``, taking the lowest 3 bits, and the number of channels minus 1, taking the next ``log2(CV_CN_MAX)`` bits.
Examples:: Examples::
Mat mtx(3, 3, CV_32F); // make a 3x3 floating-point matrix Mat mtx(3, 3, CV_32F); // make a 3x3 floating-point matrix
......
...@@ -268,7 +268,7 @@ The function deallocates the buffer allocated with :ocv:func:`fastMalloc` . If N ...@@ -268,7 +268,7 @@ The function deallocates the buffer allocated with :ocv:func:`fastMalloc` . If N
format format
---------- ------
Returns a text string formatted using the ``printf`` -like expression. Returns a text string formatted using the ``printf`` -like expression.
.. ocv:function:: string format( const char* fmt, ... ) .. ocv:function:: string format( const char* fmt, ... )
...@@ -289,8 +289,8 @@ Returns the number of threads used by OpenCV. ...@@ -289,8 +289,8 @@ Returns the number of threads used by OpenCV.
The function returns the number of threads that is used by OpenCV. The function returns the number of threads that is used by OpenCV.
.. seealso:: .. seealso::
:ocv:func:`setNumThreads`, :ocv:func:`setNumThreads`,
:ocv:func:`getThreadNum` :ocv:func:`getThreadNum`
...@@ -303,8 +303,8 @@ Returns the index of the currently executed thread. ...@@ -303,8 +303,8 @@ Returns the index of the currently executed thread.
The function returns a 0-based index of the currently executed thread. The function is only valid inside a parallel OpenMP region. When OpenCV is built without OpenMP support, the function always returns 0. The function returns a 0-based index of the currently executed thread. The function is only valid inside a parallel OpenMP region. When OpenCV is built without OpenMP support, the function always returns 0.
.. seealso:: .. seealso::
:ocv:func:`setNumThreads`, :ocv:func:`setNumThreads`,
:ocv:func:`getNumThreads` . :ocv:func:`getNumThreads` .
...@@ -388,8 +388,8 @@ Sets the number of threads used by OpenCV. ...@@ -388,8 +388,8 @@ Sets the number of threads used by OpenCV.
The function sets the number of threads used by OpenCV in parallel OpenMP regions. If ``nthreads=0`` , the function uses the default number of threads that is usually equal to the number of the processing cores. The function sets the number of threads used by OpenCV in parallel OpenMP regions. If ``nthreads=0`` , the function uses the default number of threads that is usually equal to the number of the processing cores.
.. seealso:: .. seealso::
:ocv:func:`getNumThreads`, :ocv:func:`getNumThreads`,
:ocv:func:`getThreadNum` :ocv:func:`getThreadNum`
......
...@@ -94,6 +94,7 @@ BOWKMeansTrainer ...@@ -94,6 +94,7 @@ BOWKMeansTrainer
BOWKMeansTrainer::BOWKMeansTrainer BOWKMeansTrainer::BOWKMeansTrainer
---------------------------------- ----------------------------------
The constructor. The constructor.
.. ocv:function:: BOWKMeansTrainer::BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS ); .. ocv:function:: BOWKMeansTrainer::BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS );
...@@ -193,6 +194,7 @@ Returns an image discriptor size if the vocabulary is set. Otherwise, it returns ...@@ -193,6 +194,7 @@ Returns an image discriptor size if the vocabulary is set. Otherwise, it returns
BOWImgDescriptorExtractor::descriptorType BOWImgDescriptorExtractor::descriptorType
--------------------------------------------- ---------------------------------------------
Returns an image descriptor type. Returns an image descriptor type.
.. ocv:function:: int BOWImgDescriptorExtractor::descriptorType() const .. ocv:function:: int BOWImgDescriptorExtractor::descriptorType() const
......
...@@ -37,6 +37,7 @@ Lightweight class encapsulating pitched memory on a GPU and passed to nvcc-compi ...@@ -37,6 +37,7 @@ Lightweight class encapsulating pitched memory on a GPU and passed to nvcc-compi
typedef DevMem2D_<unsigned char> DevMem2D; typedef DevMem2D_<unsigned char> DevMem2D;
typedef DevMem2D_<float> DevMem2Df; typedef DevMem2D_<float> DevMem2Df;
typedef DevMem2D_<int> DevMem2Di; typedef DevMem2D_<int> DevMem2Di;
.. ..
...@@ -108,6 +109,7 @@ Base storage class for GPU memory with reference counting. Its interface matches ...@@ -108,6 +109,7 @@ Base storage class for GPU memory with reference counting. Its interface matches
Beware that the latter limitation may lead to overloaded matrix operators that cause memory allocations. The ``GpuMat`` class is convertible to :ocv:class:`gpu::DevMem2D_` and :ocv:class:`gpu::PtrStep_` so it can be passed directly to the kernel. Beware that the latter limitation may lead to overloaded matrix operators that cause memory allocations. The ``GpuMat`` class is convertible to :ocv:class:`gpu::DevMem2D_` and :ocv:class:`gpu::PtrStep_` so it can be passed directly to the kernel.
.. note:: In contrast with :ocv:class:`Mat`, in most cases ``GpuMat::isContinuous() == false`` . This means that rows are aligned to a size depending on the hardware. Single-row ``GpuMat`` is always a continuous matrix. .. note:: In contrast with :ocv:class:`Mat`, in most cases ``GpuMat::isContinuous() == false`` . This means that rows are aligned to a size depending on the hardware. Single-row ``GpuMat`` is always a continuous matrix.
:: ::
class CV_EXPORTS GpuMat class CV_EXPORTS GpuMat
...@@ -147,7 +149,7 @@ Beware that the latter limitation may lead to overloaded matrix operators that c ...@@ -147,7 +149,7 @@ Beware that the latter limitation may lead to overloaded matrix operators that c
You are not recommended to leave static or global ``GpuMat`` variables allocated, that is, to rely on its destructor. The destruction order of such variables and CUDA context is undefined. GPU memory release function returns error if the CUDA context has been destroyed before. You are not recommended to leave static or global ``GpuMat`` variables allocated, that is, to rely on its destructor. The destruction order of such variables and CUDA context is undefined. GPU memory release function returns error if the CUDA context has been destroyed before.
.. seealso:: .. seealso::
:ocv:class:`Mat` :ocv:class:`Mat`
.. index:: gpu::CudaMem .. index:: gpu::CudaMem
...@@ -166,8 +168,8 @@ Class with reference counting wrapping special memory type allocation functions ...@@ -166,8 +168,8 @@ Class with reference counting wrapping special memory type allocation functions
``ALLOC_WRITE_COMBINED`` sets the write combined buffer that is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache utilization. ``ALLOC_WRITE_COMBINED`` sets the write combined buffer that is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache utilization.
.. note:: .. note::
Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2 Pinned Memory APIs* document or *CUDA C Programming Guide*. Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2 Pinned Memory APIs* document or *CUDA C Programming Guide*.
:: ::
class CV_EXPORTS CudaMem class CV_EXPORTS CudaMem
...@@ -235,8 +237,8 @@ gpu::Stream ...@@ -235,8 +237,8 @@ gpu::Stream
This class encapsulates a queue of asynchronous calls. Some functions have overloads with the additional ``gpu::Stream`` parameter. The overloads do initialization work (allocate output buffers, upload constants, and so on), start the GPU kernel, and return before results are ready. You can check whether all operations are complete via :ocv:func:`gpu::Stream::queryIfComplete`. You can asynchronously upload/download data from/to page-locked buffers, using the :ocv:class:`gpu::CudaMem` or :ocv:class:`Mat` header that points to a region of :ocv:class:`gpu::CudaMem`. This class encapsulates a queue of asynchronous calls. Some functions have overloads with the additional ``gpu::Stream`` parameter. The overloads do initialization work (allocate output buffers, upload constants, and so on), start the GPU kernel, and return before results are ready. You can check whether all operations are complete via :ocv:func:`gpu::Stream::queryIfComplete`. You can asynchronously upload/download data from/to page-locked buffers, using the :ocv:class:`gpu::CudaMem` or :ocv:class:`Mat` header that points to a region of :ocv:class:`gpu::CudaMem`.
.. note:: .. note::
Currently, you may face problems if an operation is enqueued twice with different data. Some functions use the constant GPU memory, and next call may update the memory before the previous one has been finished. But calling different operations asynchronously is safe because each operation has its own constant buffer. Memory copy/upload/download/set operations to the buffers you hold are also safe. Currently, you may face problems if an operation is enqueued twice with different data. Some functions use the constant GPU memory, and next call may update the memory before the previous one has been finished. But calling different operations asynchronously is safe because each operation has its own constant buffer. Memory copy/upload/download/set operations to the buffers you hold are also safe.
:: ::
class CV_EXPORTS Stream class CV_EXPORTS Stream
......
...@@ -97,7 +97,7 @@ The ``descriptors`` matrix is :math:`\texttt{nFeatures} \times \texttt{descripto ...@@ -97,7 +97,7 @@ The ``descriptors`` matrix is :math:`\texttt{nFeatures} \times \texttt{descripto
The class ``SURF_GPU`` uses some buffers and provides access to it. All buffers can be safely released between function calls. The class ``SURF_GPU`` uses some buffers and provides access to it. All buffers can be safely released between function calls.
.. seealso:: .. seealso::
:ocv:class:`SURF` :ocv:class:`SURF`
.. index:: gpu::BruteForceMatcher_GPU .. index:: gpu::BruteForceMatcher_GPU
...@@ -193,8 +193,8 @@ Brute-force descriptor matcher. For each descriptor in the first set, this match ...@@ -193,8 +193,8 @@ Brute-force descriptor matcher. For each descriptor in the first set, this match
The class ``BruteForceMatcher_GPU`` has an interface similar to the class :ocv:class:`DescriptorMatcher`. It has two groups of ``match`` methods: for matching descriptors of one image with another image or with an image set. Also, all functions have an alternative to save results either to the GPU memory or to the CPU memory. The ``Distance`` template parameter is kept for CPU/GPU interfaces similarity. ``BruteForceMatcher_GPU`` supports only the ``L1<float>``, ``L2<float>``, and ``Hamming`` distance types. The class ``BruteForceMatcher_GPU`` has an interface similar to the class :ocv:class:`DescriptorMatcher`. It has two groups of ``match`` methods: for matching descriptors of one image with another image or with an image set. Also, all functions have an alternative to save results either to the GPU memory or to the CPU memory. The ``Distance`` template parameter is kept for CPU/GPU interfaces similarity. ``BruteForceMatcher_GPU`` supports only the ``L1<float>``, ``L2<float>``, and ``Hamming`` distance types.
.. seealso:: .. seealso::
:ocv:class:`DescriptorMatcher`, :ocv:class:`DescriptorMatcher`,
:ocv:class:`BruteForceMatcher` :ocv:class:`BruteForceMatcher`
.. index:: gpu::BruteForceMatcher_GPU::match .. index:: gpu::BruteForceMatcher_GPU::match
...@@ -207,7 +207,7 @@ gpu::BruteForceMatcher_GPU::match ...@@ -207,7 +207,7 @@ gpu::BruteForceMatcher_GPU::match
Finds the best match for each descriptor from a query set with train descriptors. Finds the best match for each descriptor from a query set with train descriptors.
.. seealso:: .. seealso::
:ocv:func:`DescriptorMatcher::match` :ocv:func:`DescriptorMatcher::match`
.. index:: gpu::BruteForceMatcher_GPU::matchSingle .. index:: gpu::BruteForceMatcher_GPU::matchSingle
...@@ -279,7 +279,7 @@ gpu::BruteForceMatcher_GPU::knnMatch ...@@ -279,7 +279,7 @@ gpu::BruteForceMatcher_GPU::knnMatch
.. ocv:function:: void knnMatch(const GpuMat& queryDescs, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false ) .. ocv:function:: void knnMatch(const GpuMat& queryDescs, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false )
.. seealso:: .. seealso::
:ocv:func:`DescriptorMatcher::knnMatch` :ocv:func:`DescriptorMatcher::knnMatch`
.. index:: gpu::BruteForceMatcher_GPU::knnMatch .. index:: gpu::BruteForceMatcher_GPU::knnMatch
...@@ -320,7 +320,7 @@ gpu::BruteForceMatcher_GPU::radiusMatch ...@@ -320,7 +320,7 @@ gpu::BruteForceMatcher_GPU::radiusMatch
This function works only on devices with the compute capability :math:`>=` 1.1. This function works only on devices with the compute capability :math:`>=` 1.1.
.. seealso:: .. seealso::
:ocv:func:`DescriptorMatcher::radiusMatch` :ocv:func:`DescriptorMatcher::radiusMatch`
.. index:: gpu::BruteForceMatcher_GPU::radiusMatch .. index:: gpu::BruteForceMatcher_GPU::radiusMatch
......
...@@ -115,17 +115,17 @@ By using ``FilterEngine_GPU`` instead of functions you can avoid unnecessary mem ...@@ -115,17 +115,17 @@ By using ``FilterEngine_GPU`` instead of functions you can avoid unnecessary mem
.. note:: The GPU filters do not support the in-place mode. .. note:: The GPU filters do not support the in-place mode.
.. seealso:: .. seealso::
:ocv:class:`gpu::BaseRowFilter_GPU`, :ocv:class:`gpu::BaseRowFilter_GPU`,
:ocv:class:`gpu::BaseColumnFilter_GPU`, :ocv:class:`gpu::BaseColumnFilter_GPU`,
:ocv:class:`gpu::BaseFilter_GPU`, :ocv:class:`gpu::BaseFilter_GPU`,
:ocv:func:`gpu::createFilter2D_GPU`, :ocv:func:`gpu::createFilter2D_GPU`,
:ocv:func:`gpu::createSeparableFilter_GPU`, :ocv:func:`gpu::createSeparableFilter_GPU`,
:ocv:func:`gpu::createBoxFilter_GPU`, :ocv:func:`gpu::createBoxFilter_GPU`,
:ocv:func:`gpu::createMorphologyFilter_GPU`, :ocv:func:`gpu::createMorphologyFilter_GPU`,
:ocv:func:`gpu::createLinearFilter_GPU`, :ocv:func:`gpu::createLinearFilter_GPU`,
:ocv:func:`gpu::createSeparableLinearFilter_GPU`, :ocv:func:`gpu::createSeparableLinearFilter_GPU`,
:ocv:func:`gpu::createDerivFilter_GPU`, :ocv:func:`gpu::createDerivFilter_GPU`,
:ocv:func:`gpu::createGaussianFilter_GPU` :ocv:func:`gpu::createGaussianFilter_GPU`
.. index:: gpu::createFilter2D_GPU .. index:: gpu::createFilter2D_GPU
......
...@@ -42,7 +42,7 @@ gpu::meanShiftProc ...@@ -42,7 +42,7 @@ gpu::meanShiftProc
:param criteria: Termination criteria. See :ocv:class:`TermCriteria`. :param criteria: Termination criteria. See :ocv:class:`TermCriteria`.
.. seealso:: .. seealso::
:ocv:func:`gpu::meanShiftFiltering` :ocv:func:`gpu::meanShiftFiltering`
.. index:: gpu::meanShiftSegmentation .. index:: gpu::meanShiftSegmentation
...@@ -81,7 +81,7 @@ gpu::integral ...@@ -81,7 +81,7 @@ gpu::integral
:param sqsum: Squared integral image of the ``CV_32FC1`` type. :param sqsum: Squared integral image of the ``CV_32FC1`` type.
.. seealso:: .. seealso::
:ocv:func:`integral` :ocv:func:`integral`
.. index:: gpu::sqrIntegral .. index:: gpu::sqrIntegral
...@@ -128,7 +128,7 @@ gpu::cornerHarris ...@@ -128,7 +128,7 @@ gpu::cornerHarris
:param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now. :param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now.
.. seealso:: .. seealso::
:ocv:func:`cornerHarris` :ocv:func:`cornerHarris`
.. index:: gpu::cornerMinEigenVal .. index:: gpu::cornerMinEigenVal
...@@ -173,7 +173,7 @@ gpu::mulSpectrums ...@@ -173,7 +173,7 @@ gpu::mulSpectrums
Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now. Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
.. seealso:: .. seealso::
:ocv:func:`mulSpectrums` :ocv:func:`mulSpectrums`
.. index:: gpu::mulAndScaleSpectrums .. index:: gpu::mulAndScaleSpectrums
...@@ -198,7 +198,7 @@ gpu::mulAndScaleSpectrums ...@@ -198,7 +198,7 @@ gpu::mulAndScaleSpectrums
Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now. Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
.. seealso:: .. seealso::
:ocv:func:`mulSpectrums` :ocv:func:`mulSpectrums`
.. index:: gpu::dft .. index:: gpu::dft
...@@ -237,7 +237,7 @@ gpu::dft ...@@ -237,7 +237,7 @@ gpu::dft
If the source matrix is real (its type is ``CV_32FC1`` ), forward DFT is performed. The result of the DFT is packed into complex ( ``CV_32FC2`` ) matrix. So, the width of the destination matrix is ``dft_size.width / 2 + 1`` . But if the source is a single column, the height is reduced instead of the width. If the source matrix is real (its type is ``CV_32FC1`` ), forward DFT is performed. The result of the DFT is packed into complex ( ``CV_32FC2`` ) matrix. So, the width of the destination matrix is ``dft_size.width / 2 + 1`` . But if the source is a single column, the height is reduced instead of the width.
.. seealso:: .. seealso::
:ocv:func:`dft` :ocv:func:`dft`
.. index:: gpu::convolve .. index:: gpu::convolve
...@@ -325,7 +325,7 @@ gpu::matchTemplate ...@@ -325,7 +325,7 @@ gpu::matchTemplate
* ``CV_TM_CCORR`` * ``CV_TM_CCORR``
.. seealso:: .. seealso::
:ocv:func:`matchTemplate` :ocv:func:`matchTemplate`
.. index:: gpu::remap .. index:: gpu::remap
...@@ -352,7 +352,7 @@ The function transforms the source image using the specified map: ...@@ -352,7 +352,7 @@ The function transforms the source image using the specified map:
Values of pixels with non-integer coordinates are computed using the bilinear interpolation. Values of pixels with non-integer coordinates are computed using the bilinear interpolation.
.. seealso:: .. seealso::
:ocv:func:`remap` :ocv:func:`remap`
.. index:: gpu::cvtColor .. index:: gpu::cvtColor
...@@ -377,7 +377,7 @@ gpu::cvtColor ...@@ -377,7 +377,7 @@ gpu::cvtColor
3-channel color spaces (like ``HSV``, ``XYZ``, and so on) can be stored in a 4-channel image for better perfomance. 3-channel color spaces (like ``HSV``, ``XYZ``, and so on) can be stored in a 4-channel image for better perfomance.
.. seealso:: .. seealso::
:ocv:func:`cvtColor` :ocv:func:`cvtColor`
.. index:: gpu::threshold .. index:: gpu::threshold
...@@ -402,7 +402,7 @@ gpu::threshold ...@@ -402,7 +402,7 @@ gpu::threshold
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`threshold` :ocv:func:`threshold`
.. index:: gpu::resize .. index:: gpu::resize
...@@ -458,7 +458,7 @@ gpu::warpAffine ...@@ -458,7 +458,7 @@ gpu::warpAffine
:param flags: Combination of interpolation methods (see :ocv:func:`resize`) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is an inverse transformation (``dst=>src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` interpolation methods are supported. :param flags: Combination of interpolation methods (see :ocv:func:`resize`) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is an inverse transformation (``dst=>src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` interpolation methods are supported.
.. seealso:: .. seealso::
:ocv:func:`warpAffine` :ocv:func:`warpAffine`
.. index:: gpu::warpPerspective .. index:: gpu::warpPerspective
...@@ -479,7 +479,7 @@ gpu::warpPerspective ...@@ -479,7 +479,7 @@ gpu::warpPerspective
:param flags: Combination of interpolation methods (see :ocv:func:`resize` ) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is the inverse transformation (``dst => src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` interpolation methods are supported. :param flags: Combination of interpolation methods (see :ocv:func:`resize` ) and the optional flag ``WARP_INVERSE_MAP`` specifying that ``M`` is the inverse transformation (``dst => src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` interpolation methods are supported.
.. seealso:: .. seealso::
:ocv:func:`warpPerspective` :ocv:func:`warpPerspective`
.. index:: gpu::rotate .. index:: gpu::rotate
...@@ -504,7 +504,7 @@ gpu::rotate ...@@ -504,7 +504,7 @@ gpu::rotate
:param interpolation: Interpolation method. Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` are supported. :param interpolation: Interpolation method. Only ``INTER_NEAREST``, ``INTER_LINEAR``, and ``INTER_CUBIC`` are supported.
.. seealso:: .. seealso::
:ocv:func:`gpu::warpAffine` :ocv:func:`gpu::warpAffine`
.. index:: gpu::copyMakeBorder .. index:: gpu::copyMakeBorder
...@@ -523,7 +523,7 @@ gpu::copyMakeBorder ...@@ -523,7 +523,7 @@ gpu::copyMakeBorder
:param value: Border value. :param value: Border value.
.. seealso:: .. seealso::
:ocv:func:`copyMakeBorder` :ocv:func:`copyMakeBorder`
.. index:: gpu::rectStdDev .. index:: gpu::rectStdDev
......
...@@ -49,7 +49,7 @@ The OpenCV GPU module follows the CUDA Runtime API conventions regarding the mul ...@@ -49,7 +49,7 @@ The OpenCV GPU module follows the CUDA Runtime API conventions regarding the mul
It is also possible to create the context explicitly using the CUDA Driver API, attach, and set the "current" context for all necessary threads. The CUDA Runtime API (and OpenCV functions, respectively) picks it up. It is also possible to create the context explicitly using the CUDA Driver API, attach, and set the "current" context for all necessary threads. The CUDA Runtime API (and OpenCV functions, respectively) picks it up.
Utilizing Multiple GPUs Utilizing Multiple GPUs
--------- -----------------------
In the current version, each of the OpenCV GPU algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs. Consider the following ways of utilizing multiple GPUs: In the current version, each of the OpenCV GPU algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs. Consider the following ways of utilizing multiple GPUs:
......
...@@ -18,7 +18,7 @@ gpu::meanStdDev ...@@ -18,7 +18,7 @@ gpu::meanStdDev
:param stddev: Standard deviation value. :param stddev: Standard deviation value.
.. seealso:: .. seealso::
:ocv:func:`meanStdDev` :ocv:func:`meanStdDev`
.. index:: gpu::norm .. index:: gpu::norm
...@@ -39,7 +39,7 @@ gpu::norm ...@@ -39,7 +39,7 @@ gpu::norm
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically. :param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
.. seealso:: .. seealso::
:ocv:func:`norm` :ocv:func:`norm`
.. index:: gpu::sum .. index:: gpu::sum
...@@ -56,7 +56,7 @@ gpu::sum ...@@ -56,7 +56,7 @@ gpu::sum
:param buf: Optional buffer to avoid extra memory allocations. It is resized automatically. :param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
.. seealso:: .. seealso::
:ocv:func:`sum` :ocv:func:`sum`
.. index:: gpu::absSum .. index:: gpu::absSum
...@@ -109,7 +109,7 @@ gpu::minMax ...@@ -109,7 +109,7 @@ gpu::minMax
The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3. The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
.. seealso:: .. seealso::
:ocv:func:`minMaxLoc` :ocv:func:`minMaxLoc`
.. index:: gpu::minMaxLoc .. index:: gpu::minMaxLoc
...@@ -140,7 +140,7 @@ gpu::minMaxLoc ...@@ -140,7 +140,7 @@ gpu::minMaxLoc
The function does not work with ``CV_64F`` images on GPU with the compute capability < 1.3. The function does not work with ``CV_64F`` images on GPU with the compute capability < 1.3.
.. seealso:: .. seealso::
:ocv:func:`minMaxLoc` :ocv:func:`minMaxLoc`
.. index:: gpu::countNonZero .. index:: gpu::countNonZero
...@@ -159,4 +159,4 @@ gpu::countNonZero ...@@ -159,4 +159,4 @@ gpu::countNonZero
The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3. The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
.. seealso:: .. seealso::
:ocv:func:`countNonZero` :ocv:func:`countNonZero`
...@@ -302,6 +302,7 @@ gpu::CascadeClassifier_GPU::detectMultiScale ...@@ -302,6 +302,7 @@ gpu::CascadeClassifier_GPU::detectMultiScale
:param minSize: Minimum possible object size. Objects smaller than that are ignored. :param minSize: Minimum possible object size. Objects smaller than that are ignored.
The function returns the number of detected objects, so you can retrieve them as in the following example: The function returns the number of detected objects, so you can retrieve them as in the following example:
:: ::
gpu::CascadeClassifier_GPU cascade_gpu(...); gpu::CascadeClassifier_GPU cascade_gpu(...);
......
...@@ -16,7 +16,7 @@ gpu::transpose ...@@ -16,7 +16,7 @@ gpu::transpose
:param dst: Destination matrix. :param dst: Destination matrix.
.. seealso:: .. seealso::
:ocv:func:`transpose` :ocv:func:`transpose`
.. index:: gpu::flip .. index:: gpu::flip
...@@ -40,7 +40,7 @@ gpu::flip ...@@ -40,7 +40,7 @@ gpu::flip
.. seealso:: .. seealso::
:ocv:func:`flip` :ocv:func:`flip`
.. index:: gpu::LUT .. index:: gpu::LUT
...@@ -58,7 +58,7 @@ gpu::LUT ...@@ -58,7 +58,7 @@ gpu::LUT
.. seealso:: .. seealso::
:ocv:func:`LUT` :ocv:func:`LUT`
.. index:: gpu::merge .. index:: gpu::merge
...@@ -83,7 +83,7 @@ gpu::merge ...@@ -83,7 +83,7 @@ gpu::merge
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`merge` :ocv:func:`merge`
.. index:: gpu::split .. index:: gpu::split
...@@ -106,7 +106,7 @@ gpu::split ...@@ -106,7 +106,7 @@ gpu::split
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`split` :ocv:func:`split`
.. index:: gpu::magnitude .. index:: gpu::magnitude
...@@ -131,7 +131,7 @@ gpu::magnitude ...@@ -131,7 +131,7 @@ gpu::magnitude
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`magnitude` :ocv:func:`magnitude`
.. index:: gpu::magnitudeSqr .. index:: gpu::magnitudeSqr
...@@ -176,7 +176,7 @@ gpu::phase ...@@ -176,7 +176,7 @@ gpu::phase
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`phase` :ocv:func:`phase`
.. index:: gpu::cartToPolar .. index:: gpu::cartToPolar
...@@ -201,7 +201,7 @@ gpu::cartToPolar ...@@ -201,7 +201,7 @@ gpu::cartToPolar
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`cartToPolar` :ocv:func:`cartToPolar`
.. index:: gpu::polarToCart .. index:: gpu::polarToCart
...@@ -226,4 +226,4 @@ gpu::polarToCart ...@@ -226,4 +226,4 @@ gpu::polarToCart
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`polarToCart` :ocv:func:`polarToCart`
...@@ -22,7 +22,7 @@ gpu::add ...@@ -22,7 +22,7 @@ gpu::add
:param dst: Destination matrix with the same size and type as ``src1``. :param dst: Destination matrix with the same size and type as ``src1``.
.. seealso:: .. seealso::
:ocv:func:`add` :ocv:func:`add`
.. index:: gpu::subtract .. index:: gpu::subtract
...@@ -41,7 +41,7 @@ gpu::subtract ...@@ -41,7 +41,7 @@ gpu::subtract
:param dst: Destination matrix with the same size and type as ``src1``. :param dst: Destination matrix with the same size and type as ``src1``.
.. seealso:: .. seealso::
:ocv:func:`subtract` :ocv:func:`subtract`
...@@ -62,7 +62,7 @@ gpu::multiply ...@@ -62,7 +62,7 @@ gpu::multiply
:param dst: Destination matrix with the same size and type as ``src1``. :param dst: Destination matrix with the same size and type as ``src1``.
.. seealso:: .. seealso::
:ocv:func:`multiply` :ocv:func:`multiply`
.. index:: gpu::divide .. index:: gpu::divide
...@@ -84,7 +84,7 @@ gpu::divide ...@@ -84,7 +84,7 @@ gpu::divide
This function, in contrast to :ocv:func:`divide`, uses a round-down rounding mode. This function, in contrast to :ocv:func:`divide`, uses a round-down rounding mode.
.. seealso:: .. seealso::
:ocv:func:`divide` :ocv:func:`divide`
...@@ -101,7 +101,7 @@ gpu::exp ...@@ -101,7 +101,7 @@ gpu::exp
:param dst: Destination matrix with the same size and type as ``src``. :param dst: Destination matrix with the same size and type as ``src``.
.. seealso:: .. seealso::
:ocv:func:`exp` :ocv:func:`exp`
...@@ -138,7 +138,7 @@ gpu::absdiff ...@@ -138,7 +138,7 @@ gpu::absdiff
:param dst: Destination matrix with the same size and type as ``src1``. :param dst: Destination matrix with the same size and type as ``src1``.
.. seealso:: .. seealso::
:ocv:func:`absdiff` :ocv:func:`absdiff`
.. index:: gpu::compare .. index:: gpu::compare
...@@ -164,7 +164,7 @@ gpu::compare ...@@ -164,7 +164,7 @@ gpu::compare
* **CMP_NE:** ``src1(.) != src2(.)`` * **CMP_NE:** ``src1(.) != src2(.)``
.. seealso:: .. seealso::
:ocv:func:`compare` :ocv:func:`compare`
.. index:: gpu::bitwise_not .. index:: gpu::bitwise_not
...@@ -276,7 +276,7 @@ gpu::min ...@@ -276,7 +276,7 @@ gpu::min
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`min` :ocv:func:`min`
...@@ -303,4 +303,4 @@ gpu::max ...@@ -303,4 +303,4 @@ gpu::max
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: .. seealso::
:ocv:func:`max` :ocv:func:`max`
...@@ -156,7 +156,7 @@ Moves window to the specified position ...@@ -156,7 +156,7 @@ Moves window to the specified position
ResizeWindow ResizeWindow
---------- ------------
Resizes window to the specified size Resizes window to the specified size
.. ocv:cfunction:: void cvResizeWindow( const char* name, int width, int height ) .. ocv:cfunction:: void cvResizeWindow( const char* name, int width, int height )
......
This diff is collapsed.
...@@ -5,6 +5,7 @@ Geometric Image Transformations ...@@ -5,6 +5,7 @@ Geometric Image Transformations
The functions in this section perform various geometrical transformations of 2D images. They do not change the image content but deform the pixel grid and map this deformed grid to the destination image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from destination to the source. That is, for each pixel The functions in this section perform various geometrical transformations of 2D images. They do not change the image content but deform the pixel grid and map this deformed grid to the destination image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from destination to the source. That is, for each pixel
:math:`(x, y)` of the destination image, the functions compute coordinates of the corresponding "donor" pixel in the source image and copy the pixel value: :math:`(x, y)` of the destination image, the functions compute coordinates of the corresponding "donor" pixel in the source image and copy the pixel value:
The functions in this section perform various geometrical transformations of 2D images. They do not change the image content but deform the pixel grid and map this deformed grid to the destination image. In fact, to avoid sampling artifacts, the mapping is done in the reverse order, from destination to the source. That is, for each pixel :math:`(x, y)` of the destination image, the functions compute coordinates of the corresponding "donor" pixel in the source image and copy the pixel value:
.. math:: .. math::
\texttt{dst} (x,y)= \texttt{src} (f_x(x,y), f_y(x,y)) \texttt{dst} (x,y)= \texttt{src} (f_x(x,y), f_y(x,y))
......
...@@ -148,7 +148,7 @@ This is an approximate algorithm of the ...@@ -148,7 +148,7 @@ This is an approximate algorithm of the
See Also: See Also:
:ocv:func:`calcHist` :ocv:func:`calcHist`
.. _compareHist:
compareHist compareHist
----------- -----------
...@@ -368,6 +368,7 @@ Copies a histogram. ...@@ -368,6 +368,7 @@ Copies a histogram.
The function makes a copy of the histogram. If the second histogram pointer ``*dst`` is NULL, a new histogram of the same size as ``src`` is created. Otherwise, both histograms must have equal types and sizes. Then the function copies the source histogram's bin values to the destination histogram and sets the same bin value ranges as in ``src``. The function makes a copy of the histogram. If the second histogram pointer ``*dst`` is NULL, a new histogram of the same size as ``src`` is created. Otherwise, both histograms must have equal types and sizes. Then the function copies the source histogram's bin values to the destination histogram and sets the same bin value ranges as in ``src``.
.. _createhist:
CreateHist CreateHist
---------- ----------
......
...@@ -31,13 +31,7 @@ The function computes moments, up to the 3rd order, of a vector shape or a raste ...@@ -31,13 +31,7 @@ The function computes moments, up to the 3rd order, of a vector shape or a raste
Moments( const CvMoments& moments ); Moments( const CvMoments& moments );
operator CvMoments() const; operator CvMoments() const;
// spatial moments ..
double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
// central moments
double mu20, mu11, mu02, mu30, mu21, mu12, mu03;
// central normalized moments
double nu20, nu11, nu02, nu30, nu21, nu12, nu03;
};
In case of a raster image, the spatial moments :math:`\texttt{Moments::m}_{ji}` are computed as: In case of a raster image, the spatial moments :math:`\texttt{Moments::m}_{ji}` are computed as:
...@@ -680,12 +674,12 @@ Here is a sample output of the function where each image pixel is tested against ...@@ -680,12 +674,12 @@ Here is a sample output of the function where each image pixel is tested against
.. image:: pics/pointpolygon.png .. image:: pics/pointpolygon.png
.. [Fitzgibbon95] Andrew W. Fitzgibbon, R.B.Fisher. A Buyer’s Guide to Conic Fitting. Proc.5th British Machine Vision Conference, Birmingham, pp. 513-522, 1995. .. [Fitzgibbon95] Andrew W. Fitzgibbon, R.B.Fisher. A Buyer’s Guide to Conic Fitting. Proc.5th British Machine Vision Conference, Birmingham, pp. 513-522, 1995.
.. [Hu62] M. Hu. Visual Pattern Recognition by Moment Invariants, IRE Transactions on Information Theory, 8:2, pp. 179-187, 1962. .. [Hu62] M. Hu. Visual Pattern Recognition by Moment Invariants, IRE Transactions on Information Theory, 8:2, pp. 179-187, 1962.
.. [Sklansky82] Sklansky, J., “Finding the Convex Hull of a Simple Polygon”. PRL 1 $number, pp 79-83 (1982) .. [Sklansky82] Sklansky, J., “Finding the Convex Hull of a Simple Polygon”. PRL 1 $number, pp 79-83 (1982)
.. [Suzuki85] Suzuki, S. and Abe, K., “Topological Structural Analysis of Digitized Binary Images by Border Following”. CVGIP 30 1, pp 32-46 (1985) .. [Suzuki85] Suzuki, S. and Abe, K., “Topological Structural Analysis of Digitized Binary Images by Border Following”. CVGIP 30 1, pp 32-46 (1985)
.. [TehChin89] Teh, C.H. and Chin, R.T., “On the Detection of Dominant Points on Digital Curve”. PAMI 11 8, pp 859-872 (1989) .. [TehChin89] Teh, C.H. and Chin, R.T., “On the Detection of Dominant Points on Digital Curve”. PAMI 11 8, pp 859-872 (1989)
...@@ -59,9 +59,9 @@ To reduce computation time for boosted models without substantially losing accur ...@@ -59,9 +59,9 @@ To reduce computation time for boosted models without substantially losing accur
**all** **all**
training examples are recomputed at each training iteration. Examples deleted at a particular iteration may be used again for learning some of the weak classifiers further [FHT98]_. training examples are recomputed at each training iteration. Examples deleted at a particular iteration may be used again for learning some of the weak classifiers further [FHT98]_.
.. [HTF01] Hastie, T., Tibshirani, R., Friedman, J. H. *The Elements of Statistical Learning: Data Mining, Inference, and Prediction*. Springer Series in Statistics. 2001. .. _HTF01: [HTF01] Hastie, T., Tibshirani, R., Friedman, J. H. *The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Series in Statistics*. 2001.
.. [FHT98] Friedman, J. H., Hastie, T. and Tibshirani, R. *Additive Logistic Regression: a Statistical View of Boosting*. Technical Report, Dept. of Statistics, Stanford University, 1998. .. _FHT98: [FHT98] Friedman, J. H., Hastie, T. and Tibshirani, R. Additive Logistic Regression: a Statistical View of Boosting. Technical Report, Dept. of Statistics*, Stanford University, 1998.
CvBoostParams CvBoostParams
------------- -------------
......
...@@ -84,7 +84,7 @@ As a result, you get the following model: ...@@ -84,7 +84,7 @@ As a result, you get the following model:
.. math:: f(x) = f_0 + \nu\cdot\sum^M_{i=1}T_i(x) , .. math:: f(x) = f_0 + \nu\cdot\sum^M_{i=1}T_i(x) ,
where :math:`f_0` is an initial guess (the best constant model) and :math:`\nu` where :math:`f_0` is the initial guess (the best constant model) and :math:`\nu`
is a regularization parameter from the interval :math:`(0,1]`, futher called is a regularization parameter from the interval :math:`(0,1]`, futher called
*shrinkage*. *shrinkage*.
......
...@@ -205,9 +205,9 @@ In case of point sets, the problem is formulated as follows: you need to find a ...@@ -205,9 +205,9 @@ In case of point sets, the problem is formulated as follows: you need to find a
when ``fullAffine=false`` . when ``fullAffine=false`` .
.. seealso:: .. seealso::
:ocv:func:`getAffineTransform`, :ocv:func:`getAffineTransform`,
:ocv:func:`getPerspectiveTransform`, :ocv:func:`getPerspectiveTransform`,
:ocv:func:`findHomography` :ocv:func:`findHomography`
...@@ -498,7 +498,7 @@ The class is only used to define the common interface for the whole family of ba ...@@ -498,7 +498,7 @@ The class is only used to define the common interface for the whole family of ba
BackgroundSubtractor::operator() BackgroundSubtractor::operator()
------------------------------- --------------------------------
Computes a foreground mask. Computes a foreground mask.
.. ocv:function:: virtual void BackgroundSubtractor::operator()(InputArray image, OutputArray fgmask, double learningRate=0) .. ocv:function:: virtual void BackgroundSubtractor::operator()(InputArray image, OutputArray fgmask, double learningRate=0)
...@@ -633,7 +633,7 @@ The constructors. ...@@ -633,7 +633,7 @@ The constructors.
BackgroundSubtractorMOG2::operator() BackgroundSubtractorMOG2::operator()
----------------------------------- ------------------------------------
Updates the background model and computes the foreground mask Updates the background model and computes the foreground mask
.. ocv:function:: virtual void BackgroundSubtractorMOG2::operator()(InputArray image, OutputArray fgmask, double learningRate=-1) .. ocv:function:: virtual void BackgroundSubtractorMOG2::operator()(InputArray image, OutputArray fgmask, double learningRate=-1)
......
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