Commit 43e083f1 authored by Bernat Gabor's avatar Bernat Gabor

Ok, now optimized the tutorial size for real. Made JPG/PNG optimization for all…

Ok, now optimized the tutorial size for real. Made JPG/PNG optimization for all the images. Modified some tutorial files to follow these size optimizations. Now the tutorial PDF generated is 3.95MB, so enjoy!
parent a23406ea
......@@ -116,4 +116,4 @@ Result
.. image:: images/Adding_Images_Tutorial_Result_0.jpg
:alt: Blending Images Tutorial - Final Result
:align: center
:align: center
\ No newline at end of file
......@@ -260,6 +260,6 @@ Result
Compiling and running your program should give you a result like this:
.. image:: images/Drawing_1_Tutorial_Result_0.jpg
.. image:: images/Drawing_1_Tutorial_Result_0.png
:alt: Drawing Tutorial 1 - Final Result
:align: center
......@@ -92,9 +92,10 @@ Code
{ for( int x = 0; x < image.cols; x++ )
{ for( int c = 0; c < 3; c++ )
{
new_image.at<Vec3b>(y,x)[c] = saturate_cast<uchar>( alpha*( image.at<Vec3b>(y,x)[c] ) + beta );
new_image.at<Vec3b>(y,x)[c] =
saturate_cast<uchar>( alpha*( image.at<Vec3b>(y,x)[c] ) + beta );
}
}
}
}
/// Create Windows
......@@ -145,8 +146,9 @@ Explanation
for( int y = 0; y < image.rows; y++ )
{ for( int x = 0; x < image.cols; x++ )
{ for( int c = 0; c < 3; c++ )
{ new_image.at<Vec3b>(y,x)[c] = saturate_cast<uchar>( alpha*( image.at<Vec3b>(y,x)[c] ) + beta ); }
}
{ new_image.at<Vec3b>(y,x)[c] =
saturate_cast<uchar>( alpha*( image.at<Vec3b>(y,x)[c] ) + beta ); }
}
}
Notice the following:
......@@ -194,6 +196,5 @@ Result
* We get this:
.. image:: images/Basic_Linear_Transform_Tutorial_Result_0.jpg
:height: 400px
:alt: Basic Linear Transform - Final Result
:align: center
:align: center
\ No newline at end of file
......@@ -97,7 +97,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
:tab-width: 4
:lines: 27-28
.. image:: images/MatBasicContainerOut1.jpg
.. image:: images/MatBasicContainerOut1.png
:alt: Demo image of the matrix output
:align: center
......@@ -125,7 +125,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
.. code-block:: cpp
IplImage* img = cvLoadImage("greatwave.jpg", 1);
IplImage* img = cvLoadImage("greatwave.png", 1);
Mat mtx(img); // convert IplImage* -> Mat
+ :basicstructures:`Create() <mat-create>` function:
......@@ -135,7 +135,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
:tab-width: 4
:lines: 31-32
.. image:: images/MatBasicContainerOut2.jpg
.. image:: images/MatBasicContainerOut2.png
:alt: Demo image of the matrix output
:align: center
......@@ -148,7 +148,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
:tab-width: 4
:lines: 40-47
.. image:: images/MatBasicContainerOut3.jpg
.. image:: images/MatBasicContainerOut3.png
:alt: Demo image of the matrix output
:align: center
......@@ -159,7 +159,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
:tab-width: 4
:lines: 50-51
.. image:: images/MatBasicContainerOut6.jpg
.. image:: images/MatBasicContainerOut6.png
:alt: Demo image of the matrix output
:align: center
......@@ -170,7 +170,7 @@ Although *Mat* is a great class as image container it is also a general matrix c
:tab-width: 4
:lines: 53-54
.. image:: images/MatBasicContainerOut7.jpg
.. image:: images/MatBasicContainerOut7.png
:alt: Demo image of the matrix output
:align: center
......@@ -197,7 +197,7 @@ In the above examples you could see the default formatting option. Nevertheless,
:tab-width: 4
:lines: 61
.. image:: images/MatBasicContainerOut8.jpg
.. image:: images/MatBasicContainerOut8.png
:alt: Default Output
:align: center
......@@ -208,7 +208,7 @@ In the above examples you could see the default formatting option. Nevertheless,
:tab-width: 4
:lines: 62
.. image:: images/MatBasicContainerOut16.jpg
.. image:: images/MatBasicContainerOut16.png
:alt: Default Output
:align: center
......@@ -219,7 +219,7 @@ In the above examples you could see the default formatting option. Nevertheless,
:tab-width: 4
:lines: 64
.. image:: images/MatBasicContainerOut10.jpg
.. image:: images/MatBasicContainerOut10.png
:alt: Default Output
:align: center
......@@ -230,7 +230,7 @@ In the above examples you could see the default formatting option. Nevertheless,
:tab-width: 4
:lines: 63
.. image:: images/MatBasicContainerOut9.jpg
.. image:: images/MatBasicContainerOut9.png
:alt: Default Output
:align: center
......@@ -241,7 +241,7 @@ In the above examples you could see the default formatting option. Nevertheless,
:tab-width: 4
:lines: 65
.. image:: images/MatBasicContainerOut11.jpg
.. image:: images/MatBasicContainerOut11.png
:alt: Default Output
:align: center
......@@ -259,7 +259,7 @@ OpenCV offers support for print of other common OpenCV data structures too via t
:tab-width: 4
:lines: 67-68
.. image:: images/MatBasicContainerOut12.jpg
.. image:: images/MatBasicContainerOut12.png
:alt: Default Output
:align: center
......@@ -271,7 +271,7 @@ OpenCV offers support for print of other common OpenCV data structures too via t
:tab-width: 4
:lines: 70-71
.. image:: images/MatBasicContainerOut13.jpg
.. image:: images/MatBasicContainerOut13.png
:alt: Default Output
:align: center
......@@ -282,7 +282,7 @@ OpenCV offers support for print of other common OpenCV data structures too via t
:tab-width: 4
:lines: 74-77
.. image:: images/MatBasicContainerOut14.jpg
.. image:: images/MatBasicContainerOut14.png
:alt: Default Output
:align: center
......@@ -293,7 +293,7 @@ OpenCV offers support for print of other common OpenCV data structures too via t
:tab-width: 4
:lines: 79-83
.. image:: images/MatBasicContainerOut15.jpg
.. image:: images/MatBasicContainerOut15.png
:alt: Default Output
:align: center
......
......@@ -230,56 +230,35 @@ As you just saw in the Code section, the program will sequentially execute diver
#. First a random set of *NUMBER* lines will appear on screen such as it can be seen in this screenshot:
.. image:: images/Drawing_2_Tutorial_Result_0.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 0
:align: center
#. Then, a new set of figures, these time *rectangles* will follow:
.. image:: images/Drawing_2_Tutorial_Result_1.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 1
:align: center
#. Then, a new set of figures, these time *rectangles* will follow.
#. Now some ellipses will appear, each of them with random position, size, thickness and arc length:
.. image:: images/Drawing_2_Tutorial_Result_2.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 2
:align: center
#. Now, *polylines* with 03 segments will appear on screen, again in random configurations.
.. image:: images/Drawing_2_Tutorial_Result_3.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 3
:align: center
#. Filled polygons (in this example triangles) will follow:
.. image:: images/Drawing_2_Tutorial_Result_4.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 4
:align: center
#. Filled polygons (in this example triangles) will follow.
#. The last geometric figure to appear: circles!
.. image:: images/Drawing_2_Tutorial_Result_5.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 5
:align: center
#. Near the end, the text *"Testing Text Rendering"* will appear in a variety of fonts, sizes, colors and positions.
.. image:: images/Drawing_2_Tutorial_Result_6.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 6
:align: center
#. And the big end (which by the way expresses a big truth too):
.. image:: images/Drawing_2_Tutorial_Result_7.jpg
:height: 300px
:alt: Drawing Tutorial 2 - Final Result 7
:align: center
:align: center
\ No newline at end of file
......@@ -55,7 +55,7 @@ This tutorial code's is shown lines below. You can also download it from `here <
namedWindow( source_window, CV_WINDOW_AUTOSIZE );
/// Create Trackbar to set the number of corners
createTrackbar( "Max corners:", source_window, &maxCorners, maxTrackbar, goodFeaturesToTrack_Demo );
createTrackbar( "Max corners:", source_window, &maxCorners, maxTrackbar, goodFeaturesToTrack_Demo);
imshow( source_window, src );
......@@ -101,7 +101,8 @@ This tutorial code's is shown lines below. You can also download it from `here <
cout<<"** Number of corners detected: "<<corners.size()<<endl;
int r = 4;
for( int i = 0; i < corners.size(); i++ )
{ circle( copy, corners[i], r, Scalar(rng.uniform(0,255), rng.uniform(0,255), rng.uniform(0,255)), -1, 8, 0 ); }
{ circle( copy, corners[i], r, Scalar(rng.uniform(0,255), rng.uniform(0,255),
rng.uniform(0,255)), -1, 8, 0 ); }
/// Show what you got
namedWindow( source_window, CV_WINDOW_AUTOSIZE );
......@@ -128,12 +129,10 @@ Result
======
.. image:: images/Corner_Subpixeles_Original_Image.jpg
:height: 200pt
:align: center
Here is the result:
.. image:: images/Corner_Subpixeles_Result.jpg
:height: 100pt
:align: center
......@@ -84,7 +84,8 @@ This tutorial code's is shown lines below. You can also download it from `here <
/* Create Window and Trackbar */
namedWindow( myHarris_window, CV_WINDOW_AUTOSIZE );
createTrackbar( " Quality Level:", myHarris_window, &myHarris_qualityLevel, max_qualityLevel, myHarris_function );
createTrackbar( " Quality Level:", myHarris_window, &myHarris_qualityLevel, max_qualityLevel,
myHarris_function );
myHarris_function( 0, 0 );
/// My Shi-Tomasi -- Using cornerMinEigenVal
......@@ -95,7 +96,8 @@ This tutorial code's is shown lines below. You can also download it from `here <
/* Create Window and Trackbar */
namedWindow( myShiTomasi_window, CV_WINDOW_AUTOSIZE );
createTrackbar( " Quality Level:", myShiTomasi_window, &myShiTomasi_qualityLevel, max_qualityLevel, myShiTomasi_function );
createTrackbar( " Quality Level:", myShiTomasi_window, &myShiTomasi_qualityLevel, max_qualityLevel,
myShiTomasi_function );
myShiTomasi_function( 0, 0 );
waitKey(0);
......@@ -112,8 +114,10 @@ This tutorial code's is shown lines below. You can also download it from `here <
for( int j = 0; j < src_gray.rows; j++ )
{ for( int i = 0; i < src_gray.cols; i++ )
{
if( myShiTomasi_dst.at<float>(j,i) > myShiTomasi_minVal + ( myShiTomasi_maxVal - myShiTomasi_minVal )*myShiTomasi_qualityLevel/max_qualityLevel )
{ circle( myShiTomasi_copy, Point(i,j), 4, Scalar( rng.uniform(0,255), rng.uniform(0,255), rng.uniform(0,255) ), -1, 8, 0 ); }
if( myShiTomasi_dst.at<float>(j,i) > myShiTomasi_minVal + ( myShiTomasi_maxVal -
myShiTomasi_minVal )*myShiTomasi_qualityLevel/max_qualityLevel )
{ circle( myShiTomasi_copy, Point(i,j), 4, Scalar( rng.uniform(0,255),
rng.uniform(0,255), rng.uniform(0,255) ), -1, 8, 0 ); }
}
}
imshow( myShiTomasi_window, myShiTomasi_copy );
......@@ -129,8 +133,10 @@ This tutorial code's is shown lines below. You can also download it from `here <
for( int j = 0; j < src_gray.rows; j++ )
{ for( int i = 0; i < src_gray.cols; i++ )
{
if( Mc.at<float>(j,i) > myHarris_minVal + ( myHarris_maxVal - myHarris_minVal )*myHarris_qualityLevel/max_qualityLevel )
{ circle( myHarris_copy, Point(i,j), 4, Scalar( rng.uniform(0,255), rng.uniform(0,255), rng.uniform(0,255) ), -1, 8, 0 ); }
if( Mc.at<float>(j,i) > myHarris_minVal + ( myHarris_maxVal - myHarris_minVal )
*myHarris_qualityLevel/max_qualityLevel )
{ circle( myHarris_copy, Point(i,j), 4, Scalar( rng.uniform(0,255), rng.uniform(0,255),
rng.uniform(0,255) ), -1, 8, 0 ); }
}
}
imshow( myHarris_window, myHarris_copy );
......@@ -145,11 +151,9 @@ Result
======
.. image:: images/My_Harris_corner_detector_Result.jpg
:height: 200pt
:align: center
.. image:: images/My_Shi_Tomasi_corner_detector_Result.jpg
:height: 200pt
:align: center
......@@ -102,7 +102,8 @@ This tutorial code's is shown lines below. You can also download it from `here <
cout<<"** Number of corners detected: "<<corners.size()<<endl;
int r = 4;
for( int i = 0; i < corners.size(); i++ )
{ circle( copy, corners[i], r, Scalar(rng.uniform(0,255), rng.uniform(0,255), rng.uniform(0,255)), -1, 8, 0 ); }
{ circle( copy, corners[i], r, Scalar(rng.uniform(0,255), rng.uniform(0,255),
rng.uniform(0,255)), -1, 8, 0 ); }
/// Show what you got
namedWindow( source_window, CV_WINDOW_AUTOSIZE );
......@@ -116,7 +117,6 @@ Result
======
.. image:: images/Shi_Tomasi_Detector_Result.jpg
:height: 200pt
:align: center
......@@ -104,13 +104,11 @@ Result
The original image:
.. image:: images/Harris_Detector_Original_Image.jpg
:height: 200pt
:align: center
The detected corners are surrounded by a small black circle
.. image:: images/Harris_Detector_Result.jpg
:height: 200pt
:align: center
......@@ -5,20 +5,23 @@
This section contains valuable tutorials about how to read/save your image/video files and how to use the built-in graphical user interface of the library.
* :ref:`Adding_Trackbars`
=============== ======================================================
|Beginners_5| *Title:* **Creating Trackbars**
*Compatibility:* > OpenCV 2.0
We will learn how to add a Trackbar to our applications
=============== ======================================================
.. |Beginners_5| image:: images/Adding_Trackbars_Tutorial_Cover.jpg
:height: 100pt
:width: 100pt
+
.. tabularcolumns:: m{100pt} m{300pt}
.. cssclass:: toctableopencv
=============== ======================================================
|Beginners_5| *Title:* :ref:`Adding_Trackbars`
*Compatibility:* > OpenCV 2.0
We will learn how to add a Trackbar to our applications
=============== ======================================================
.. |Beginners_5| image:: images/Adding_Trackbars_Tutorial_Cover.jpg
:height: 90pt
:width: 90pt
.. raw:: latex
......
......@@ -7,7 +7,7 @@ Adding a Trackbar to our applications!
* Well, it is time to use some fancy GUI tools. OpenCV provides some GUI utilities (*highgui.h*) for you. An example of this is a **Trackbar**
.. image:: images/Adding_Trackbars_Tutorial_Trackbar.jpg
.. image:: images/Adding_Trackbars_Tutorial_Trackbar.png
:alt: Trackbar example
:align: center
......@@ -153,7 +153,6 @@ Result
.. image:: images/Adding_Trackbars_Tutorial_Result_1.jpg
:alt: Adding Trackbars - Lena
:height: 500px
:align: center
......
doc/tutorials/images/calib3d.jpg

