Because the libraries that are installed with homebrew in Mac are up-to-date, sometimes it is difficult to use older versions of the software.
Want to use opencv3.3 in the work, but the use of brew installation is 3.4, and later found a method, that is to specify the installation of the Opencv.rb file
Use Brew info OpenCV to see: (the latest is 3.4, I installed 3.3)
Opencv:stable 3.4.0 (bottled)
Open Source Computer Vision Library
https://opencv.org/
/usr/local/cellar/opencv/3.3.0_3 (516 files, 123MB) *
Poured from bottle in 2018-02-24 at 15:28:54
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/opencv.rb
Above can see OpenCV is from formula/opencv.rb this file, as long as find this file to the corresponding opencv3.3 commit point should be OK
Here first the clone code
git clone [email protected]:Homebrew/homebrew-core.git
Enter the Homebrew-core directory with git log./formula/opencv.rb | Less
Commit 2e4c2bb04c08074723274e618343301038777663
Author:brewtestbot <[email protected]>
Date: Sat Sep +0000 11:10:27
Opencv:update 3.3.0_3 bottle.
Can be found at this commit point opencv3.3, so git checkout to this point,
Then use the Brew install./FORMULA/OPENCV.RB, install the OPENCV, then the installation is opencv3.3.
MAC uses brew to install low-version software, such as OpenCV