Merge pull request #3536 from mshabunin:doxygen-intro

pull/3530/head
Vadim Pisarevsky 10 years ago
commit 95ec92994d
  1. 2
      doc/tutorials/definitions/noContent.rst
  2. 610
      doc/tutorials/introduction/documenting_opencv/documentation_tutorial.markdown
  3. BIN
      doc/tutorials/introduction/documenting_opencv/doxygen-1.png
  4. BIN
      doc/tutorials/introduction/documenting_opencv/doxygen-2.png
  5. BIN
      doc/tutorials/introduction/documenting_opencv/doxygen-3.png
  6. BIN
      doc/tutorials/introduction/documenting_opencv/scholarship_cite_dialog.png
  7. 3
      doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.markdown
  8. 440
      doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.rst
  9. BIN
      doc/tutorials/introduction/how_to_write_a_tutorial/images/matTheBasicImageStructure.jpg
  10. 74
      doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.markdown
  11. 21
      doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.rst

@ -1,3 +1,3 @@
.. note::
Unfortunetly we have no tutorials into this section. And you can help us with that, since OpenCV is a community effort. If you have a tutorial suggestion or you have written a tutorial yourself (or coded a sample code) that you would like to see here, please contact follow these instructions: :ref:`howToWriteTutorial` and :how_to_contribute:`How to contribute <>`.
Unfortunetly we have no tutorials into this section. And you can help us with that, since OpenCV is a community effort. If you have a tutorial suggestion or you have written a tutorial yourself (or coded a sample code) that you would like to see here, please contact follow these instructions: :how_to_contribute:`How to contribute <>`.