9.92 KB | W: | H:

doc/tutorials/images/calib3d.jpg

5.14 KB | W: | H:

doc/tutorials/images/calib3d.jpg
doc/tutorials/images/calib3d.jpg
doc/tutorials/images/calib3d.jpg
doc/tutorials/images/calib3d.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/core.jpg

18.4 KB | W: | H:

doc/tutorials/images/core.jpg

8.86 KB | W: | H:

doc/tutorials/images/core.jpg
doc/tutorials/images/core.jpg
doc/tutorials/images/core.jpg
doc/tutorials/images/core.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/feature2D.jpg

13.7 KB | W: | H:

doc/tutorials/images/feature2D.jpg

6.23 KB | W: | H:

doc/tutorials/images/feature2D.jpg
doc/tutorials/images/feature2D.jpg
doc/tutorials/images/feature2D.jpg
doc/tutorials/images/feature2D.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/general.jpg

11.1 KB | W: | H:

doc/tutorials/images/general.jpg

4.99 KB | W: | H:

doc/tutorials/images/general.jpg
doc/tutorials/images/general.jpg
doc/tutorials/images/general.jpg
doc/tutorials/images/general.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/gpu.jpg

14.8 KB | W: | H:

doc/tutorials/images/gpu.jpg

7.38 KB | W: | H:

