diff --git a/ReadMe.md b/ReadMe.md index 2359ecc8db61ab57fb4f669dfe452bca8a69bd40..7d3a48769774aa3bac1bf51fc0d80257e8683344 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -16,46 +16,48 @@ Under MacOS most of the packages are available via [fink](http://www.finkproject * [doxygen](http://www.doxygen.org) and [graphviz](http://www.graphviz.org) to generate the documentation * stdc++ - * [OpenCV](http://opencv.org/) Computer vision library. Installation of version 3.1 or higher is desirable. It is also included here the installation of the 'opencv_contrib' libraries. To install it run the following steps (example for version 3.3): - -``` - $ wget https://github.com/opencv/opencv/archive/3.3.0.zip -O temp.zip && unzip temp.zip && rm temp.zip - $ cd opencv-3.3.0 - $ git clone https://github.com/opencv/opencv_contrib.git && cd opencv_contrib && git checkout 3.3.0 && cd .. - $ mkdir build && cd build - $ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_CXX_FLAGS="-fPIC -std=c++11" -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules .. - $ make -j4 - $ sudo make install + * [OpenCV](http://opencv.org/) Computer vision library. Installation of version 3.1 or higher is desirable. It is also included here the installation of the 'opencv_contrib' libraries, gtk2.0 and pkg-config. To install it run the following steps (example for version 3.3): + +```sh +sudo apt-get update +sudo apt-get install libgtk2.0-dev pkg-config +wget https://github.com/opencv/opencv/archive/3.3.0.zip -O temp.zip && unzip temp.zip && rm temp.zip +cd opencv-3.3.0 +git clone https://github.com/opencv/opencv_contrib.git && cd opencv_contrib && git checkout 3.3.0 && cd .. +mkdir build && cd build +cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_CXX_FLAGS="-fPIC -std=c++11" -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules .. +make -j4 +sudo make install ``` * NOTE: Check that opencv and `opencv_contrib` versions are the same. * [YAML cpp](https://github.com/jbeder/yaml-cpp): Used to load parameters from YAML files. To install it run the following commands: -``` - $ sudo apt-get update - $ sudo apt-get install libyaml-cpp-dev +```sh +sudo apt-get update +sudo apt-get install libyaml-cpp-dev ``` * [Boost](http://www.boost.org/). Free peer-reviewed portable C++ source libraries. To install it run the following commands: -``` - $ sudo apt-get update - $ sudo apt-get install libboost-all-dev +```sh +sudo apt-get update +sudo apt-get install libboost-all-dev ``` ### Compilation Just download this package, uncompress it, and execute -``` - $ cd build - $ cmake .. +```sh +cd build +cmake .. ``` to generate the makefile and then -``` - $ make +```sh +make ``` to obtain the shared library and also all the example programs. @@ -65,8 +67,8 @@ if you modify one of the `CMakeList.txt` files). To generate this documentation type -``` - $ make doc +```sh +make doc ``` The files in the `build` directory are genetated by *cmake* and *make* @@ -79,8 +81,8 @@ The default build mode is RELEASE. That is, optimizing for speed. With the DEBUG build mode objects and executables include debug information. To build in this mode execute -``` - $ cmake .. -DCMAKE_BUILD_TYPE=DEBUG +```sh +cmake .. -DCMAKE_BUILD_TYPE=DEBUG ``` The release mode will be kept until next time cmake is executed. @@ -90,8 +92,8 @@ The release mode will be kept until next time cmake is executed. In order to be able to use the library, it it necessary to copy it into the system. To do that, execute -``` - $ make install +```sh +make install ``` as root and the shared libraries will be copied to `/usr/local/lib/<vision_utils>` directory @@ -100,8 +102,8 @@ this point, the library may be used by any user. To remove the library from the system, exceute -``` - $ make uninstall +```sh +make uninstall ``` as root, and all the associated files will be removed from the system. @@ -111,21 +113,21 @@ as root, and all the associated files will be removed from the system. To build a new application using these library, first it is necessary to locate if the library has been installed or not using the following command in your `CMakeLists.txt` -``` - FIND_PACKAGE(vision_utils REQUIRED) +```cmake +FIND_PACKAGE(vision_utils REQUIRED) ``` In the case that the package is present, it is necessary to add the header files directory to the include directory path by using -``` - INCLUDE_DIRECTORIES(${vision_utils_INCLUDE_DIR}) +```cmake +INCLUDE_DIRECTORIES(${vision_utils_INCLUDE_DIR}) ``` Finally, it is also nevessary to link with the desired libraries by using the following command -``` - TARGET_LINK_LIBRARIES(<executable name> ${vision_utils_LIBRARY}) +```cmake +TARGET_LINK_LIBRARIES(<executable name> ${vision_utils_LIBRARY}) ``` ## License @@ -152,6 +154,3 @@ See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see [gnu licenses](http://www.gnu.org/licenses/) - - -