@ -0,0 +1,610 @@
Writing documentation for OpenCV {#tutorial_documentation}
================================
@tableofcontents
Doxygen overview {#tutorial_documentation_overview}
================
Intro {#tutorial_documentation_intro}
-----
[Doxygen] is documentation generation system with a lot of great features, such as:
- parse program sources to produce actual and accurate documentation
- check documentation for errors
- insert images and formulas
- use markdown syntax and plain HTML for precise text formatting
- generate documentation in many different formats
OpenCV library existing documentation has been converted to doxygen format.
Installation {#tutorial_documentation_install}
------------
Please, check official [download][Doxygen download] and [installation][Doxygen installation] pages.
Some linux distributions can also provide doxygen packages.
Generate documentation {#tutorial_documentation_generate}
----------------------
- Get the OpenCV sources (version 3.0 and later)
- _Optional:_ get the OpenCV_contrib sources
- Create build directory near the sources folder(s) and go into it
- Run cmake (assuming you put sources to _opencv_ folder):
@code{.sh}
cmake ../opencv
@endcode
Or if you get contrib sources too:
@code{.sh}
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
@endcode
- Run make:
@code{.sh}
make doxygen
@endcode
- Open <i>doc/doxygen/html/index.html</i> file in your favorite browser
Quick start {#tutorial_documentation_quick_start}
===========
@note These instructions are specific to OpenCV library documentation, other projects can use
different layout scheme and documenting agreements.
Documentation locations {#tutorial_documentation_quick_start_1}
-----------------------
Whole documentation is gathered from many different places:
- __source code__ entities, like classes, functions or enumerations, should be documented in
corresponding header files, right prior entity definition. See examples in next sections.
- __pages__ are good place to put big pieces of text with images and code examples not directly
connected with any source code entity. Pages should be located in separate files and
contained in several predefined places. This tutorial is example of such page.
- __images__ can be used to illustrate described things. Usually located at the same places as pages,
images can be inserted to any place of the documentation.
- __code examples__ show how to use the library in real applications. Each sample is
self-contained file which represents one simple application. Parts of these files can be
included into documentation and tutorials to demonstrate function calls and objects collaboration.
- __BibTeX references__ are used to create one common bibliography. All science books, articles and
proceedings served as basis for library functionality should be put in this reference list.
Following scheme represents common documentation places for _opencv_ repository:
~~~
<opencv>
├── doc - doxygen config files, root page (root.markdown.in), BibTeX file (opencv.bib)
   ├── tutorials - tutorials hierarchy (pages and images)
   ├── py_tutorials - python tutorials hierarchy (pages and images)
   └── user_guide - old user guide (pages and images)
├── modules
   └── <modulename>
      ├── doc - documentation pages and images for module
      └── include - code documentation in header files
└── samples - place for all code examples
├── cpp
│ └── tutorial_code - place for tutorial code examples
└── ...
~~~
@note Automatic code parser looks for all header files (<i>".h, .hpp"</i> except for <i>".inl.hpp;
.impl.hpp; _detail.hpp"</i>) in _include_ folder and its subfolders. Some module-specific
instructions (group definitions) and documentation should be put into
<i>"include/opencv2/<module-name>.hpp"</i> file.
@note You can put C++ template implementation and specialization to separate files
(<i>".impl.hpp"</i>) ignored by doxygen.
@note Files in _src_ subfolder are not parsed, because documentation is intended mostly for the
library users, not developers. But it still is possible to generate full documentation by
customizing processed files list in cmake script (<i>doc/CMakeLists.txt</i>) and doxygen options in
its configuration file (<i>doc/Doxyfile.in</i>).
Since version 3.0 all new modules are placed into _opencv_contrib_ repository, it has slightly
different layout:
~~~
<opencv_contrib>
└── modules
└── <modulename>
├── doc - documentation pages and images, BibTeX file (<modulename>.bib)
├── include - code documentation in header files
├── samples - place for code examples for documentation and tutorials
└── tutorials - tutorial pages and images
~~~
Example {#tutorial_documentation_quick_start_2}
-------
To add documentation for functions, classes and other entities, just insert special comment prior
its definition. Like this:
@verbatim
/** @brief Calculates the exponent of every array element.
The function exp calculates the exponent of every element of the input array:
\f[ \texttt{dst} [I] = e^{ src(I) } \f]
The maximum relative error is about 7e-6 for single-precision input and less than 1e-10 for
double-precision input. Currently, the function converts denormalized values to zeros on output.
Special values (NaN, Inf) are not handled.
@param src input array.
@param dst output array of the same size and type as src.
@sa log , cartToPolar , polarToCart , phase , pow , sqrt , magnitude
*/
CV_EXPORTS_W void exp(InputArray src, OutputArray dst);
@endverbatim
Here you can see:
- special C-comment syntax denotes it is doxygen comment
@verbatim /** ... */ @endverbatim
- command `brief` denotes following paragraph is a brief description
@verbatim @brief @endverbatim
- empty line denotes paragraph end
- TeX formula between `f[` and `f]` commands
@verbatim \f[ ... \f] @endverbatim
- command `param` denotes following word is name of the parameter and following text is
description of the parameter; all parameters are placed in a list
@verbatim @param @endverbatim
- command `sa` starts "See also" paragraph containing references to some classes, methods, pages or URLs.
@verbatim @sa @endverbatim
Produced reference item looks like this:
![Reference link](doxygen-2.png)
The "More..." link brings you to the function documentation:
![Function documentation](doxygen-1.png)
Another example {#tutorial_documentation_quick_start_3}
---------------
Different comment syntax can be used for one-line short comments:
@verbatim
//! type of line
enum LineTypes {
FILLED = -1,
LINE_4 = 4, //!< 4-connected line
LINE_8 = 8, //!< 8-connected line
LINE_AA = 16 //!< antialiased line
};
@endverbatim
Here:
- special C++-comment syntax denotes it is doxygen comment
@verbatim //! @endverbatim
- additional symbol `<` denotes this comment is located _after_ documented entity
@verbatim //!< @endverbatim
Produced documentation block looks like this:
![Enumeration documentation](doxygen-3.png)
More details {#tutorial_documentation_quick_start_4}
------------
### Command prefix
Doxygen commands starts with `@` or `\` sign:
@verbatim
@brief ...
or
\brief ...
@endverbatim
### Comment syntax
Doxygen comment can have different forms:
@verbatim
C-style:
/** ... */
or
/*! ... */
C++-style
//! ...
or
/// ...
Lines can start with '*':
/**
* ...
* ...
*/
Can be placed after documented entity:
//!< ...
/**< ... */
@endverbatim
### Paragraph end
To end paragraph, insert empty line or any command starting new paragraph:
@verbatim
@brief brief description paragraph
brief continues
new paragraph
@note new note paragraph
note paragraph continues
another paragraph
paragraph continues
@endverbatim
### Naming
Pages, anchors, groups and other named entities should have unique name inside the whole project.
It is a good idea to prefix such identifiers with module name:
@verbatim
@page core_explanation_1 Usage explanation
@defgroup imgproc_transform Image transformations
@anchor mymodule_interesting_note
@endverbatim
Supported Markdown {#tutorial_documentation_quick_start_md}
------------------
Doxygen supports Markdown formatting with some extensions. Short syntax reference is described
below, for details visit [Markdown support].
### lists {#tutorial_documentation_md_list}
@verbatim
Bulleted:
- item1
- item2
Numbered:
1. item1
2. item2
or
-# item1
-# item2
@endverbatim
### emphasis {#tutorial_documentation_md_emph}
@verbatim
_italic_
__bold__
use html in complex cases:
<em>"path/to/file"</em>
@endverbatim
### links {#tutorial_documentation_md_links}
@verbatim
explicit link:
[OpenCV main site](http://opencv.org)
automatic links:
<http://opencv.org>
or even:
http://opencv.org
@endverbatim
### images {#tutorial_documentation_md_image}
@verbatim
![image caption](image path)
@endverbatim
### headers {#tutorial_documentation_md_head}
@verbatim
Level1
======
Level2
------
### Level3
#### Level4
@endverbatim
### header id {#tutorial_documentation_md_headid}
You can assign a unique identifier to any header to reference it from other places.
@verbatim
Header {#some_unique_identifier}
------
...
See @ref some_unique_identifier for details
@endverbatim
### page id {#tutorial_documentation_md_page}
Each page should have additional Level1 header at the beginning with page title and identifier:
@verbatim
Writing documentation for OpenCV {#tutorial_documentation}
================================
@endverbatim
### tables {#tutorial_documentation_md_table}
Example from doxygen documentation:
@verbatim
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
@endverbatim
Commonly used commands {#tutorial_documentation_quick_start_5}
----------------------
Most often used doxygen commands are described here with short examples. For the full list of
available commands and detailed description, please visit [Command reference].
### Basic commands {#tutorial_documentation_commands_basic}
- __brief__ - paragraph with brief entity description
- __param__ - description of function argument.
Multiple adjacent statements are merged into one list. If argument with this name is not found
in actual function signature - doxygen warning will be produced. Function can have either _no_
documented parameters, either _all_ should be documented.
- __sa__ - "See also" paragraph, contains references to classes, functions, pages or URLs
- __note__ - visually highlighted "Note" paragraph. Multiple adjacent statements are merged into
one block.
- __return, returns__ - describes returned value of a function
- __overload__ - adds fixed text to the function description: <em>"This is an overloaded member
function, provided for convenience. It differs from the above function only in what argument(s)
it accepts."</em>
- __anchor__ - places invisible named anchor, which can be referenced by `ref` command. It can be
used in pages only.
- __ref__ - explicit reference to a named section, page or anchor.
If such entity can not be found - doxygen warning will be generated. This command has an
optional argument - link text.
Doxygen also generates some links automatically: if text contains word which can be found in
documented entities - reference will be generated. This functionality can be disabled by prefixing
the word with `%` symbol.
@verbatim
Explicit reference: @ref MyClass
Explicit named reference: @ref example_page "Example page"
Implicit reference: cv::abc::MyClass1 or just MyClass1
Disable implicit reference: %MyClass1
@endverbatim
- __f__ - formula
Inline formulas are bounded with `f$` command:
@verbatim
\f$ ... \f$
@endverbatim
Block formulas - with `f[` and `f]` commands:
@verbatim
\f[ ... \f]
@endverbatim
### Code inclusion commands {#tutorial_documentation_commands_include}
To mark some text as a code in documentation, _code_ and _endcode_ commands are used.
@verbatim
@code
float val = img.at<float>(borderInterpolate(100, img.rows, cv::BORDER_REFLECT_101),
borderInterpolate(-5, img.cols, cv::BORDER_WRAP));
@endcode
@endverbatim
Syntax will be highlighted according to the currently parsed file type (C++ for <em>.hpp</em>, C for <em>.h</em>) or
you can manually specify it in curly braces:
@verbatim
@code{.xml}
@endverbatim
To include whole example file into documentation, _include_ and _includelineno_ commands are used.
The file is searched in common samples locations, so you can specify just its name or short part of
the path. The _includelineno_ version also shows line numbers.
@verbatim
@include samples/cpp/test.cpp
@endverbatim
If you want to include some parts of existing example file - use _snippet_ command.
First, mark the needed parts of the file with special doxygen comments:
@verbatim
//! [var_init]
int a = 0;
//! [var_init]
@endverbatim
Then include this snippet into documentation:
@verbatim
@snippet samples/cpp/test.cpp var_init
@endverbatim
@note Currently most of such partial inclusions are made with _dontinclude_ command for
compatibility with the old rST documentation. But newly created samples should be included with the
_snippet_ command, since this method is less affected by the changes in processed file.
### Grouping commands {#tutorial_documentation_commands_group}
All code entities should be put into named groups representing OpenCV modules and their internal
structure, thus each module should be associated with a group with the same name. Good place to
define groups and subgroups is the main header file for this module:
<em>"<module>/include/opencv2/<module>.hpp"</em>.
@note Doxygen groups are called "modules" and are shown on "Modules" page.
@verbatim
/**
@defgroup mymodule My great module
optional description
@{
@defgroup mymodule_basic Basic operations
optional description
@defgroup mymodule_experimental Experimental operations
optional description
@}
*/
@endverbatim
To put classes and functions into specific group, just add `ingroup` command to its documentation,
or wrap the whole code block with `addtogroup` command:
@verbatim
/** @brief Example function
@ingroup mymodule
*/
or
/**
@addtogroup mymodule_experimental
@{
*/
... several functions, classes or enumerations here
/**
@}
*/
@endverbatim
### Publication reference {#tutorial_documentation_commands_cite}
Use _cite_ command to insert reference to related publications listed in @ref citelist page.
First, add publication BibTeX record into <i>"<opencv>/doc/opencv.bib"</i> or
<i>"<opencv_contrib>/modules/<module>/doc/<module>.bib"</i> file:
@verbatim
@ARTICLE{Bradski98,
author = {Bradski, Gary R},
title = {Computer vision face tracking for use in a perceptual user interface},
year = {1998},
publisher = {Citeseer}
}
@endverbatim
@note Try not to add publication duplicates because it can confuse documentation readers and writers later.
Then make reference with _cite_ command:
@verbatim
@cite Bradski98
@endverbatim
@note To get BibTeX record for the publications one can use [Google Scholar]. Once the publication
have been found - follow its "Cite" link and then choose "BibTeX" option:
![](scholarship_cite_dialog.png)
Step-by-step {#tutorial_documentation_steps}
============
Steps described in this section can be used as checklist during documentation writing. It is not
necessary to do things in the same order, but some steps really depend on previous. And of course
these steps are just basic guidelines, there is always a place for creativity.
Document the function {#tutorial_documentation_steps_fun}
---------------------
1. Add empty doxygen comment preceding function definition.
2. Add _brief_ command with short description of function meaning at the beginning.
3. Add detailed description of the function.
4. _Optional_: insert formulas, images and blocks of example code to illustrate complex cases
5. _Optional_: describe each parameter using the _param_ command.
6. _Optional_: describe return value of the function using the _returns_ command.
7. _Optional_: add "See also" section with links to similar functions or classes
8. _Optional_: add bibliographic reference if any.
9. Generate doxygen documentation and verify results.
Write the tutorial {#tutorial_documentation_steps_tutorial}
------------------
1. Formulate the idea to be illustrated in the tutorial.
2. Make the example application, simple enough to be understood by a beginning developer. Be
laconic and write descriptive comments, don't try to avoid every possible runtime error or to make
universal utility. Your goal is to illustrate the idea. And it should fit one source file!
If you want to insert code blocks from this file into your tutorial, mark them with special doxygen comments (see [here](@ref tutorial_documentation_commands_include)).
3. Collect results of the application work. It can be "before/after" images or some numbers
representing performance or even a video.
Save it in appropriate format for later use in the tutorial:
- To save simple graph-like images use lossless ".png" format.
- For photo-like images - lossy ".jpg" format.
- Numbers will be inserted as plain text, possibly formatted as table.
- Video should be uploaded on YouTube.
4. Create new tutorial page (<em>".markdown"</em>-file) in corresponding location (see
[here](@ref tutorial_documentation_quick_start_1)), and place all image files near it (or in "images"
subdirectory). Also put your example application file and make sure it is compiled together with the
OpenCV library when `-DBUILD_EXAMPLES=ON` option is enabled on cmake step.
5. Modify your new page:
- Add page title and identifier, usually prefixed with <em>"tutorial_"</em> (see [here](@ref tutorial_documentation_md_page)).
- Add brief description of your idea and tutorial goals.
- Describe your program and/or its interesting pieces.
- Describe your results, insert previously added images or other results.
To add a video use _htmlonly_, _endhtmlonly_ commands with raw html block inside:
@verbatim
@htmlonly
<div align="center">
<iframe
title="my title" width="560" height="349"
src="http://www.youtube.com/embed/ViPN810E0SU?rel=0&loop=1"
frameborder="0" allowfullscreen align="middle">
</iframe>
</div>
@endhtmlonly
@endverbatim
- Add bibliographic references if any (see [here](@ref tutorial_documentation_commands_cite)).
6. Add newly created tutorial to the corresponding table of contents. Just find
<em>"table_of_content_*.markdown"</em> file with the needed table and place new record in it
similar to existing ones.
@verbatim
- @subpage tutorial_windows_visual_studio_image_watch
_Compatibility:_ \>= OpenCV 2.4
_Author:_ Wolf Kienzle
You will learn how to visualize OpenCV matrices and images within Visual Studio 2012.
@endverbatim
As you can see it is just a list item with special _subpage_ command which marks your page as a
child and places it into the existing pages hierarchy. Add compatibility information,
authors list and short description. Also note the list item indent, empty lines between
paragraphs and special _italic_ markers.
7. Generate doxygen documentation and verify results.
References {#tutorial_documentation_refs}
==========
- [Doxygen] - main Doxygen page
- [Documenting basics] - how to include documentation in code
- [Markdown support] - supported syntax and extensions
- [Formulas support] - how to include formulas
- [Supported formula commands] - HTML formulas use MathJax script for rendering
- [Command reference] - supported commands and their parameters
<!-- invisible references list -->
[Doxygen]: http://www.stack.nl/~dimitri/doxygen/index.html)
[Doxygen download]: http://www.stack.nl/~dimitri/doxygen/download.html
[Doxygen installation]: http://www.stack.nl/~dimitri/doxygen/manual/install.html
[Documenting basics]: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
[Markdown support]: http://www.stack.nl/~dimitri/doxygen/manual/markdown.html
[Formulas support]: http://www.stack.nl/~dimitri/doxygen/manual/formulas.html
[Supported formula commands]: http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands
[Command reference]: http://www.stack.nl/~dimitri/doxygen/manual/commands.html
[Google Scholar]: http://scholar.google.ru/

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

@ -1,3 +0,0 @@
How to write a tutorial for OpenCV {#tutorial_how_to_write_a_tutorial}
==================================
@todo new tutorial guide needed

@ -1,440 +0,0 @@
.. _howToWriteTutorial:
How to write a tutorial for OpenCV
**********************************
Okay, so assume you have just finished a project of yours implementing something
based on OpenCV and you want to present/share it with the community. Luckily, OpenCV
is an *open source project*. This means that anyone has access to the full source
code and may propose extensions. And a good tutorial is a valuable addition to the
library! Please read instructions on contribution process here:
http://opencv.org/contribute.html. You may also find this page helpful:
:how_to_contribute:`How to contribute <>`.
While making a robust and practical library (like OpenCV) is great, the success of a
library also depends on how user friendly it is. To improve on this aspect, the
OpenCV team has already been listening to user feedback at :opencv_qa:`OpenCV Q&A
forum <>` and by making samples you can find in the source directories
:file:`samples` folder. The addition of the tutorials (in both online and PDF format)
is an extension of these efforts.
Goal
====
.. _reST: http://docutils.sourceforge.net/rst.html
.. |reST| replace:: reStructuredText
.. |Sphinx| replace:: Sphinx
.. _Sphinx: http://sphinx.pocoo.org/
The tutorials are just as an important part of the library as the implementation of
those crafty data structures and algorithms you can find in OpenCV. Therefore, the
source codes for the tutorials are part of the library. And yes, I meant source
codes. The reason for this formulation is that the tutorials are written by using the
|Sphinx|_ documentation generation system. This is based on the popular Python
documentation system called |reST|_ (reST). ReStructuredText is a really neat
language that by using a few simple conventions (indentation, directives) and
emulating old school email writing techniques (text only) tries to offer a simple
way to create and edit documents. Sphinx extends this with some new features and
creates the resulting document in both HTML (for web) and PDF (for offline usage)
format.
Usually, an OpenCV tutorial has the following parts:
1. A source code demonstration of an OpenCV feature:
a. One or more CPP, Python, Java or other type of files depending for what OpenCV offers support and for what language you make the tutorial.
#. Occasionaly, input resource files required for running your tutorials application.
#. A table of content entry (so people may easily find the tutorial):
a. Adding your stuff to the tutorials table of content (**reST** file).
#. Add an image file near the TOC entry.
#. The content of the tutorial itself:
a. The **reST** text of the tutorial
#. Images following the idea that "*A picture is worth a thousand words*".
#. For more complex demonstrations you may create a video.
As you can see you will need at least some basic knowledge of the *reST* system in order to complete the task at hand with success. However, don't worry *reST* (and *Sphinx*) was made with simplicity in mind. It is easy to grasp its basics. I found that the `OpenAlea documentations introduction on this subject <http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/tutorial/rest_syntax.html>`_ (or the `Thomas Cokelaer one <http://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html>`_ ) should enough for this. If for some directive or feature you need a more in-depth description look it up in the official |reST|_ help files or at the |Sphinx|_ documentation.
In our world achieving some tasks is possible in multiple ways. However, some of the roads to take may have obvious or hidden advantages over others. Then again, in some other cases it may come down to just simple user preference. Here, I'll present how I decided to write the tutorials, based on my personal experience. If for some of them you know a better solution and you can back it up feel free to use that. I've nothing against it, as long as it gets the job done in an elegant fashion.
Now the best would be if you could make the integration yourself. For this you need first to have the source code. I recommend following the guides for your operating system on acquiring OpenCV sources. For Linux users look :ref:`here <Linux-Installation>` and for :ref:`Windows here <Windows_Installation>`. You must also install python and sphinx with its dependencies in order to be able to build the documentation.
Once you have downloaded the repository to your hard drive you can take a look in the OpenCV directory to make sure you have both the samples and doc folder present. Anyone may download the latest source files from :file:`git://github.com/Itseez/opencv.git` . Nevertheless, not everyone has upload (commit/submit) rights. This is to protect the integrity of the library. If you plan doing more than one tutorial, and would like to have an account with commit user rights you should first register an account at http://code.opencv.org/ and then contact OpenCV administrator -delete-admin@-delete-opencv.org. Otherwise, you can just send the resulting files to us at -delete-admin@-delete-opencv.org and we'll add it.
Format the Source Code
======================
Before I start this let it be clear: the main goal is to have a working sample code. However, for your tutorial to be of a top notch quality you should follow a few guide lines I am going to present here. In case you have an application by using the older interface (with *IplImage*, *cvMat*, *cvLoadImage* and such) consider migrating it to the new C++ interface. The tutorials are intended to be an up to date help for our users. And as of OpenCV 2 the OpenCV emphasis on using the less error prone and clearer C++ interface. Therefore, if possible please convert your code to the C++ interface. For this it may help to read the :ref:`InteroperabilityWithOpenCV1` tutorial. However, once you have an OpenCV 2 working code, then you should make your source code snippet as easy to read as possible. Here're a couple of advices for this:
.. container:: enumeratevisibleitemswithsquare
+ Add a standard output with the description of what your program does. Keep it short and yet, descriptive. This output is at the start of the program. In my example files this usually takes the form of a *help* function containing the output. This way both the source file viewer and application runner can see what all is about in your sample. Here's an instance of this:
.. code-block:: cpp
void help()
{
cout
<< "--------------------------------------------------------------------------" << endl
<< "This program shows how to write video files. You can extract the R or G or B color channel "
<< " of the input video. You can choose to use the source codec (Y) or select a custom one. (N)"<< endl
<< "Usage:" << endl
<< "./video-write inputvideoName [ R | G | B] [Y | N]" << endl
<< "--------------------------------------------------------------------------" << endl
<< endl;
}
// ...
int main(int argc, char *argv[], char *window_name)
{
help();
// here comes the actual source code
}
Additionally, finalize the description with a short usage guide. This way the user will know how to call your programs, what leads us to the next point.
+ Prefer command line argument controlling instead of hard coded one. If your program has some variables that may be changed use command line arguments for this. The tutorials, can be a simple try-out ground for the user. If you offer command line controlling for the input image (for example), then you offer the possibility for the user to try it out with his/her own images, without the need to mess in the source code. In the upper example you can see that the input image, channel and codec selection may all be changed from the command line. Just compile the program and run it with your own input arguments.
+ Be as verbose as possible. There is no shame in filling the source code with comments. This way the more advanced user may figure out what's happening right from the sample code. This advice goes for the output console too. Specify to the user what's happening. Never leave the user hanging there and thinking on: "Is this program now crashing or just doing some computationally intensive task?." So, if you do a training task that may take some time, make sure you print out a message about this before starting and after finishing it.
+ Throw out unnecessary stuff from your source code. This is a warning to not take the previous point too seriously. Balance is the key. If it's something that can be done in a fewer lines or simpler than that's the way you should do it. Nevertheless, if for some reason you have such sections notify the user why you have chosen to do so. Keep the amount of information as low as possible, while still getting the job done in an elegant way.
+ Put your sample file into the :file:`opencv/samples/cpp/tutorial_code/sectionName` folder. If you write a tutorial for other languages than cpp, then change that part of the path. Before completing this you need to decide that to what section (module) does your tutorial goes. Think about on what module relies most heavily your code and that is the one to use. If the answer to this question is more than one modules then the *general* section is the one to use. For finding the *opencv* directory open up your file system and navigate where you downloaded our repository.
+ If the input resources are hard to acquire for the end user consider adding a few of them to the :file:`opencv/samples/cpp/tutorial_code/images`. Make sure that who reads your code can try it out!
Add the TOC entry
=================
For this you will need to know some |reST|_. There is no going around this. |reST|_ files have **rst** extensions. However, these are simple text files. Use any text editor you like. Finding a text editor that offers syntax highlighting for |reST|_ was quite a challenge at the time of writing this tutorial. In my experience, `Intype <http://intype.info/>`_ is a solid option on Windows, although there is still place for improvement.
Adding your source code to a table of content is important for multiple reasons. First and foremost this will allow for the user base to find your tutorial from our websites tutorial table of content. Secondly, if you omit this *Sphinx* will throw a warning that your tutorial file isn't part of any TOC tree entry. And there is nothing more than the developer team hates than an ever increasing warning/error list for their builds. *Sphinx* also uses this to build up the previous-back-up buttons on the website. Finally, omitting this step will lead to that your tutorial will **not** be added to the PDF version of the tutorials.
Navigate to the :file:`opencv/doc/tutorials/section/table_of_content_section` folder (where the section is the module to which you're adding the tutorial). Open the *table_of_content_section* file. Now this may have two forms. If no prior tutorials are present in this section that there is a template message about this and has the following form:
.. code-block:: rst
.. _Table-Of-Content-Section:
Section title
-----------------------------------------------------------
Description about the section.
.. include:: ../../definitions/noContent.rst
.. raw:: latex
\pagebreak
The first line is a reference to the section title in the reST system. The section title will be a link and you may refer to it via the ``:ref:`` directive. The *include* directive imports the template text from the definitions directories *noContent.rst* file. *Sphinx* does not creates the PDF from scratch. It does this by first creating a latex file. Then creates the PDF from the latex file. With the *raw* directive you can directly add to this output commands. Its unique argument is for what kind of output to add the content of the directive. For the PDFs it may happen that multiple sections will overlap on a single page. To avoid this at the end of the TOC we add a *pagebreak* latex command, that hints to the LATEX system that the next line should be on a new page.
If you have one of this, try to transform it to the following form:
.. include:: ../../definitions/tocDefinitions.rst
.. code-block:: rst
.. _Table-Of-Content-Section:
Section title
-----------------------------------------------------------
.. include:: ../../definitions/tocDefinitions.rst
+
.. tabularcolumns:: m{100pt} m{300pt}
.. cssclass:: toctableopencv
=============== ======================================================
|MatBasicIma| **Title:** :ref:`matTheBasicImageContainer`
*Compatibility:* > OpenCV 2.0
*Author:* |Author_BernatG|
You will learn how to store images in the memory and how to print out their content to the console.
=============== =====================================================
.. |MatBasicIma| image:: images/matTheBasicImageStructure.jpg
:height: 90pt
:width: 90pt
.. raw:: latex
\pagebreak
.. toctree::
:hidden:
../mat - the basic image container/mat - the basic image container
If this is already present just add a new section of the content between the include and the raw directives (excluding those lines). Here you'll see a new include directive. This should be present only once in a TOC tree and the reST file contains the definitions of all the authors contributing to the OpenCV tutorials. We are a multicultural community and some of our name may contain some funky characters. However, reST **only supports** ANSI characters. Luckily we can specify Unicode characters with the *unicode* directive. Doing this for all of your tutorials is a troublesome procedure. Therefore, the tocDefinitions file contains the definition of your author name. Add it here once and afterwards just use the replace construction. For example here's the definition for my name:
.. code-block:: rst
.. |Author_BernatG| unicode:: Bern U+00E1 t U+0020 G U+00E1 bor
The ``|Author_BernatG|`` is the text definitions alias. I can use later this to add the definition, like I've done in the TOCs *Author* part. After the ``::`` and a space you start the definition. If you want to add an UNICODE character (non-ASCI) leave an empty space and specify it in the format U+(UNICODE code). To find the UNICODE code of a character I recommend using the `FileFormat <http://www.fileformat.info>`_ websites service. Spaces are trimmed from the definition, therefore we add a space by its UNICODE character (U+0020).
Until the *raw* directive what you can see is a TOC tree entry. Here's how a TOC entry will look like:
+
.. tabularcolumns:: m{100pt} m{300pt}
.. cssclass:: toctableopencv
=============== ======================================================
|MatBasicIma| **Title:** :ref:`matTheBasicImageContainer`
*Compatibility:* > OpenCV 2.0
*Author:* |Author_BernatG|
You will learn how to store images in the memory and how to print out their content to the console.
=============== ======================================================
.. |MatBasicIma| image:: images/matTheBasicImageStructure.jpg
:height: 90pt
:width: 90pt
As you can see we have an image to the left and a description box to the right. To create two boxes we use a table with two columns and a single row. In the left column is the image and in the right one the description. However, the image directive is way too long to fit in a column. Therefore, we need to use the substitution definition system. We add this definition after the TOC tree. All images for the TOC tree are to be put in the images folder near its |reST|_ file. We use the point measurement system because we are also creating PDFs. PDFs are printable documents, where there is no such thing that pixels (px), just points (pt). And while generally space is no problem for web pages (we have monitors with **huge** resolutions) the size of the paper (A4 or letter) is constant and will be for a long time in the future. Therefore, size constrains come in play more like for the PDF, than the generated HTML code.
Now your images should be as small as possible, while still offering the intended information for the user. Remember that the tutorial will become part of the OpenCV source code. If you add large images (that manifest in form of large image size) it will just increase the size of the repository pointlessly. If someone wants to download it later, its download time will be that much longer. Not to mention the larger PDF size for the tutorials and the longer load time for the web pages. In terms of pixels a TOC image should not be larger than 120 X 120 pixels. Resize your images if they are larger!
.. note::
If you add a larger image and specify a smaller image size, *Sphinx* will not resize that. At build time will add the full size image and the resize will be done by your browser after the image is loaded. A 120 X 120 image is somewhere below 10KB. If you add a 110KB image, you have just pointlessly added a 100KB extra data to transfer over the internet for every user!
Generally speaking you shouldn't need to specify your images size (excluding the TOC entries). If no such is found *Sphinx* will use the size of the image itself (so no resize occurs). Then again if for some reason you decide to specify a size that should be the **width** of the image rather than its height. The reason for this again goes back to the PDFs. On a PDF page the height is larger than the width. In the PDF the images will not be resized. If you specify a size that does not fit in the page, then what does not fits in **will be cut off**. When creating your images for your tutorial you should try to keep the image widths below 500 pixels, and calculate with around 400 point page width when specifying image widths.
The image format depends on the content of the image. If you have some complex scene (many random like colors) then use *jpg*. Otherwise, prefer using *png*. They are even some tools out there that optimize the size of *PNG* images, such as `PNGGauntlet <http://pnggauntlet.com/>`_. Use them to make your images as small as possible in size.
Now on the right side column of the table we add the information about the tutorial:
.. container:: enumeratevisibleitemswithsquare
+ In the first line it is the title of the tutorial. However, there is no need to specify it explicitly. We use the reference system. We'll start up our tutorial with a reference specification, just like in case of this TOC entry with its `` .. _Table-Of-Content-Section:`` . If after this you have a title (pointed out by the following line of -), then Sphinx will replace the ``:ref:`Table-Of-Content-Section``` directive with the tile of the section in reference form (creates a link in web page). Here's how the definition looks in my case:
.. code-block:: rst
.. _matTheBasicImageContainer:
Mat - The Basic Image Container
*******************************
Note, that according to the |reST|_ rules the * should be as long as your title.
+ Compatibility. What version of OpenCV is required to run your sample code.
+ Author. Use the substitution markup of |reST|_.
+ A short sentence describing the essence of your tutorial.
Now before each TOC entry you need to add the three lines of:
.. code-block:: cpp
+
.. tabularcolumns:: m{100pt} m{300pt}
.. cssclass:: toctableopencv
The plus sign (+) is to enumerate tutorials by using bullet points. So for every TOC entry we have a corresponding bullet point represented by the +. Sphinx is highly indenting sensitive. Indentation is used to express from which point until to which point does a construction last. Un-indentation means end of that construction. So to keep all the bullet points to the same group the following TOC entries (until the next +) should be indented by two spaces.
Here, I should also mention that **always** prefer using spaces instead of tabs. Working with only spaces makes possible that if we both use monotype fonts we will see the same thing. Tab size is text editor dependent and as should be avoided. *Sphinx* translates all tabs into 8 spaces before interpreting it.
It turns out that the automatic formatting of both the HTML and PDF(LATEX) system messes up our tables. Therefore, we need to help them out a little. For the PDF generation we add the ``.. tabularcolumns:: m{100pt} m{300pt}`` directive. This means that the first column should be 100 points wide and middle aligned. For the HTML look we simply name the following table of a *toctableopencv* class type. Then, we can modify the look of the table by modifying the CSS of our web page. The CSS definitions go into the :file:`opencv/doc/_themes/blue/static/default.css_t` file.
.. code-block:: css
.toctableopencv
{
width: 100% ;
table-layout: fixed;
}
.toctableopencv colgroup col:first-child
{
width: 100pt !important;
max-width: 100pt !important;
min-width: 100pt !important;
}
.toctableopencv colgroup col:nth-child(2)
{
width: 100% !important;
}
However, you should not need to modify this. Just add these three lines (plus keep the two space indentation) for all TOC entries you add. At the end of the TOC file you'll find:
.. code-block:: rst
.. raw:: latex
\pagebreak
.. toctree::
:hidden:
../mat - the basic image container/mat - the basic image container
The page break entry comes for separating sections and should be only one in a TOC tree |reST|_ file. Finally, at the end of the TOC tree we need to add our tutorial to the *Sphinx* TOC tree system. *Sphinx* will generate from this the previous-next-up information for the HTML file and add items to the PDF according to the order here. By default this TOC tree directive generates a simple table of contents. However, we already created a fancy looking one so we no longer need this basic one. Therefore, we add the *hidden* option to do not show it.
The path is of a relative type. We step back in the file system and then go into the :file:`mat - the basic image container` directory for the :file:`mat - the basic image container.rst` file. Putting out the *rst* extension for the file is optional.
Write the tutorial
==================
Create a folder with the name of your tutorial. Preferably, use small letters only. Then create a text file in this folder with *rst* extension and the same name. If you have images for the tutorial create an :file:`images` folder and add your images there. When creating your images follow the guidelines described in the previous part!
Now here's our recommendation for the structure of the tutorial (although, remember that this is not carved in the stone; if you have a better idea, use it!):
.. container:: enumeratevisibleitemswithsquare
+ Create the reference point and the title.
.. code-block:: rst
.. _matTheBasicImageContainer:
Mat - The Basic Image Container
*******************************
You start the tutorial by specifying a reference point by the ``.. _matTheBasicImageContainer:`` and then its title. The name of the reference point should be a unique one over the whole documentation. Therefore, do not use general names like *tutorial1*. Use the * character to underline the title for its full width. The subtitles of the tutorial should be underlined with = charachter.
+ Goals. You start your tutorial by specifying what you will present. You can also enumerate the sub jobs to be done. For this you can use a bullet point construction. There is a single configuration file for both the reference manual and the tutorial documentation. In the reference manuals at the argument enumeration we do not want any kind of bullet point style enumeration. Therefore, by default all the bullet points at this level are set to do not show the dot before the entries in the HTML. You can override this by putting the bullet point in a container. I've defined a square type bullet point view under the name *enumeratevisibleitemswithsquare*. The CSS style definition for this is again in the :file:`opencv\doc\_themes\blue\static\default.css_t` file. Here's a quick example of using it:
.. code-block:: rst
.. container:: enumeratevisibleitemswithsquare
+ Create the reference point and the title.
+ Second entry
+ Third entry
Note that you need the keep the indentation of the container directive. Directive indentations are always three (3) spaces. Here you may even give usage tips for your sample code.
+ Source code. Present your samples code to the user. It's a good idea to offer a quick download link for the HTML page by using the *download* directive and pointing out where the user may find your source code in the file system by using the *file* directive:
.. code-block:: rst
Text :file:`samples/cpp/tutorial_code/highgui/video-write/` folder of the OpenCV source library
or :download:`text to appear in the webpage
<../../../../samples/cpp/tutorial_code/HighGUI/video-write/video-write.cpp>`.
For the download link the path is a relative one, hence the multiple back stepping operations (..). Then you can add the source code either by using the *code block* directive or the *literal include* one. In case of the code block you will need to actually add all the source code text into your |reST|_ text and also apply the required indentation:
.. code-block:: rst
.. code-block:: cpp
int i = 0;
l = ++j;
The only argument of the directive is the language used (here CPP). Then you add the source code into its content (meaning one empty line after the directive) by keeping the indentation of the directive (3 spaces). With the *literal include* directive you do not need to add the source code of the sample. You just specify the sample and *Sphinx* will load it for you, during build time. Here's an example usage:
.. code-block:: rst
.. literalinclude:: ../../../../samples/cpp/tutorial_code/HighGUI/video-write/video-write.cpp
:language: cpp
:linenos:
:tab-width: 4
:lines: 1-8, 21-23, 25-
After the directive you specify a relative path to the file from what to import. It has four options: the language to use, if you add the ``:linenos:`` the line numbers will be shown, you can specify the tab size with the ``:tab-width:`` and you do not need to load the whole file, you can show just the important lines. Use the *lines* option to do not show redundant information (such as the *help* function). Here basically you specify ranges, if the second range line number is missing than that means that until the end of the file. The ranges specified here do no need to be in an ascending order, you may even reorganize the structure of how you want to show your sample inside the tutorial.
+ The tutorial. Well here goes the explanation for why and what have you used. Try to be short, clear, concise and yet a thorough one. There's no magic formula. Look into a few already made tutorials and start out from there. Try to mix sample OpenCV code with your explanations. If with words is hard to describe something do not hesitate to add in a reasonable size image, to overcome this issue.
When you present OpenCV functionality it's a good idea to give a link to the used OpenCV data structure or function. Because the OpenCV tutorials and reference manual are in separate PDF files it is not possible to make this link work for the PDF format. Therefore, we use here only web page links to the http://docs.opencv.org website. The OpenCV functions and data structures may be used for multiple tasks. Nevertheless, we want to avoid that every users creates its own reference to a commonly used function. So for this we use the global link collection of *Sphinx*. This is defined in the file:`opencv/doc/conf.py` configuration file. Open it and go all the way down to the last entry:
.. code-block:: py
# ---- External links for tutorials -----------------
extlinks = {
'rwimg' : ('http://docs.opencv.org/modules/imgcodecs/doc/reading_and_writing_images.html#%s', None)
}
In short here we defined a new **rwimg** directive that refers to an external webpage link. Its usage is:
.. code-block:: rst
A sample function of the highgui modules image write and read page is the :rwimg:`imread() function <imread>`.
Which turns to: A sample function of the highgui modules image write and read page is the :rwimg:`imread() function <imread>`. The argument you give between the <> will be put in place of the ``%s`` in the upper definition, and as the link will anchor to the correct function. To find out the anchor of a given function just open up a web page, search for the function and click on it. In the address bar it should appear like: ``http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images.html#imread`` . Look here for the name of the directives for each page of the OpenCV reference manual. If none present for one of them feel free to add one for it.
For formulas you can add LATEX code that will translate in the web pages into images. You do this by using the *math* directive. A usage tip:
.. code-block:: latex
.. math::
MSE = \frac{1}{c*i*j} \sum{(I_1-I_2)^2}
That after build turns into:
.. math::
MSE = \frac{1}{c*i*j} \sum{(I_1-I_2)^2}
You can even use it inline as ``:math:` MSE = \frac{1}{c*i*j} \sum{(I_1-I_2)^2}``` that turns into :math:`MSE = \frac{1}{c*i*j} \sum{(I_1-I_2)^2}`.
If you use some crazy LATEX library extension you need to add those to the ones to use at build time. Look into the file:`opencv/doc/conf.py` configuration file for more information on this.
+ Results. Well, here depending on your program show one of more of the following:
- Console outputs by using the code block directive.
- Output images.
- Runtime videos, visualization. For this use your favorite screens capture software. `Camtasia Studio <http://www.techsmith.com/camtasia/>`_ certainly is one of the better choices, however their prices are out of this world. `CamStudio <http://camstudio.org/>`_ is a free alternative, but less powerful. If you do a video you can upload it to YouTube and then use the raw directive with HTML option to embed it into the generated web page:
.. code-block:: rst
You may observe a runtime instance of this on the `YouTube here <https://www.youtube.com/watch?v=jpBwHxsl1_0>`_.
.. raw:: html
<div align="center">
<iframe title="Creating a video with OpenCV" width="560" height="349" src="http://www.youtube.com/embed/jpBwHxsl1_0?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
</div>
This results in the text and video: You may observe a runtime instance of this on the `YouTube here <https://www.youtube.com/watch?v=jpBwHxsl1_0>`_.
.. raw:: html
<div align="center">
<iframe title="Creating a video with OpenCV" width="560" height="349" src="http://www.youtube.com/embed/jpBwHxsl1_0?rel=0&loop=1" frameborder="0" allowfullscreen align="middle"></iframe>
</div>
When these aren't self-explanatory make sure to throw in a few guiding lines about what and why we can see.
+ Build the documentation and check for errors or warnings. In the CMake make sure you check or pass the option for building documentation. Then simply build the **docs** project for the PDF file and the **docs_html** project for the web page. Read the output of the build and check for errors/warnings for what you have added. This is also the time to observe and correct any kind of *not so good looking* parts. Remember to keep clean our build logs.
+ Read again your tutorial and check for both programming and spelling errors. If found any, please correct them.
Take home the pride and joy of a job well done!
===============================================
Once you are done please make a GitHub pull request with the tutorial. Now, to see
your work **live** you may need to wait some time. The PDFs are updated usually at
the launch of a new OpenCV version. The web pages are a little more diverse. They are
automatically rebuilt nightly. Currently we use ``2.4`` and ``master`` branches for
daily builds. So, if your pull request was merged to any of these branches, your
material will be published at `docs.opencv.org/2.4 <http:/docs.opencv.org/2.4>`_ or
`docs.opencv.org/master <http:/docs.opencv.org/master>`_ correspondingly. Everything
that was added to ``2.4`` is merged to ``master`` branch every week. Although, we try
to make a build every night, occasionally we might freeze any of the branches to fix
upcoming issues. During this it may take a little longer to see your work online,
however if you submitted it, be sure that eventually it will show up.
If you have any questions or advices relating to this tutorial you can contact us at
-delete-admin@-delete-opencv.org (delete the -delete- parts of that email address).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

@ -6,140 +6,138 @@ Additionally you can find very basic sample source code to introduce you to the
- @subpage tutorial_linux_install
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Ana Huamán
_Author:_ Ana Huamán
We will learn how to setup OpenCV in your computer!
- @subpage tutorial_linux_gcc_cmake
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Ana Huamán
_Author:_ Ana Huamán
We will learn how to compile your first project using gcc and CMake
- @subpage tutorial_linux_eclipse
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Ana Huamán
_Author:_ Ana Huamán
We will learn how to compile your first project using the Eclipse environment
- @subpage tutorial_windows_install
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Bernát Gábor
_Author:_ Bernát Gábor
You will learn how to setup OpenCV in your Windows Operating System!
- @subpage tutorial_windows_visual_studio_Opencv
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Bernát Gábor
_Author:_ Bernát Gábor
You will learn what steps you need to perform in order to use the OpenCV library inside a new
Microsoft Visual Studio project.
- @subpage tutorial_windows_visual_studio_image_watch
*Compatibility:* \>= OpenCV 2.4
_Compatibility:_ \>= OpenCV 2.4
*Author:* Wolf Kienzle
_Author:_ Wolf Kienzle
You will learn how to visualize OpenCV matrices and images within Visual Studio 2012.
- @subpage tutorial_java_dev_intro
*Compatibility:* \> OpenCV 2.4.4
_Compatibility:_ \> OpenCV 2.4.4
*Authors:* Eric Christiansen and Andrey Pavlenko
_Authors:_ Eric Christiansen and Andrey Pavlenko
Explains how to build and run a simple desktop Java application using Eclipse, Ant or the
Simple Build Tool (SBT).
- @subpage tutorial_java_eclipse
*Compatibility:* \> OpenCV 2.4.4
_Compatibility:_ \> OpenCV 2.4.4
*Author:* Barış Evrim Demiröz
_Author:_ Barış Evrim Demiröz
A tutorial on how to use OpenCV Java with Eclipse.
- @subpage tutorial_clojure_dev_intro
*Compatibility:* \> OpenCV 2.4.4
_Compatibility:_ \> OpenCV 2.4.4
*Author:* Mimmo Cosenza
_Author:_ Mimmo Cosenza
A tutorial on how to interactively use OpenCV from the Clojure REPL.
- @subpage tutorial_android_dev_intro
*Compatibility:* \> OpenCV 2.4.2
_Compatibility:_ \> OpenCV 2.4.2
*Author:* Vsevolod Glumov
_Author:_ Vsevolod Glumov
Not a tutorial, but a guide introducing Android development basics and environment setup
- @subpage tutorial_O4A_SDK
*Compatibility:* \> OpenCV 2.4.2
_Compatibility:_ \> OpenCV 2.4.2
*Author:* Vsevolod Glumov
_Author:_ Vsevolod Glumov
OpenCV4Android SDK: general info, installation, running samples
- @subpage tutorial_dev_with_OCV_on_Android
*Compatibility:* \> OpenCV 2.4.3
_Compatibility:_ \> OpenCV 2.4.3
*Author:* Vsevolod Glumov
_Author:_ Vsevolod Glumov
Development with OpenCV4Android SDK
- @subpage tutorial_ios_install
*Compatibility:* \> OpenCV 2.4.2
_Compatibility:_ \> OpenCV 2.4.2
*Author:* Artem Myagkov, Eduard Feicho
_Author:_ Artem Myagkov, Eduard Feicho
We will learn how to setup OpenCV for using it in iOS!
- @subpage tutorial_arm_crosscompile_with_cmake
*Compatibility:* \> OpenCV 2.4.4
_Compatibility:_ \> OpenCV 2.4.4
*Author:* Alexander Smorkalov
_Author:_ Alexander Smorkalov
We will learn how to setup OpenCV cross compilation environment for ARM Linux.
- @subpage tutorial_display_image
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Ana Huamán
_Author:_ Ana Huamán
We will learn how to display an image using OpenCV
- @subpage tutorial_load_save_image
*Compatibility:* \> OpenCV 2.0
_Compatibility:_ \> OpenCV 2.0
*Author:* Ana Huamán
_Author:_ Ana Huamán
We will learn how to save an Image in OpenCV...plus a small conversion to grayscale
- @subpage tutorial_how_to_write_a_tutorial
- @subpage tutorial_documentation
*Compatibility:* \> OpenCV 1.0
_Compatibility:_ \> OpenCV 3.0
*Author:* Bernát Gábor
_Author:_ Maksim Shabunin
If you already have a good grasp on using OpenCV and have made some projects that would be
perfect presenting an OpenCV feature not yet part of these tutorials, here it is what you
need to know.
This tutorial describes new documenting process and some useful Doxygen features.

@ -293,26 +293,6 @@ world of the OpenCV.
:height: 90pt
:width: 90pt
* **Want to contribute, and see your own work between the OpenCV tutorials?**
.. tabularcolumns:: m{100pt} m{300pt}
.. cssclass:: toctableopencv
=============== ======================================================
|HowToWriteT| **Title:** :ref:`howToWriteTutorial`
*Compatibility:* > OpenCV 1.0
*Author:* |Author_BernatG|
If you already have a good grasp on using OpenCV and have made some projects that would be perfect presenting an OpenCV feature not yet part of these tutorials, here it is what you need to know.
=============== ======================================================
.. |HowToWriteT| image:: images/how_to_write_a_tutorial.png
:height: 90pt
:width: 90pt
.. raw:: latex
\pagebreak
@ -337,4 +317,3 @@ world of the OpenCV.
../crosscompilation/arm_crosscompile_with_cmake
../display_image/display_image
../load_save_image/load_save_image
../how_to_write_a_tutorial/how_to_write_a_tutorial

Loading…
Cancel
Save