merged all the latest changes from 2.4 to trunk

This commit is contained in:
Vadim Pisarevsky
2012-04-13 21:50:59 +00:00
parent 020f9a6047
commit 2fd1e2ea57
416 changed files with 12852 additions and 6070 deletions

21
doc/_themes/blue/searchbox.html vendored Normal file
View File

@@ -0,0 +1,21 @@
{#
basic/searchbox.html
~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: quick search box.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" %}
<div id="searchbox" style="display: none">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="{{ _('Search') }}" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</p>
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}

View File

@@ -85,6 +85,7 @@ div.related a {
div.sphinxsidebar {
word-wrap: break-word;
width: 240px;
{%- if theme_stickysidebar|tobool %}
top: 30px;
margin: 0;

View File

@@ -134,7 +134,7 @@
\setlength{\columnsep}{2pt}
\begin{center}
\Large{\textbf{OpenCV 2.3 Cheat Sheet (C++)}} \\
\Large{\textbf{OpenCV 2.4 Cheat Sheet (C++)}} \\
\end{center}
\newlength{\MyLen}
\settowidth{\MyLen}{\texttt{letterpaper}/\texttt{a4paper} \ }

View File

@@ -100,7 +100,7 @@ You need the following tools to be installed:
Check the `Android SDK System Requirements
<http://developer.android.com/sdk/requirements.html>`_ document for a list of Eclipse versions that are compatible with the Android SDK.
For OpenCV 2.3.1 we recommend Eclipse 3.7 (Indigo) or Eclipse 3.6 (Helios). They work well for OpenCV under both Windows and Linux.
For OpenCV 2.4.0 we recommend Eclipse 3.6 (Helios) or later versions. They work well for OpenCV under both Windows and Linux.
If you have no Eclipse installed, you can download it from this location:
@@ -154,12 +154,12 @@ Get the OpenCV package for Android development
.. code-block:: bash
tar -jxvf ~/Downloads/OpenCV-2.3.1-android-bin.tar.bz2
tar -jxvf ~/Downloads/OpenCV-2.4.0-android-bin.tar.bz2
For this tutorial I have unpacked OpenCV to the :file:`C:\\Work\\android-opencv\\` directory.
.. |opencv_android_bin_pack| replace:: OpenCV-2.3.1-android-bin.tar.bz2
.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.3.1/OpenCV-2.3.1-android-bin.tar.bz2/download
.. |opencv_android_bin_pack| replace:: OpenCV-2.4.0-android-bin.tar.bz2
.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.0/OpenCV-2.4.0-android-bin.tar.bz2/download
.. |opencv_android_bin_pack_url| replace:: |opencv_android_bin_pack|
.. |seven_zip| replace:: 7-Zip
.. _seven_zip: http://www.7-zip.org/

View File

@@ -7,7 +7,7 @@ These steps have been tested for Ubuntu 10.04 but should work with other distros
Required packages
==================
* GCC 4.x or later. This can be installed with
* GCC 4.4.x or later. This can be installed with
.. code-block:: bash
@@ -15,13 +15,12 @@ Required packages
* CMake 2.6 or higher
* Subversion (SVN) client
* GTK+2.x or higher, including headers
* GTK+2.x or higher, including headers (libgtk2.0-dev)
* pkgconfig
* libpng, zlib, libjpeg, libtiff, libjasper with development files (e.g. libpjeg-dev)
* Python 2.3 or later with developer packages (e.g. python-dev)
* SWIG 1.3.30 or later (only for versions prior to OpenCV 2.3)
* libavcodec
* libdc1394 2.x
* Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy)
* ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev
* [optional] libdc1394 2.x
* [optional] libjpeg-dev, libpng-dev, libtiff-dev, libjasper-dev.
All the libraries above can be installed via Terminal or by using Synaptic Manager

View File

@@ -16,7 +16,7 @@ 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).
#. Open the folder for the latest version (currently this is 2.4).
#. Choose a build you want to use and download it. The naming conventions used will show what kind of support they offer. For example:
@@ -60,7 +60,7 @@ If you are building your own libraries you can take either the source files from
.. container:: enumeratevisibleitemswithsquare
+ stable and tested build - http://code.opencv.org/svn/opencv/branches/2.3 (the number at the end will change with every new realease, so change it to that)
+ stable and tested build - http://code.opencv.org/svn/opencv/branches/2.4 (the number at the end will change with every new realease, so change it to that)
+ development build - http://code.opencv.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. That is unless you are extending the OpenCV library itself or really need to most up to date version of it.
@@ -347,7 +347,7 @@ Set the OpenCV enviroment variable and add it to the systems path
First we set an enviroment variable to make easier our work. This will hold the install directory of our OpenCV library that we use in our projects. Start up a command window and enter:
.. code-block:: bash
::
setx -m OPENCV_DIR D:\OpenCV\Build\Install
@@ -355,7 +355,7 @@ Here the directory is where you have your OpenCV binaries (*installed* or *built
If you built static libraries then you are done. Otherwise, you need to add the *bin* folders path to the systems path.This is cause you will use the OpenCV library in form of *\"Dynamic-link libraries\"* (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 where to look if he ever needs 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, which is highly unpleasent if you work on many projects. To do this start up again the |PathEditor|_ and add the following new entry (right click in the application to bring up the menu):
.. code-block:: bash
::
%OPENCV_DIR%\bin

View File

@@ -35,25 +35,29 @@ Accessing pixel intensity values
In order to get pixel intensity value, you have to know the type of an image and the number of channels. Here is an example for a single channel grey scale image (type 8UC1) and pixel coordinates x and y: ::
Scalar intensity = img.at<uchar>(x, y);
Scalar intensity = img.at<uchar>(y, x);
``intensity.val[0]`` contains a value from 0 to 255. Now let us consider a 3 channel image with ``BGR`` color ordering (the default format returned by ``imread``): ::
``intensity.val[0]`` contains a value from 0 to 255. Note the ordering of ``x`` and ``y``. Since in OpenCV images are represented by the same structure as matrices, we use the same convention for both cases - the 0-based row index (or y-coordinate) goes first and the 0-based column index (or x-coordinate) follows it. Alternatively, you can use the following notation: ::
Vec3b intensity = img.at<Vec3b>(x, y);
Scalar intensity = img.at<uchar>(Point(x, y));
Now let us consider a 3 channel image with ``BGR`` color ordering (the default format returned by ``imread``): ::
Vec3b intensity = img.at<Vec3b>(y, x);
uchar blue = intensity.val[0];
uchar green = intensity.val[1];
uchar red = intensity.val[2];
You can use the same method for floating-point images (for example, you can get such an image by running Sobel on a 3 channel image): ::
Vec3f intensity = img.at<Vec3f>(x, y);
Vec3f intensity = img.at<Vec3f>(y, x);
float blue = intensity.val[0];
float green = intensity.val[1];
float red = intensity.val[2];
The same method can be used to change pixel intensities: ::
img.at<uchar>(x, y) = 128;
img.at<uchar>(y, x) = 128;
There are functions in OpenCV, especially from calib3d module, such as ``projectPoints``, that take an array of 2D or 3D points in the form of ``Mat``. Matrix should contain exactly one column, each row corresponds to a point, matrix type should be 32FC2 or 32FC3 correspondingly. Such a matrix can be easily constructed from ``std::vector``: ::