Commit a971e061 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed bug #1153; updated tutorials

parent 9a7d86d9
......@@ -89,7 +89,9 @@ endif(NOT @CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE@ STREQUAL "")
# For OpenCV built as static libs, we need the user to link against
# many more dependencies:
IF (NOT @BUILD_SHARED_LIBS@)
set(OpenCV_SHARED @BUILD_SHARED_LIBS@)
IF (NOT OpenCV_SHARED)
# Under static libs, the user of OpenCV needs access to the 3rdparty libs as well:
if(WIN32 AND NOT ANDROID)
LINK_DIRECTORIES(@CMAKE_BASE_INCLUDE_DIRS_CONFIGCMAKE@/3rdparty/lib)
......@@ -111,7 +113,7 @@ IF (NOT @BUILD_SHARED_LIBS@)
set(OpenCV_LIBS ${OpenCV_LIBS} ${OPENCV_EXTRA_COMPONENTS})
endif(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_MINOR_VERSION GREATER 4)
ENDIF(NOT @BUILD_SHARED_LIBS@)
ENDIF()
# ======================================================
# Android camera helper macro
......
......@@ -90,7 +90,9 @@ if(WIN32)
set(CPACK_NSIS_MENU_LINKS
"http://opencv.willowgarage.com" "Start Page"
"doc\\\\opencv.pdf" "The Reference Manual"
"doc\\\\opencv2refman_cpp.pdf" "The OpenCV C++ Reference Manual"
"doc\\\\opencv2refman_py.pdf" "The OpenCV Python Reference Manual"
"doc\\\\opencv_tutorials.pdf" "The OpenCV Tutorials for Beginners"
"CMakeLists.txt" "The Build Script (open with CMake)"
"samples\\\\c" "C Samples"
"samples\\\\cpp" "C++ Samples"
......
......@@ -13,12 +13,13 @@ project(opencv_docs)
file(GLOB_RECURSE OPENCV2_FILES_PICT ../modules/*.png ../modules/*.jpg)
file(GLOB_RECURSE OPENCV2_FILES_RST ../modules/*.rst)
file(GLOB_RECURSE OPENCV2_PY_FILES_RST opencv2/*.rst)
file(GLOB_RECURSE OPENCV1_FILES_PICT pics/*.png pics/*.jpg)
file(GLOB_RECURSE OPENCV1_FILES_RST opencv1/*.rst)
file(GLOB_RECURSE OPENCV_FILES_UG user_guide/*.rst)
file(GLOB_RECURSE OPENCV_FILES_TUT tutorials/*.rst)
set(OPENCV_DOC_DEPS conf.py ${OPENCV2_FILES_RST} ${OPENCV2_FILES_PICT}
set(OPENCV_DOC_DEPS conf.py ${OPENCV2_FILES_RST} ${OPENCV2_FILES_PICT} ${OPENCV2_PY_FILES_RST}
${OPENCV1_FILES_RST} ${OPENCV1_FILES_PICT}
${OPENCV_FILES_UG} ${OPENCV_FILES_TUT})
......@@ -30,8 +31,10 @@ add_custom_target(docs
${CMAKE_CURRENT_SOURCE_DIR}/pics ${CMAKE_CURRENT_BINARY_DIR}/doc/opencv1/pics
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/mymath.sty ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${PDFLATEX_COMPILER} opencv2refman
COMMAND ${PDFLATEX_COMPILER} opencv2refman
COMMAND ${PDFLATEX_COMPILER} opencv2refman_cpp
COMMAND ${PDFLATEX_COMPILER} opencv2refman_cpp
COMMAND ${PDFLATEX_COMPILER} opencv2refman_py
COMMAND ${PDFLATEX_COMPILER} opencv2refman_py
COMMAND ${PDFLATEX_COMPILER} opencv1refman_c
COMMAND ${PDFLATEX_COMPILER} opencv1refman_c
COMMAND ${PDFLATEX_COMPILER} opencv1refman_py
......
No preview for this file type
......@@ -111,26 +111,28 @@ Making a project
#. We are only missing one final step: To tell OpenCV where the OpenCV headers and libraries are. For this, do the following:
* Go to **Project-->Properties**
*
Go to **Project-->Properties**
.. image:: images/Eclipse_Tutorial_Screenshot-8.png
:height: 400px
:alt: Eclipse Tutorial Screenshot 8
:align: center
.. image:: images/Eclipse_Tutorial_Screenshot-8.png
: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:
*
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:
::
*
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
/usr/local/include/opencv
.. image:: images/Eclipse_Tutorial_Screenshot-9.png
.. image:: images/Eclipse_Tutorial_Screenshot-9.png
:height: 400px
:alt: Eclipse Tutorial Screenshot 9
:align: center
.. note::
.. note::
If you do not know where your opencv files are, open the **Terminal** and type:
.. code-block:: bash
......@@ -144,48 +146,54 @@ Making a project
-I/usr/local/include/opencv -I/usr/local/include
b. Now go to **GCC C++ Linker**,there you have to fill two spaces:
*
Now go to **GCC C++ Linker**,there you have to fill two spaces:
* In **Library search path (-L)** you have to write the path to where the opencv libraries reside, in my case the path is:
::
*
In **Library search path (-L)** you have to write the path to where the opencv libraries reside, in my case the path is: ::
/usr/local/lib
* In **Libraries(-l)** add the OpenCV libraries that you may need. Usually just the 3 first on the list below are enough (for simple applications) . In my case, I am putting all of them since I plan to use the whole bunch:
* opencv_core
* opencv_imgproc
* opencv_highgui
* opencv_ml
* opencv_video
* opencv_features2d
* opencv_calib3d
* opencv_objdetect
* opencv_contrib
* opencv_legacy
* opencv_flann
/usr/local/lib
*
In **Libraries(-l)** add the OpenCV libraries that you may need. Usually just the 3 first on the list below are enough (for simple applications) . In my case, I am putting all of them since I plan to use the whole bunch:
* opencv_core
* opencv_imgproc
* opencv_highgui
* opencv_ml
* opencv_video
* opencv_features2d
* opencv_calib3d
* opencv_objdetect
* opencv_contrib
* opencv_legacy
* opencv_flann
.. image:: images/Eclipse_Tutorial_Screenshot-10.png
.. image:: images/Eclipse_Tutorial_Screenshot-10.png
:height: 400px
:alt: Eclipse Tutorial Screenshot 10
:align: center
.. note::
.. note::
If you don't know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in **Terminal**:
If you don't know where your libraries are (or you are just psychotic and want to make sure the path is fine), type in **Terminal**:
.. code-block:: bash
.. code-block:: bash
pkg-config --libs opencv
pkg-config --libs opencv
My output (in case you want to check) was:
My output (in case you want to check) was:
.. code-block:: bash
.. code-block:: bash
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
-L/usr/local/lib -lopencv_core -lopencv_imgproc \
-lopencv_highgui -lopencv_ml -lopencv_video \
-lopencv_features2d -lopencv_calib3d \
-lopencv_objdetect -lopencv_contrib \
-lopencv_legacy -lopencv_flann
Now you are done. Click **OK**
Now you are done. Click **OK**
* Your project should be ready to be built. For this, go to **Project->Build all**
......
.. toctree::
The following links describe a set of basic OpenCV tutorials. All the source code mentioned here is provide as part of the OpenCV regular releases, so check before you start copy & pasting the code. The list of tutorials below is automatically generated from reST files located in our SVN repository.
.. note::
......@@ -203,3 +201,21 @@ As always, we would be happy to hear your comments and receive your contribution
.. |ImageProcessing_2| image:: images/Morphology_1_Tutorial_Cover.png
:height: 200px
.. toctree::
:hidden:
Linux_Installation.rst
Windows_Installation.rst
Linux_GCC_Usage.rst
Linux_Eclipse_Usage.rst
Display_Image.rst
Load_Save_Image.rst
Basic_Linear_Transform.rst
Adding_Images.rst
Adding_Trackbars.rst
Drawing_1.rst
Drawing_2.rst
Smoothing.rst
Morphology_1.rst
......@@ -10,6 +10,7 @@ Welcome to opencv documentation!
:maxdepth: 2
modules/refman.rst
doc/opencv2/py/py_index.rst
doc/opencv1/c/c_index.rst
doc/opencv1/py/py_index.rst
doc/user_guide/user_guide.rst
......
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