doc/tutorials/images/gpu.jpg
doc/tutorials/images/gpu.jpg
doc/tutorials/images/gpu.jpg
doc/tutorials/images/gpu.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/highgui.jpg

9.04 KB | W: | H:

doc/tutorials/images/highgui.jpg

4.78 KB | W: | H:

doc/tutorials/images/highgui.jpg
doc/tutorials/images/highgui.jpg
doc/tutorials/images/highgui.jpg
doc/tutorials/images/highgui.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/imgproc.jpg

17.9 KB | W: | H:

doc/tutorials/images/imgproc.jpg

8.58 KB | W: | H:

doc/tutorials/images/imgproc.jpg
doc/tutorials/images/imgproc.jpg
doc/tutorials/images/imgproc.jpg
doc/tutorials/images/imgproc.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/introduction.jpg

10.5 KB | W: | H:

doc/tutorials/images/introduction.jpg

4.49 KB | W: | H:

doc/tutorials/images/introduction.jpg
doc/tutorials/images/introduction.jpg
doc/tutorials/images/introduction.jpg
doc/tutorials/images/introduction.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/ml.jpg

10.1 KB | W: | H:

doc/tutorials/images/ml.jpg

5.03 KB | W: | H:

doc/tutorials/images/ml.jpg
doc/tutorials/images/ml.jpg
doc/tutorials/images/ml.jpg
doc/tutorials/images/ml.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/objdetect.jpg

7.87 KB | W: | H:

doc/tutorials/images/objdetect.jpg

3.69 KB | W: | H:

doc/tutorials/images/objdetect.jpg
doc/tutorials/images/objdetect.jpg
doc/tutorials/images/objdetect.jpg
doc/tutorials/images/objdetect.jpg
  • 2-up
  • Swipe
  • Onion skin
doc/tutorials/images/video.jpg

9.28 KB | W: | H:

doc/tutorials/images/video.jpg

4.92 KB | W: | H:

