OpenCV für Mac installieren und richtig benutzen

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • OpenCV für Mac installieren und richtig benutzen

    Hallo,

    ich habe mit sudo port install opencv OpenCV gestern installiert.

    Nun würde ich gerne eine Simple Anwendung damit machen (Kreis zeichnen oder sowas).

    Nur hab ich keine Ahnung wie das richtig gehen soll.

    In Xcode hab ich ein normales cpp Projekt angelegt und alle dylibs aus /opt/local/lib die mit opencv etwas zu haben importiert.




    Ich hab auch einige Einstellungen vorgenommen was die BuildSettings angeht

    Quellcode

    1. Undefined symbols for architecture x86_64
    2. When I first upgraded my Xcode to version 4.6, I got the following error:
    3. “cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)”, referenced from:
    4. _main in main1.o
    5. ld: symbol(s) not found for architecture x86_64
    6. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    7. I didn’t face any such problem in Xcode 4.4. Apparently a build setting seems to default to a different thing in Xcode 4.6. In fact, this started happening from Xcode 4.5 onwards. There is a simple fix for it.
    8. Open Build Settings by double-clicking on the project name with the Xcode icon. In this window, under “Architectures” section, set “Base SDK” to “Current OX S”. Now scroll down to “Apple LLVM compiler 4.1 – Language” section. In “C++ Language Dialect”, change it to “Compiler Default”. In “C++ Standard Library”, change it from “libc++ (LLVM …)” to “libstdc++ (GNU C++ …)”.
    9. That should do the trick for you. If not, there is another way to run OpenCV code. Keep reading!
    Alles anzeigen

    Quelle: prateekvjoshi.wordpress.com/20…to-get-it-up-and-running/

    nur leider funktioniert es nicht.

    Ich nutze OS X 10.8.2, Xcode 4.6, habe auch die Xcode Command Line Tools installiert, Python, Java und Qt sind bei mir auch drauf, falls es von Wichtigkeit ist.

    Kann mir da jemand genauer weiterhelfen?