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

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