doc/tutorials/images/video.jpg
doc/tutorials/images/video.jpg
doc/tutorials/images/video.jpg
doc/tutorials/images/video.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -34,9 +34,8 @@ Morphological Operations
* We will explain dilation and erosion briefly, using the following image as an example:
.. image:: images/Morphology_1_Tutorial_Theory_Original_Image.jpg
.. image:: images/Morphology_1_Tutorial_Theory_Original_Image.png
:alt: Original image
:height: 100px
:align: center
Dilation
......@@ -48,9 +47,8 @@ Dilation
* As the kernel :math:`B` is scanned over the image, we compute the maximal pixel value overlapped by :math:`B` and replace the image pixel in the anchor point position with that maximal value. As you can deduce, this maximizing operation causes bright regions within an image to "grow" (therefore the name *dilation*). Take as an example the image above. Applying dilation we can get:
.. image:: images/Morphology_1_Tutorial_Theory_Dilation.jpg
.. image:: images/Morphology_1_Tutorial_Theory_Dilation.png
:alt: Dilation result - Theory example
:height: 100px
:align: center
The background (bright) dilates around the black regions of the letter.
......@@ -64,9 +62,8 @@ Erosion
* Analagously to the example for dilation, we can apply the erosion operator to the original image (shown above). You can see in the result below that the bright areas of the image (the background, apparently), get thinner, whereas the dark zones (the "writing"( gets bigger.
.. image:: images/Morphology_1_Tutorial_Theory_Erosion.jpg
.. image:: images/Morphology_1_Tutorial_Theory_Erosion.png
:alt: Erosion result - Theory example
:height: 100px
:align: center
......@@ -268,13 +265,10 @@ Results
.. image:: images/Morphology_1_Tutorial_Original_Image.jpg
:alt: Original image
:height: 200px
:align: center
We get the results below. Varying the indices in the Trackbars give different output images, naturally. Try them out! You can even try to add a third Trackbar to control the number of iterations.
.. image:: images/Morphology_1_Tutorial_Cover.jpg
:alt: Dilation and Erosion application
:height: 400px
:align: center
:align: center
\ No newline at end of file
......@@ -69,7 +69,6 @@ Gaussian Filter
* Just to make the picture clearer, remember how a 1D Gaussian kernel look like?
.. image:: images/Smoothing_Tutorial_theory_gaussian_0.jpg
:height: 100pt
:align: center
Assuming that an image is 1D, you can notice that the pixel located in the middle would have the biggest weight. The weight of its neighbors decreases as the spatial distance between them and the center pixel increases.
......@@ -324,5 +323,4 @@ Results
.. image:: images/Smoothing_Tutorial_Result_Median_Filter.jpg
:alt: Smoothing with a median filter
:height: 200pt
:align: center
......@@ -47,11 +47,9 @@ How does it work?
====== ======
.. |T0| image:: images/Back_Projection_Theory0.jpg
:height: 200pt
:align: middle
.. |T1| image:: images/Back_Projection_Theory1.jpg
:height: 200pt
:align: middle
......@@ -62,11 +60,9 @@ How does it work?
====== ======
.. |T2| image:: images/Back_Projection_Theory2.jpg
:height: 200pt
:align: middle
.. |T3| image:: images/Back_Projection_Theory3.jpg
:height: 200pt
:align: middle
......@@ -81,7 +77,6 @@ How does it work?
d. Applying the steps above, we get the following BackProjection image for our Test Image:
.. image:: images/Back_Projection_Theory4.jpg
:height: 200pt
:align: center
e. In terms of statistics, the values stored in *BackProjection* represent the *probability* that a pixel in *Test Image* belongs to a skin area, based on the *model histogram* that we use. For instance in our Test image, the brighter areas are more probable to be skin area (as they actually are), whereas the darker areas have less probability (notice that these "dark" areas belong to surfaces that have some shadow on it, which in turns affects the detection).
......@@ -301,13 +296,10 @@ Results
====== ====== ======
.. |R0| image:: images/Back_Projection1_Source_Image.jpg
:height: 200pt
:align: middle
.. |R1| image:: images/Back_Projection1_Histogram.jpg
:height: 200pt
:align: middle
.. |R2| image:: images/Back_Projection1_BackProj.jpg
:height: 200pt
:align: middle
......@@ -34,7 +34,6 @@ What are histograms?
.. image:: images/Histogram_Calculation_Theory_Hist0.jpg
:height: 300pt
:align: center
* What happens if we want to *count* this data in an organized way? Since we know that the *range* of information value for this case is 256 values, we can segment our range in subparts (called **bins**) like:
......@@ -49,7 +48,6 @@ What are histograms?
.. image:: images/Histogram_Calculation_Theory_Hist1.jpg
:height: 150pt
:align: center
* This was just a simple example of how an histogram works and why it is useful. An histogram can keep count not only of color intensities, but of whatever image features that we want to measure (i.e. gradients, directions, etc).
......@@ -324,12 +322,10 @@ Result
#. Using as input argument an image like the shown below:
.. image:: images/Histogram_Calculation_Original_Image.jpg
:height: 150pt
:align: center
#. Produces the following histogram:
.. image:: images/Histogram_Calculation_Result.jpg
:height: 200pt
:align: center
......@@ -272,15 +272,12 @@ Results
============ ============ ============
.. |Base_0| image:: images/Histogram_Comparison_Source_0.jpg
:height: 150pt
:align: middle
.. |Test_1| image:: images/Histogram_Comparison_Source_1.jpg
:height: 150pt
:align: middle
.. |Test_2| image:: images/Histogram_Comparison_Source_2.jpg
:height: 150pt
:align: middle
where the first one is the base (to be compared to the others), the other 2 are the test images. We will also compare the first image with respect to itself and with respect of half the base image.
......
......@@ -29,7 +29,6 @@ What is an Image Histogram?
* It quantifies the number of pixels for each intensity value considered.
.. image:: images/Histogram_Equalization_Theory_0.jpg
:height: 200pt
:align: center
......@@ -43,7 +42,6 @@ What is Histogram Equalization?
* To make it clearer, from the image above, you can see that the pixels seem clustered around the middle of the available range of intensities. What Histogram Equalization does is to *stretch out* this range. Take a look at the figure below: The green circles indicate the *underpopulated* intensities. After applying the equalization, we get an histogram like the figure in the center. The resulting image is shown in the picture at right.
.. image:: images/Histogram_Equalization_Theory_1.jpg
:height: 200pt
:align: center
How does it work?
......@@ -62,7 +60,6 @@ How does it work?
To use this as a remapping function, we have to normalize :math:`H^{'}(i)` such that the maximum value is 255 ( or the maximum value for the intensity of the image ). From the example above, the cumulative function is:
.. image:: images/Histogram_Equalization_Theory_2.jpg
:height: 200pt
:align: center
* Finally, we use a simple remapping procedure to obtain the intensity values of the equalized image:
......@@ -194,13 +191,11 @@ Results
#. To appreciate better the results of equalization, let's introduce an image with not much contrast, such as:
.. image:: images/Histogram_Equalization_Original_Image.jpg
:height: 200pt
:align: center
which, by the way, has this histogram:
.. image:: images/Histogram_Equalization_Original_Histogram.jpg
:height: 150pt
:align: center
notice that the pixels are clustered around the center of the histogram.
......@@ -208,13 +203,11 @@ Results
#. After applying the equalization with our program, we get this result:
.. image:: images/Histogram_Equalization_Equalized_Image.jpg
:height: 200pt
:align: center
this image has certainly more contrast. Check out its new histogram like this:
.. image:: images/Histogram_Equalization_Equalized_Histogram.jpg
:height: 150pt
:align: center
Notice how the number of pixels is more distributed through the intensity range.
......
......@@ -37,13 +37,11 @@ How does it work?
our goal is to detect the highest matching area:
.. image:: images/Template_Matching_Template_Theory_Summary.jpg
:height: 200pt
:align: center
* To identify the matching area, we have to *compare* the template image against the source image by sliding it:
.. image:: images/Template_Matching_Template_Theory_Sliding.jpg
:height: 200pt
:align: center
* By **sliding**, we mean moving the patch one pixel at a time (left to right, up to down). At each location, a metric is calculated so it represents how "good" or "bad" the match at that location is (or how similar the patch is to that particular area of the source image).
......@@ -51,7 +49,6 @@ How does it work?
* For each location of **T** over **I**, you *store* the metric in the *result matrix* **(R)**. Each location :math:`(x,y)` in **R** contains the match metric:
.. image:: images/Template_Matching_Template_Theory_Result.jpg
:height: 200pt
:align: center
the image above is the result **R** of sliding the patch with a metric **TM_CCORR_NORMED**. The brightest locations indicate the highest matches. As you can see, the location marked by the red circle is probably the one with the highest value, so that location (the rectangle formed by that point as a corner and width and height equal to the patch image) is considered the match.
......@@ -335,13 +332,11 @@ Results
#. Testing our program with an input image such as:
.. image:: images/Template_Matching_Original_Image.jpg
:height: 200pt
:align: center
and a template image:
.. image:: images/Template_Matching_Template_Image.jpg
:height: 50pt
:align: center
#. Generate the following result matrices (first row are the standard methods SQDIFF, CCORR and CCOEFF, second row are the same methods in its normalized version). In the first column, the darkest is the better match, for the other two columns, the brighter a location, the higher the match.
......@@ -353,32 +348,25 @@ Results
============ ============ ============
.. |Result_0| image:: images/Template_Matching_Correl_Result_0.jpg
:height: 150pt
:align: middle
.. |Result_1| image:: images/Template_Matching_Correl_Result_1.jpg
:height: 150pt
:align: middle
.. |Result_2| image:: images/Template_Matching_Correl_Result_2.jpg
:height: 150pt
:align: middle
.. |Result_3| image:: images/Template_Matching_Correl_Result_3.jpg
:height: 150pt
:align: middle
.. |Result_4| image:: images/Template_Matching_Correl_Result_4.jpg
:height: 150pt
:align: middle
.. |Result_5| image:: images/Template_Matching_Correl_Result_5.jpg
:height: 150pt
:align: middle
#. The right match is shown below (black rectangle around the face of the guy at the right). Notice that CCORR and CCDEFF gave erroneous best matches, however their normalized version did it right, this may be due to the fact that we are only considering the "highest match" and not the other possible high matches.
.. image:: images/Template_Matching_Image_Result.jpg
:height: 200pt
:align: center
......@@ -25,7 +25,7 @@ What is a kernel?
------------------
A kernel is essentially a fixed size array of numerical coefficeints along with an *anchor point* in that array, which is tipically located at the center.
.. image:: images/filter_2d_tutorial_kernel_theory.jpg
.. image:: images/filter_2d_tutorial_kernel_theory.png
:alt: kernel example
:align: center
......
......@@ -26,7 +26,6 @@ Hough Circle Transform
.. image:: images/Hough_Circle_Tutorial_Theory_0.jpg
:alt: Result of detecting circles with Hough Transform
:height: 200pt
:align: center
* For sake of efficiency, OpenCV implements a detection method slightly trickier than the standard Hough Transform: *The Hough gradient method*. For more details, please check the book *Learning OpenCV* or your favorite Computer Vision bibliography
......
......@@ -31,7 +31,6 @@ How does it work?
.. image:: images/Hough_Lines_Tutorial_Theory_0.jpg
: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:
......@@ -54,7 +53,6 @@ How does it work?
.. image:: images/Hough_Lines_Tutorial_Theory_1.jpg
: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`.
......@@ -63,7 +61,6 @@ How does it work?
.. image:: images/Hough_Lines_Tutorial_Theory_2.jpg
: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.
......
......@@ -19,14 +19,12 @@ Theory
.. image:: images/Laplace_Operator_Tutorial_Theory_Previous.jpg
:alt: Previous theory
:height: 200pt
:align: center
#. And...what happens if we take the second derivative?
.. image:: images/Laplace_Operator_Tutorial_Theory_ddIntensity.jpg
:alt: Second derivative
:height: 200pt
:align: center
You can observe that the second derivative is zero! So, we can also use this criterion to attempt to detect edges in an image. However, note that zeros will not only appear in edges (they can actually appear in other meaningless locations); this can be solved by applying filtering where needed.
......
......@@ -26,7 +26,6 @@ Theory
.. image:: images/Sobel_Derivatives_Tutorial_Theory_0.jpg
:alt: How intensity changes in an edge
:height: 200pt
:align: center
You can easily notice that in an *edge*, the pixel intensity *changes* in a notorious way. A good way to express *changes* is by using *derivatives*. A high change in gradient indicates a major change in the image.
......@@ -35,14 +34,12 @@ Theory
.. image:: images/Sobel_Derivatives_Tutorial_Theory_Intensity_Function.jpg
:alt: Intensity Plot for an edge
:height: 200pt
:align: center
#. The edge "jump" can be seen more easily if we take the first derivative (actually, here appears as a maximum)
.. image:: images/Sobel_Derivatives_Tutorial_Theory_dIntensity_Function.jpg
:alt: First derivative of Intensity - Plot for an edge
:height: 200pt
:align: center
#. So, from the explanation above, we can deduce that a method to detect edges in an image can be performed by locating pixel locations where the gradient is higher than its neighbors (or to generalize, higher than a threshold).
......
......@@ -43,8 +43,7 @@ Opening
* For instance, check out the example below. The image at the left is the original and the image at the right is the result after applying the opening transformation. We can observe that the small spaces in the corners of the letter tend to dissapear.
.. image:: images/Morphology_2_Tutorial_Theory_Opening.jpg
:height: 150pt
.. image:: images/Morphology_2_Tutorial_Theory_Opening.png
:alt: Opening
:align: center
......@@ -59,8 +58,7 @@ Closing
* Useful to remove small holes (dark regions).
.. image:: images/Morphology_2_Tutorial_Theory_Closing.jpg
:height: 150pt
.. image:: images/Morphology_2_Tutorial_Theory_Closing.png
:alt: Closing example
:align: center
......@@ -76,8 +74,7 @@ Morphological Gradient
* It is useful for finding the outline of an object as can be seen below:
.. image:: images/Morphology_2_Tutorial_Theory_Gradient.jpg
:height: 150pt
.. image:: images/Morphology_2_Tutorial_Theory_Gradient.png
:alt: Gradient
:align: center
......@@ -91,8 +88,7 @@ Top Hat
dst = tophat( src, element ) = src - open( src, element )
.. image:: images/Morphology_2_Tutorial_Theory_TopHat.jpg
:height: 150pt
.. image:: images/Morphology_2_Tutorial_Theory_TopHat.png
:alt: Top Hat
:align: center
......@@ -105,8 +101,7 @@ Black Hat
dst = blackhat( src, element ) = close( src, element ) - src
.. image:: images/Morphology_2_Tutorial_Theory_BlackHat.jpg
:height: 150pt
.. image:: images/Morphology_2_Tutorial_Theory_BlackHat.png
:alt: Black Hat
:align: center
......@@ -270,17 +265,15 @@ Explanation
Results
========
* After compiling the code above we can execute it giving an image path as an argument. For this tutorial we use as input the image: **baboon.jpg**:
* After compiling the code above we can execute it giving an image path as an argument. For this tutorial we use as input the image: **baboon.png**:
.. image:: images/Morphology_2_Tutorial_Original_Image.jpg
:height: 200pt
:alt: Morphology 2: Original image
:align: center
* And here are two snapshots of the display window. The first picture shows the output after using the operator **Opening** with a cross kernel. The second picture (right side, shows the result of using a **Blackhat** operator with an ellipse kernel.
.. image:: images/Morphology_2_Tutorial_Cover.jpg
:height: 300pt
:alt: Morphology 2: Result sample
:align: center
......@@ -41,7 +41,7 @@ Gaussian Pyramid
* Imagine the pyramid as a set of layers in which the higher the layer, the smaller the size.
.. image:: images/Pyramids_Tutorial_Pyramid_Theory.jpg
.. image:: images/Pyramids_Tutorial_Pyramid_Theory.png
:alt: Pyramid figure
:align: center
......
......@@ -117,10 +117,8 @@ Result
========== ==========
.. |BRC_0| image:: images/Bounding_Rects_Circles_Source_Image.jpg
:height: 300pt
:align: middle
.. |BRC_1| image:: images/Bounding_Rects_Circles_Result.jpg
:height: 300pt
:align: middle
......@@ -119,10 +119,8 @@ Result
========== ==========
.. |BRE_0| image:: images/Bounding_Rotated_Ellipses_Source_Image.jpg
:height: 300pt
:align: middle
.. |BRE_1| image:: images/Bounding_Rotated_Ellipses_Result.jpg
:height: 300pt
:align: middle
......@@ -100,10 +100,8 @@ Result
============= =============
.. |contour_0| image:: images/Find_Contours_Original_Image.jpg
:height: 300pt
:align: middle
.. |contour_1| image:: images/Find_Contours_Result.jpg
:height: 300pt
:align: middle
......@@ -109,10 +109,8 @@ Result
========== ==========
.. |Hull_0| image:: images/Hull_Original_Image.jpg
:height: 300pt
:align: middle
.. |Hull_1| image:: images/Hull_Result.jpg
:height: 300pt
:align: middle
......@@ -109,11 +109,9 @@ Result
|PPT_0| |PPT_1|
========== ==========
.. |PPT_0| image:: images/Point_Polygon_Test_Source_Image.jpg
:height: 300pt
.. |PPT_0| image:: images/Point_Polygon_Test_Source_Image.png
:align: middle
.. |PPT_1| image:: images/Point_Polygon_Test_Result.jpg
:height: 300pt
:align: middle
......@@ -30,7 +30,6 @@ What is Thresholding?
.. image:: images/Threshold_Tutorial_Theory_Example.jpg
:alt: Threshold simple example
:height: 150pt
:align: center
Types of Thresholding
......@@ -42,9 +41,8 @@ Types of Thresholding
* To illustrate how these thresholding processes work, let's consider that we have a source image with pixels with intensity values :math:`src(x,y)`. The plot below depicts this. The horizontal blue line represents the threshold :math:`thresh` (fixed).
.. image:: images/Threshold_Tutorial_Theory_Base_Figure.jpg
.. image:: images/Threshold_Tutorial_Theory_Base_Figure.png
:alt: Threshold Binary
:height: 100pt
:align: center
Threshold Binary
......@@ -58,9 +56,8 @@ Threshold Binary
* So, if the intensity of the pixel :math:`src(x,y)` is higher than :math:`thresh`, then the new pixel intensity is set to a :math:`MaxVal`. Otherwise, the pixels are set to :math:`0`.
.. image:: images/Threshold_Tutorial_Theory_Binary.jpg
.. image:: images/Threshold_Tutorial_Theory_Binary.png
:alt: Threshold Binary
:height: 100pt
:align: center
......@@ -75,9 +72,8 @@ Threshold Binary, Inverted
* If the intensity of the pixel :math:`src(x,y)` is higher than :math:`thresh`, then the new pixel intensity is set to a :math:`0`. Otherwise, it is set to :math:`MaxVal`.
.. image:: images/Threshold_Tutorial_Theory_Binary_Inverted.jpg
.. image:: images/Threshold_Tutorial_Theory_Binary_Inverted.png
:alt: Threshold Binary Inverted
:height: 100pt
:align: center
Truncate
......@@ -91,9 +87,8 @@ Truncate
* The maximum intensity value for the pixels is :math:`thresh`, if :math:`src(x,y)` is greater, then its value is *truncated*. See figure below:
.. image:: images/Threshold_Tutorial_Theory_Truncate.jpg
.. image:: images/Threshold_Tutorial_Theory_Truncate.png
:alt: Threshold Truncate
:height: 100pt
:align: center
......@@ -109,9 +104,8 @@ Threshold to Zero
* If :math:`src(x,y)` is lower than :math:`thresh`, the new pixel value will be set to :math:`0`.
.. image:: images/Threshold_Tutorial_Theory_Zero.jpg
.. image:: images/Threshold_Tutorial_Theory_Zero.png
:alt: Threshold Zero
:height: 100pt
:align: center
......@@ -126,9 +120,8 @@ Threshold to Zero, Inverted
* If :math:`src(x,y)` is greater than :math:`thresh`, the new pixel value will be set to :math:`0`.
.. image:: images/Threshold_Tutorial_Theory_Zero_Inverted.jpg
.. image:: images/Threshold_Tutorial_Theory_Zero_Inverted.png
:alt: Threshold Zero Inverted
:height: 100pt
:align: center
......@@ -298,7 +291,6 @@ Results
.. image:: images/Threshold_Tutorial_Original_Image.jpg
:alt: Threshold Original Image
:height: 200pt
:align: center
#. First, we try to threshold our image with a *binary threhold inverted*. We expect that the pixels brighter than the :math:`thresh` will turn dark, which is what actually happens, as we can see in the snapshot below (notice from the original image, that the doggie's tongue and eyes are particularly bright in comparison with the image, this is reflected in the output image).
......@@ -306,7 +298,6 @@ Results
.. image:: images/Threshold_Tutorial_Result_Binary_Inverted.jpg
:alt: Threshold Result Binary Inverted
:height: 200pt
:align: center
......@@ -314,7 +305,4 @@ Results
.. image:: images/Threshold_Tutorial_Result_Zero.jpg
:alt: Threshold Result Zero
:height: 200pt
:align: center
:align: center
\ No newline at end of file
......@@ -53,7 +53,6 @@ You need the following tools to be installed:
This is minimal platform supported by OpenCV Java API. And it is set as default for OpenCV distribution. It is possible to use platform having higher number with OpenCV package but it requires to edit OpenCV project settings.
.. image:: images/android_sdk_and_avd_manager.png
:height: 400px
:alt: Android SDK and AVD manager
:align: center
......@@ -107,7 +106,6 @@ Get the OpenCV package for Android development
You can unpack it using any popular archiver (for example with |seven_zip|_):
.. image:: images/android_package_7zip.png
:height: 314px
:alt: Exploring OpenCV package with 7-Zip
:align: center
......@@ -133,7 +131,6 @@ Open OpenCV library and samples in Eclipse
I recommend to start familiarising yourself with OpenCV for Android from new clean workspase. So I have choosen my OpenCV package directory for new workspace:
.. image:: images/eclipse_1_choose_workspace.png
:height: 387px
:alt: Choosing C:\Work\android-opencv\ as workspace location
:align: center
......@@ -144,17 +141,11 @@ Open OpenCV library and samples in Eclipse
* Select **Window > Preferences...** to open the Preferences panel (Mac OS X: **Eclipse > Preferences**):
.. image:: images/eclipse_2_window_preferences.png
:height: 400px
:alt: Select Window > Preferences...
:align: center
* Select **Android** from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click **Proceed**. You cannot continue with this procedure until you click **Proceed**.
.. image:: images/eclipse_3_preferences_android.png
:height: 396px
:alt: Select Android from the left panel
:align: center
......@@ -179,14 +170,12 @@ Open OpenCV library and samples in Eclipse
* Right click on the *Package Explorer* window and choose **Import...** option from context menu:
.. image:: images/eclipse_5_import_command.png
:height: 400px
:alt: Select Import... from context menu
:align: center
* In the main panel select **General** > **Existing Projects into Workspace** and press **Next** buton:
.. image:: images/eclipse_6_import_existing_projects.png
:height: 450px
:alt: General > Existing Projects into Workspace
:align: center
......@@ -254,6 +243,5 @@ Well, running samples from Eclipse is very simple:
Here is sample ``Tutorial 1 Basic - 1. Add OpenCV`` detecting edges using Canny algorithm from OpenCV:
.. image:: images/emulator_canny.png
:height: 600px
:alt: Tutorial 1 Basic - 1. Add OpenCV - running Canny
:align: center
......@@ -24,29 +24,21 @@ Making a project
#. Go to **File -> New -> C/C++ Project**
.. image:: images/a0.jpg
:height: 400px
.. image:: images/a0.png
:alt: Eclipse Tutorial Screenshot 0
:align: center
#. Choose a name for your project (i.e. DisplayImage). An **Empty Project** should be okay for this example.
.. image:: images/a1.jpg
:height: 400px
.. image:: images/a1.png
:alt: Eclipse Tutorial Screenshot 1
:align: center
#. Leave everything else by default. Press **Finish**.
.. image:: images/a2.jpg
:height: 400px
:alt: Eclipse Tutorial Screenshot 2
:align: center
#. Your project (in this case DisplayImage) should appear in the **Project Navigator** (usually at the left side of your window).
.. image:: images/a3.jpg
:height: 400px
.. image:: images/a3.png
:alt: Eclipse Tutorial Screenshot 3
:align: center
......@@ -55,29 +47,17 @@ Making a project
* Right click on **DisplayImage** (in the Navigator). **New -> Folder** .
.. image:: images/a4.jpg
:height: 400px
.. image:: images/a4.png
:alt: Eclipse Tutorial Screenshot 4
:align: center
* Name your folder **src** and then hit **Finish**
.. image:: images/a5.jpg
:height: 400px
:alt: Eclipse Tutorial Screenshot 5
:align: center
* Right click on your newly created **src** folder. Choose **New source file**:
.. image:: images/a6.jpg
:height: 400px
:alt: Eclipse Tutorial Screenshot 6
:align: center
* Call it **DisplayImage.cpp**. Hit **Finish**
.. image:: images/a7.jpg
:height: 400px
.. image:: images/a7.png
:alt: Eclipse Tutorial Screenshot 7
:align: center
......@@ -113,17 +93,11 @@ Making a project
* Go to **Project-->Properties**
.. image:: images/a8.jpg
:height: 400px
:alt: Eclipse Tutorial Screenshot 8
:align: center
* In **C/C++ Build**, click on **Settings**. At the right, choose the **Tool Settings** Tab. Here we will enter the headers and libraries info:
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``.
.. image:: images/a9.jpg
:height: 400px
.. image:: images/a9.png
:alt: Eclipse Tutorial Screenshot 9
:align: center
......@@ -163,8 +137,7 @@ Making a project
opencv_legacy
opencv_flann
.. image:: images/a10.jpg
:height: 400px
.. image:: images/a10.png
:alt: Eclipse Tutorial Screenshot 10
:align: center
......@@ -184,15 +157,9 @@ Making a project
* Your project should be ready to be built. For this, go to **Project->Build all**
.. image:: images/a11.jpg
:height: 400px
:alt: Eclipse Tutorial Screenshot 11
:align: center
In the Console you should get something like
.. image:: images/a12.jpg
:height: 200px
.. image:: images/a12.png
:alt: Eclipse Tutorial Screenshot 12
:align: center
......@@ -207,24 +174,18 @@ So, now we have an executable ready to run. If we were to use the Terminal, we w
cd <DisplayImage_directory>
cd src
./DisplayImage ../images/HappyLittleFish.jpg
./DisplayImage ../images/HappyLittleFish.png
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.png. We can still do this, but let's do it from Eclipse:
#. Go to **Run->Run Configurations**
.. image:: images/a13.jpg
:height: 300px
:alt: Eclipse Tutorial Screenshot 13
:align: center
#. Under C/C++ Application you will see the name of your executable + Debug (if not, click over C/C++ Application a couple of times). Select the name (in this case **DisplayImage Debug**).
#. 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.png**:
.. image:: images/a14.jpg
:height: 300px
.. image:: images/a14.png
:alt: Eclipse Tutorial Screenshot 14
:align: center
......@@ -234,5 +195,4 @@ Assuming that the image to use as the argument would be located in <DisplayImage
:alt: Eclipse Tutorial Screenshot 15
:align: center
#. Congratulations! You are ready to have fun with OpenCV using Eclipse.
\ No newline at end of file
......@@ -110,14 +110,12 @@ When you run your program you should get something like this:
.. image:: images/Load_Save_Image_Result_1.jpg
:alt: Load Save Image Result 1
:height: 400px
:align: center
And if you check in your folder (in my case *images*), you should have a newly .jpg file named *Gray_Image.jpg*:
.. image:: images/Load_Save_Image_Result_2.jpg
:alt: Load Save Image Result 2
:height: 250px
:align: center
Congratulations, you are done with this tutorial!
......@@ -23,7 +23,7 @@ Here you can read tutorials about how to set up your computer to work with the O
=========== ======================================================
.. |Install_1| image:: images/ubuntu_logo.jpeg
.. |Install_1| image:: images/ubuntu-logo.jpg
:height: 90pt
:width: 90pt
......
......@@ -36,7 +36,7 @@ Installation by using the pre-built libraries
#. You can check the installation at the chosen path as you can see below.
.. image:: images/OpenCV_Install_Directory.jpg
.. image:: images/OpenCV_Install_Directory.png
:alt: An example of how the installation directory should look in case of success.
:align: center
......@@ -143,19 +143,19 @@ Building the library
#. Choose a directory in your file system where you will download the OpenCV libraries. I recommend creating a new one that has short path and no special charachters in it, for example :file:`D:/OpenCV`. During this tutorial I'll suppose you've done so. If you use a different directory just change this front part of the path in my future examples. Then, :menuselection:`Right Click --> SVN Checkout...` in the directory.
.. image:: images/TortoiseSVNCheckout.jpg
.. image:: images/TortoiseSVNCheckout.png
:alt: The TortoiseSVN Checkout Menu
:align: center
A window will appear where you can select from what repository you want to download source files (1) and to which directory (2):
.. image:: images/TortoiseSVNCheckoutWindow.jpg
.. image:: images/TortoiseSVNCheckoutWindow.png
:alt: The TortoiseSVN Checkout Window
:align: center
Add here either ones of the versions described above. Then push the OK button and be patient as the repository currently is over 330MB to download. It will take some time until it is finished depending on your Internet connection.
.. image:: images/SVNCheckOutProgress.jpg
.. image:: images/SVNCheckOutProgress.png
:alt: The TortoiseSVN Checkout Progress
:align: center
......@@ -173,7 +173,7 @@ Building the library
:alt: The Windows Command Startup
:align: center
.. image:: images/Sphinx_Install.jpg
.. image:: images/Sphinx_Install.png
:alt: How to start the command window
:align: center
......@@ -187,13 +187,13 @@ Building the library
#) Download the |Miktex|_ and install it. Again just follow the wizard. At the fourth step make sure you select for the *"Install missing packages on-the-fly"* the *Yes* option, as you can see on the image below. Again this will take quite some time so be patient.
.. image:: images/MiktexInstall.jpg
.. image:: images/MiktexInstall.png
:alt: The Miktex Install Screen
:align: center
#) For the |IntelTBB|_ download the source files and extract it inside a directory on your system. For example let there be :file:`D:/OpenCV/dep`. For installing the |IntelIIP|_ the story is the same. For exctracting the archives I recommend using the `7-Zip <http://www.7-zip.org/>`_ application.
.. image:: images/IntelTBB.jpg
.. image:: images/IntelTBB.png
:alt: The Miktex Install Screen
:align: center
......@@ -207,7 +207,7 @@ Building the library
#) In case of the |qtframework|_ you need to build yourself the binary files (unless you use the Microsoft Visual Studio 2008 with 32 bit compiler). To do this go to the `Qt Downloads <http://qt.nokia.com/downloads>`_ page. Download the source files (not the installers!!!):
.. image:: images/qtDownloadThisPackage.jpg
.. image:: images/qtDownloadThisPackage.png
:alt: Download this Qt Package
:align: center
......@@ -309,13 +309,13 @@ Building the library
For the documentation you need to explicitly issue the build commands on the *doc* project for the PDF files and on the *doc_html* for the HTML ones. Each of these will call *Sphinx* to do all the hard work. You can find the generated documentation inside the :file:`Build/Doc/_html` for the HTML pages and within the :file:`Build/Doc` the PDF manuals.
.. image:: images/WindowsBuildDoc.jpg
.. image:: images/WindowsBuildDoc.png
:alt: The Documentation Projects
:align: center
To collect the header and the binary files, that you will use during your own projects, into a separate directory (simillary to how the pre-built binaries ship) you need to explicitely build the *Install* project.
.. image:: images/WindowsBuildInstall.jpg
.. image:: images/WindowsBuildInstall.png
:alt: The Install Project
:align: center
......@@ -325,14 +325,14 @@ Building the library
To create an installer you need to install `NSIS <http://nsis.sourceforge.net/Download>`_. Then just build the *Package* project to build the installer into the :file:`Build/_CPack_Packages/{win32}/NSIS` folder. You can then use this to distribute OpenCV with your build settings on other systems.
.. image:: images/WindowsOpenCVInstaller.jpg
.. image:: images/WindowsOpenCVInstaller.png
:alt: The Installer directory
:align: center
To test your build just go into the :file:`Build/bin/Debug` or :file:`Build/bin/Release` directory and start a couple of applications like the *contours.exe*. If they run, you are done. Otherwise, something definitely went awfully wrong. In this case you should contact us via our :opencv_group:`user group <>`.
If everything is okay the *contours.exe* output should resemble the following image (if built with Qt support):
.. image:: images/WindowsQtContoursOutput.jpg
.. image:: images/WindowsQtContoursOutput.png
:alt: A good output result
:align: center
......@@ -359,11 +359,11 @@ If you built static libraries then you are done. Otherwise, you need to add the
%OPENCV_DIR%\bin
.. image:: images/PathEditorOpenCVInsertNew.jpg
.. image:: images/PathEditorOpenCVInsertNew.png
:alt: Right click to insert new path manually.
:align: center
.. image:: images/PathEditorOpenCVSetPath.jpg
.. image:: images/PathEditorOpenCVSetPath.png
:alt: Add the entry.
:align: center
......
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