GithubHelp home page GithubHelp logo

Contrib installation about milq HOT 4 CLOSED

milq avatar milq commented on June 27, 2024
Contrib installation

from milq.

Comments (4)

nelkabosal avatar nelkabosal commented on June 27, 2024 1

I had the same question (I'm assuming you're talking about including OpenCV contrib to be able to use SIFT/SURF/etc.). I had to combine advice from https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/ and from this repository. I'm not confident in the quality of my solution, as I think there's a handful of settings and dependencies that differ between their methods of installation, but you at least will want to do something like

wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/${OPENCV_VERSION}.zip
unzip opencv_contrib.zip

And include
-DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-${OPENCV_VERSION}/modules
in the cmake line.

For it to work for me personally, I also removed the mv opencv-${OPENCV_VERSION} OpenCV line and used wget -O opencv.zip https://github.com/Itseez/opencv/archive/${OPENCV_VERSION}.zip for the main OpenCV files. Additionally, I just used the cmake line from https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
I didn't use the virtual environment as discussed in the link. There is some risk with that.
I wouldn't suggest blindly following my suggestions, as I'm just a novice, but feel free to build off them as you see fit.

from milq.

milq avatar milq commented on June 27, 2024

@DaniloRodrigo, @nelkabosal, currently I'm working in the script and one of the changes is adding the 'contrib' installation.

Thank you for your support.

from milq.

All4Gis avatar All4Gis commented on June 27, 2024

Amazing script.
I'm making a small change for install OpenCV Contrib.I don't do a PR because I don't know how you want to integrate it into the script.

rm -rf OpenCV

sudo apt-get install -y unzip wget
wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip
unzip ${OPENCV_VERSION}.zip && rm ${OPENCV_VERSION}.zip

wget https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip
unzip ${OPENCV_VERSION}.zip && rm ${OPENCV_VERSION}.zip

mv opencv-${OPENCV_VERSION} OpenCV
mv opencv_contrib-${OPENCV_VERSION} opencv_contrib
mv opencv_contrib/ OpenCV/

cd OpenCV && mkdir build && cd build
cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DBUILD_opencv_dnn=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON \
      -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=OFF \
      -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
make -j8
sudo make install
sudo ldconfig

from milq.

milq avatar milq commented on June 27, 2024

Thank you for your contributions @nelkabosal and @All4Gis.

Now, I commit the new version of the script with OpenCV Contrib installation.

I appreciate your effort enormously.

Thanks again.

from milq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.