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!

This commit is contained in:
Bernat Gabor
2011-07-20 18:08:25 +00:00
parent a23406ea6c
commit 43e083f145
387 changed files with 108 additions and 259 deletions

View File

@@ -116,4 +116,4 @@ Result
.. image:: images/Adding_Images_Tutorial_Result_0.jpg
:alt: Blending Images Tutorial - Final Result
:align: center
:align: center

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB