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.

This commit is contained in:
Bernat Gabor
2011-06-30 00:41:41 +00:00
parent d8ea8ef98a
commit 762bc0f8af
59 changed files with 469 additions and 364 deletions

View File

@@ -27,12 +27,12 @@ Steps
.. math::
K = \dfrac{1}{159}\begin{bmatrix}
2 & 4 & 5 & 4 & 2 \\
4 & 9 & 12 & 9 & 4 \\
5 & 12 & 15 & 12 & 5 \\
4 & 9 & 12 & 9 & 4 \\
2 & 4 & 5 & 4 & 2
\end{bmatrix}
2 & 4 & 5 & 4 & 2 \\
4 & 9 & 12 & 9 & 4 \\
5 & 12 & 15 & 12 & 5 \\
4 & 9 & 12 & 9 & 4 \\
2 & 4 & 5 & 4 & 2
\end{bmatrix}
#. Find the intensity gradient of the image. For this, we follow a procedure analogous to Sobel:
@@ -206,7 +206,8 @@ Explanation
#. Create a window to display the results
.. 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:

View File

@@ -1,4 +1,4 @@
.. _copyMakeBorder:
.. _copyMakeBorderTutorial:
Adding borders to your images
******************************

View File

@@ -132,6 +132,7 @@ Code
return 0;
}
Explanation
=============

View File

@@ -30,9 +30,9 @@ How does it work?
b. In the **Polar coordinate system:** Parameters: :math:`(r,\theta)`
.. image:: images/Hough_Lines_Tutorial_Theory_0.jpg
:alt: Line variables
:height: 200pt
:align: center
:alt: Line variables
:height: 200pt
:align: center
For Hough Transforms, we will express lines in the *Polar system*. Hence, a line equation can be written as:
@@ -53,18 +53,19 @@ How does it work?
#. If for a given :math:`(x_{0}, y_{0})` we plot the family of lines that goes through it, we get a sinusoid. For instance, for :math:`x_{0} = 8` and :math:`y_{0} = 6` we get the following plot (in a plane :math:`\theta` - :math:`r`):
.. image:: images/Hough_Lines_Tutorial_Theory_1.jpg
:alt: Polar plot of a the family of lines of a point
:height: 200pt
:align: center
:alt: Polar plot of a the family of lines of a point
:height: 200pt
:align: center
We consider only points such that :math:`r > 0` and :math:`0< \theta < 2 \pi`.
#. We can do the same operation above for all the points in an image. If the curves of two different points intersect in the plane :math:`\theta` - :math:`r`, that means that both points belong to a same line. For instance, following with the example above and drawing the plot for two more points: :math:`x_{1} = 9`, :math:`y_{1} = 4` and :math:`x_{2} = 12`, :math:`y_{2} = 3`, we get:
.. image:: images/Hough_Lines_Tutorial_Theory_2.jpg
:alt: Polar plot of the family of lines for three points
:height: 200pt
:align: center
:alt: Polar plot of the family of lines for three points
:height: 200pt
: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.
#. 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.
@@ -276,14 +277,14 @@ Result
Using an input image such as:
.. image:: images/Hough_Lines_Tutorial_Original_Image.jpg
:alt: Result of detecting lines with Hough Transform
:align: center
:alt: Result of detecting lines with Hough Transform
:align: center
We get the following result by using the Probabilistic Hough Line Transform:
.. image:: images/Hough_Lines_Tutorial_Result.jpg
:alt: Result of detecting lines with Hough Transform
:align: center
:alt: Result of detecting lines with Hough Transform
:align: center
You may observe that the number of lines detected vary while you change the *threshold*. The explanation is sort of evident: If you establish a higher threshold, fewer lines will be detected (since you will need more points to declare a line detected).

View File

@@ -231,6 +231,7 @@ Explanation
Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT );
/// Gradient Y
Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT );
The function takes the following arguments:
* *src_gray*: In our example, the input image. Here it is *CV_8U*