Giter Club home page Giter Club logo

vision's Introduction

Computer Vision

If you came here looking for resources for CS4053, you just missed them. You can request access to a different repository with some available here if you want.

How to Set up your OpenCV environment on Mac

Please note: Keep in mind that it matters where your 'build' folder is when you run CMake, and this path is where your build folder's path should point to for eternity.

  • Install XCode
  • Install CMake
  • Download OpenCV:
    1. Get the latest release of OpenCV
    2. Create a folder called 'build' within the OpenCV folder you downloaded
    3. Open CMake
    4. Select the downloaded folder as the source file
    5. Select your new 'build' folder as where to build the binaries.
    6. Click 'configure', check that 'Unix Makefiles' is the generator for the project and that 'Use default native compilers' is checked.
    7. Click 'done'.
    8. When the configuration is done, click 'generate'.
  • Inside your build folder in the downloaded OpenCV folder, run make. (You might need to run brew install make gcc)
  • In the same directory, run sudo make install
  • Open XCode and select 'create new XCode project'.
  • Select the 'Command Line Tool' template under 'macOS'.
  • Name and create your project (Make sure you select 'C++' as the language for the project)
  • Update the Project's search paths:
    1. In 'Build Settings' search for 'Search Paths' (Make sure you are searching 'All' build settings and not just 'Basic' ones)
    2. Make sure that 'Always Search User Paths' is set to 'Yes'.
    3. Add /usr/local/lib to 'Framework Search Paths'.
    4. Add /usr/local/include to 'Header Search Paths'.
    5. Add <The path to the build folder you made>/lib to 'Library Search Paths'.
  • Search the Build Settings for 'Other Linker Flags' and add every file except the 'cv2.so' from the 'lib' folder now inside your 'build' folder from before. (You can drag and drop these into the 'Other Linker Flags' in XCode)

You can test that you have set up OpenCV correctly by replacing the code in your main.cpp with this code and running it:

#include <iostream>
#include <opencv2/opencv.hpp>

int main(int argc, const char * argv[]) {
    std::cout << "Open CV Version:" << CV_VERSION << std::endl;
    return 0;
}

vision's People

Contributors

nating avatar

Watchers

 avatar  avatar  avatar

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.