From ed788229ed746ff1a399073ed0ba19579c823257 Mon Sep 17 00:00:00 2001 From: Sajarin Date: Thu, 19 Dec 2019 10:15:59 -0500 Subject: [PATCH 1/2] Merge pull request #16165 from sajarindider:macOS_install * doc: added macOS installation guide * doc: added clarification and corrections * docs: introduction entry, lowercase file names and ids --- .../macos_install/macos_install.markdown | 116 ++++++++++++++++++ .../table_of_content_introduction.markdown | 8 ++ 2 files changed, 124 insertions(+) create mode 100644 doc/tutorials/introduction/macos_install/macos_install.markdown diff --git a/doc/tutorials/introduction/macos_install/macos_install.markdown b/doc/tutorials/introduction/macos_install/macos_install.markdown new file mode 100644 index 0000000000..016e32ae5d --- /dev/null +++ b/doc/tutorials/introduction/macos_install/macos_install.markdown @@ -0,0 +1,116 @@ +Installation in MacOS {#tutorial_macos_install} +===================== + +The following steps have been tested for MacOSX (Mavericks) but should work with other versions as well. + +Required Packages +----------------- + +- CMake 3.9 or higher +- Git +- Python 2.7 or later and Numpy 1.5 or later + +This tutorial will assume you have [Python](https://docs.python.org/3/using/mac.html), +[Numpy](https://docs.scipy.org/doc/numpy-1.10.1/user/install.html) and +[Git](https://www.atlassian.com/git/tutorials/install-git) installed on your machine. + +@note +OSX comes with Python 2.7 by default, you will need to install Python 3.8 if you want to use it specifically. + +@note +If you XCode and XCode Command Line-Tools installed, you already have git installed on your machine. + +Installing CMake +---------------- +-# Find the version for your system and download CMake from their release's [page](https://cmake.org/download/) + +-# Install the dmg package and launch it from Applications. That will give you the UI app of CMake + +-# From the CMake app window, choose menu Tools --> Install For Command Line Use. + +-# Install folder will be /usr/bin/ by default, submit it by choosing Install command line links. + +-# Test that it works by running + @code{.bash} + cmake --version + @endcode + +Getting OpenCV Source Code +-------------------------- + +You can use the latest stable OpenCV version or you can grab the latest snapshot from our +[Git repository](https://github.com/opencv/opencv.git). + +### Getting the Latest Stable OpenCV Version + +- Go to our [downloads page](http://opencv.org/releases.html). +- Download the source archive and unpack it. + +### Getting the Cutting-edge OpenCV from the Git Repository + +Launch Git client and clone [OpenCV repository](http://github.com/opencv/opencv). +If you need modules from [OpenCV contrib repository](http://github.com/opencv/opencv_contrib) then clone it as well. + +For example +@code{.bash} +cd ~/ +git clone https://github.com/opencv/opencv.git +git clone https://github.com/opencv/opencv_contrib.git +@endcode +Building OpenCV from Source Using CMake +--------------------------------------- + +-# Create a temporary directory, which we denote as ``, where you want to put + the generated Makefiles, project files as well the object files and output binaries and enter + there. + + For example + @code{.bash} + mkdir build_opencv + cd build_opencv + @endcode + + @note It is good practice to keep clean your source code directories. Create build directory outside of source tree. + +-# Configuring. Run `cmake [] ` + + For example + @code{.bash} + cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON ../opencv + @endcode + + or cmake-gui + + - set full path to OpenCV source code, e.g. `/home/user/opencv` + - set full path to ``, e.g. `/home/user/build_opencv` + - set optional parameters + - run: "Configure" + - run: "Generate" + +-# Description of some parameters + - build type: `CMAKE_BUILD_TYPE=Release` (or `Debug`) + - to build with modules from opencv_contrib set `OPENCV_EXTRA_MODULES_PATH` to `/modules` + - set `BUILD_DOCS=ON` for building documents (doxygen is required) + - set `BUILD_EXAMPLES=ON` to build all examples + +-# [optional] Building python. Set the following python parameters: + - `PYTHON3_EXECUTABLE = ` + - `PYTHON3_INCLUDE_DIR = /usr/include/python` + - `PYTHON3_NUMPY_INCLUDE_DIRS = + /usr/lib/python/dist-packages/numpy/core/include/` + @note + To specify Python2 versions, you can replace `PYTHON3_` with `PYTHON2_` in the above parameters. + +-# Build. From build directory execute *make*, it is recommended to do this in several threads + + For example + @code{.bash} + make -j7 # runs 7 jobs in parallel + @endcode + +-# To use OpenCV in your CMake-based projects through `find_package(OpenCV)` specify `OpenCV_DIR=` variable. + +@note +You can also use a package manager like [Homebrew](https://brew.sh/) +or [pip](https://pip.pypa.io/en/stable/) to install releases of OpenCV only (Not the cutting edge). diff --git a/doc/tutorials/introduction/table_of_content_introduction.markdown b/doc/tutorials/introduction/table_of_content_introduction.markdown index 2f239f578f..b6dc8bd48b 100644 --- a/doc/tutorials/introduction/table_of_content_introduction.markdown +++ b/doc/tutorials/introduction/table_of_content_introduction.markdown @@ -110,6 +110,14 @@ Additionally you can find very basic sample source code to introduce you to the Modify Android camera preview with OpenCL +- @subpage tutorial_macos_install + + _Compatibility:_ \> OpenCV 3.4.x + + _Author:_ [\@sajarindider](https://github.com/sajarindider) + + We will learn how to setup OpenCV in MacOS. + - @subpage tutorial_ios_install _Compatibility:_ \> OpenCV 2.4.2 From 64e6cf9fe50ef25d317d3529a42d4862b93f002a Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 19 Dec 2019 18:16:47 +0300 Subject: [PATCH 2/2] release: OpenCV 3.4.9 --- modules/core/include/opencv2/core/version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/version.hpp b/modules/core/include/opencv2/core/version.hpp index 2a41194a47..233aed388b 100644 --- a/modules/core/include/opencv2/core/version.hpp +++ b/modules/core/include/opencv2/core/version.hpp @@ -8,7 +8,7 @@ #define CV_VERSION_MAJOR 3 #define CV_VERSION_MINOR 4 #define CV_VERSION_REVISION 9 -#define CV_VERSION_STATUS "-pre" +#define CV_VERSION_STATUS "" #define CVAUX_STR_EXP(__A) #__A #define CVAUX_STR(__A) CVAUX_STR_EXP(__A)