jBlog

Home page > OpenCV > OpenCV on Tiger (PPC and Intel)

OpenCV on Tiger (PPC and Intel)

Saturday 4 March 2006, by Jean-Baptiste Le Stang

I’ve started again working on OpenCV but this time I’ve moved to Tiger to do it. I set up a Xcode 2.2 project with the latest version of OpenCV to allow you to compile it on Tiger for both PPC and Intel architectures. All things related to windowing did not move since my latest attempt. I’m looking for the best way to handle Carbon events to allow Linux and Windows users a simple integration and portage to Mac OS X. The latest CVS snapshot of the CVS repository of the opencvlibrary project shows many changes concerning video capture and reading on Mac OS X using Quicktime, I’ll be testing those new changes in the weeks to come.

I’ve enclosed in this article the necessary modifications to be made to the latest official OpenCV release in order to compile it using Xcode on Mac OS X. YOu will find the Xcode porject inside the "make_" directory.

To activate the creation of Universal Binary you just have to add a new architecture in the settings of Xcode and you will get Univeral Binary frameworks for OpenCV.

[Edit 07/18/2006] All the carbon GUI part I wrote has been integrated in the CVS repository of OpenCV , you will find everything needed to compile & install OpenCV here . There is no longer any real need of an Xcode project now that everything as been backported in the OpenCV repository, you can compile the old way. The makefile will be updated soon to be able to generate frameworks and/or dynamic librairies

32 Forum messages

  • > OpenCV on Tiger (PPC and Intel) 21 March 2006 15:37, by sonots

    Hi. I am using Intel Mac Mini and OpenCV-0.9.7.

    I got errors such as ’cvconfig.h’ is not found at ’_highgui.h’ when I tried to build. So, I did ./configure to create cvconfig.h and added the path to highgui xcode project.

    Is this the correct way to build?

    Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 20 April 2006 20:31, by Kenn Sebesta

    Congratulations on your work.

    From the OpenCV Yahoo message board: ================================

    >On Feb 28, 2006, at 3:14 PM, David Li wrote:

    > Hi, I have put the Xcode file and a pre-compiled universal binary of OpenCV framework at the following URL. The mac.zip should be unzip to under opencv directory checking out from the CVS. I hope the Xcode file can eventually be integrated into the official distribution.

    http://homepage.mac.com/taweili/mac.zip

    http://homepage.mac.com/taweili/OpenCV.framework.zip

    ================================

    How does yours fit into his?

    Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 21 April 2006 10:41, by Fred

    Hi, I just got a MacBook, and I’d be willing to help on the windows_macosx.cpp part.

    On a side note, you should really work with the CVS version of OpenCV: it has gcc4 support, plus QuickTime support ! Just check out the CVS, put Jean-Baptiste’s files in the source tree, open the project in Xcode, enable SCM in Xcode, and that’s it. You may have to remove all the unwanted files from the highgui part (cvcap_*.cpp, except cvcap_qt.cpp, and windows_* except windows_macosx.cpp), add HAVE_QUICKTIME to the preprocessor symbols and "-framework QuickTime" to the link options of highgui, and that’s it!

    I now can see the output of my builtin isight in OpenCV samples (though the refresh rate is very low), and the non-interactive demos work fine. However, the programs don’t get the keypresses, clicks or trackbars, and most of the samples have no menubar. I’m new to the Mac so it might take me some time to figure out how to make it work.

    Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 23 April 2006 10:43, by Jean-Baptiste LE STANG

      I’m catching up right now with the latest CVS snapshot, my work was based on the previous official release of OpenCV, but seems like ther is not much to be done to upgrade the XCode project after all, thank you for letting me know that ! If you want to help developing OpenCV, then I would encourage you to signup on sourceforge and to subscribe to the mailing list of OpenCV developers.

      Reply to this message

    • OpenCV on Mac OS X 5 May 2006 02:41, by Vidit

      Hi

      I am trying to use the video capture feature of opencv on my Apple G5 with Logitech 4000 webcam. I got the following error:

      HIGHGUI ERROR: Video capturing is not supported (rebuild with DC1394 and/or V4L support)

      I am guessing V4L (probably, Video4Linux) is not available for Mac but DC1394 might be; I couldn’t find it though.

      Has anybody got this working?

      Reply to this message

      • > OpenCV on Mac OS X 5 May 2006 08:50, by Jean-Baptiste LE STANG

        Take the latest development version from the CVS repository, add my patch to make this work with XCode and download the latest window_macosx.cpp file from OpenCV , in which case you’ll have native support for Quicktime from within OpenCV. The video capture is done thru Quicktime and the GUI is made using Carbon. I do not know how wyou have tried to compile your OpenCV, but both V4L and DC1394 should be disable. You can also have a look to this page that might help you to get a working version of OpenCV.

        Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 7 May 2006 19:01, by Ilan

      Hi

      I just got my iMacIntel and need to be able to compile the opencv on it. I tried to follow your instructions but still experiencing some compilation errors.

      Can you zip your project and put it somewhere that I can take it from? This could really help me (and looks like it might help some other guys here in the thread... :) )

      Thanks, Ilan.

      Reply to this message

      • > OpenCV on Tiger (PPC and Intel) 8 May 2006 14:14, by Jean-Baptiste LE STANG

        I do have bandwidth and disk space issues and I cannot simply upload the whole project, I’ve uploaded and updated a version of my Xcode project. You will have to checkout the latest CVS snapshot from sourceforge and add the files I’ve uploaded by yourself. This project is not setup for an Intel compilation but you just have to activate the magic box in Xcode to get it.

        See online : Latest OpenCV Xcode project

        Reply to this message

        • Thanks for the quick response. Now it compiles and work.

          The only sample that is not compiling is: egde (I hope that I didn’t miss anything...). Thanks a alot!!!!!!!!!!!!

          Ilan.

          Reply to this message

          • > OpenCV on Tiger (PPC and Intel) 8 May 2006 17:16, by Jean-Baptiste LE STANG

            This would be a question to ask to the OpenCV developers, seems like one argument is missing to the cvSmooth(...) function but I cannont do much about it. Also keep in mind that the status is still experimental, and that some functions (I’m thinking of HighGUI) are not yet entirely finished, or do not match exactly the behaviour of what you can have on both Linux and Windows but we are working to match those implementations.

            Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 18 May 2006 11:44, by jon b

    Hey, awesome work, man.

    I’ve never used OpenCV before, but I look forward to utilizing it in a robotics project.

    I just compiled the frameworks with the latest (05-17-06) OpenCV CVS and the Xcode project & companion files you provided, on a MacBook 2.0 Core Duo.

    thanks again

    Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 14 June 2006 00:51, by JC

    hi, amazing work.

    In my xcode build however there seems to be a few missing files: I’m using the linux 0.9.7 with Tiger, and have no

    cvfilter.cpp

    cvaux.framework

    highgui.framework

    and none of the .app files. I tried getting the cvfilter from CVS, but that caused a make error.

    any ideas what i’m missing here?

    thanks!

    Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 15 June 2006 08:09, by Jean-Baptiste LE STANG

      Checkout the latest repository version, everything needed as been included, then download the latest Xcode project that I’ve published on my website here , place the Xcode project all all the companion file where described by this article and you should be fine. Also make sure that you’ve selected the right target to be compiled in Xcode.

      In the weeks to come, the OS X version of OpenCV will let you build framework without using Xcode, but directly from the makefile. The method I’m proposing will be deprecated as the best way to achieve a clean copy & install is using the makefile. At this time I’ll simply propose templates for Xcode allowing you to use those frameworks.

      Reply to this message

      • > OpenCV on Tiger (PPC and Intel) 15 June 2006 21:38, by JC

        thanks jean, that’s very helpful.

        I had to add in a few header paths, as someone else did below, and now it is *almost* compiled. It has fallen at the last hurdle with some undefined symbols that I believe are related to ffmpeg (based upon what seems a similar problem here):

        Linking /Users/ladmin/opencv/opencv-0.9.7/_make/build/Release/highgui.framework/Versions/A/highgui (2 errors)
        Undefined symbols:
        _av_close_input_file
        _av_find_stream_info
        _av_free
        _av_open_input_file
        _av_read_frame
        _av_register_all
        _avcodec_alloc_context
        _avcodec_alloc_frame
        _avcodec_close
        _avcodec_decode_video
        _avcodec_encode_video
        _avcodec_find_decoder
        _avcodec_find_encoder
        _avcodec_open
        _avpicture_fill
        ....

        any suggestions?

        thanks,

        james

        Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 5 July 2006 15:02, by Adrien BARRAL

    Hello, I will describe my problem I work on a mac book Intel, with mac OS X 10.4, and XCode2.2. I downloaded OpenCV from CVS with this command line : cvs -z3 -d:pserver:anonymous@opencvlibrary.cvs.sourceforge.net:/cvsroot/opencvlibrary co -P opencv

    I run "./configure" to generate cvInclude.h, my logout is :

    General configuration
    ===========================================
    Compiler: g++ CXXFLAGS: -Wall -fno-rtti -pipe -O3 -DNDEBUG -fomit-frame-pointer

    Install path: /usr/local

    HighGUI configuration
    ==============================================

    Windowing system --------------
    Use Carbon / Mac OS X: yes
    Use gtk+ 2.x: no
    Use gthread: no

    Image I/O ---------------------
    Use libjpeg: no
    Use zlib: yes
    Use libpng: no
    Use libtiff: no

    Video I/O ---------------------
    Use QuickTime / Mac OS X: yes
    Use xine: no
    Use ffmpeg: no
    Use dc1394 & raw1394: no
    Use v4l: no
    Use v4l2: no

    Wrappers for other languages
    =========================================
    SWIG
    Python yes

    Additional build settings
    ===========================================
    Build demo apps no

    Now run make ...

    all seems to be OK.

    Next, I removed the folder opencv/_make, and I replaced it by the folder _make i find in your archive. I copy, paste and replace file of yours highgui folder into the opencv/otherlibs/highgui folder.

    I open the .xcodeproj file of the _make folder.

    And I try to build the project.

    I have got 2 erros, during the linkage of highgui framework :

    Undefined symbol : _cvSetImageIOFunctions Internal link edit command failed.

    Could you please tell me why I can’t build OpenCV ?

    Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 5 July 2006 16:58, by BARRAL Adrien

      This problem was very easy to solve. I just added the "cxcore.hpp", and "cximage.cpp" to the framework cxCore...

      Reply to this message

      • > OpenCV on Tiger (PPC and Intel) 6 July 2006 00:41, by Jean-Baptiste LE STANG

        The Xcode project has not yet been updated to match the latest CVS release of OpenCV, this will be done soon. They are a couple of files that have been added/removed since the latest release of the OpenCV Xcode project.

        Reply to this message

      • > OpenCV on Tiger (PPC and Intel) 11 July 2006 18:26, by Will

        Hey, i’m having the same problem, but dont manage to solve it. Could you explain more precisely how you did that ? (added the "cxcore.hpp", and "cximage.cpp" to the framework cxCore..)

        Thanks a lot !!

        Reply to this message

        • > OpenCV on Tiger (PPC and Intel) 26 August 2007 04:30, by jcrada

          Hi.... I was having the same problems even after I added cximage.cpp... After a few workarounds, I realized that after adding the file you must select it, right click on it and choose get Info. Then in the Targets section you must check cxcore... Clean All and Build it again. You should get a Build succeeded... Hope it helps...

          Great work Jean... Thanks for sharing it ;).

          Juan Rada.

          Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 30 December 2006 13:32, by Phoebe Bright

    Wondered what the current state of this project was? Have tried downloading opencv as a zip and building it, tried the CVS route with and without your xcode project with no joy. Would just love to use this library...

    When using the xcode download, replaced _make and highgui (didn’t like it) tried just replacing _make - failed because windows_macosx.cpp file missing put windows_macosc.cpp file into highgui folder from cvs and nearly works, but get these errors:

    cd /Users/phoebebr/Projects/opencv/opencv/_make /usr/bin/g++-4.0 -o /Users/phoebebr/Projects/opencv/opencv/_make/build/Debug/highgui.frame work/Versions/A/highgui -L/Users/phoebebr/Projects/opencv/opencv/_make/build/Debug -F/Users/phoebebr/Projects/opencv/opencv/_make/build/Debug -filelist /Users/phoebebr/Projects/opencv/opencv/_make/build/opencv.build/Debug/ highgui.build/Objects-normal/i386/highgui.LinkFileList -framework cv -framework cxcore -framework cvaux -framework QuickTime -arch i386 -Wl,-single_module -compatibility_version 1 -current_version 1 -install_name /Users/phoebebr/Library/Frameworks/highgui.framework/Versions/A/highgu i -dynamiclib -mmacosx-version-min=10.4 -framework Carbon -isysroot /Developer/SDKs/MacOSX10.4u.sdk ld: Undefined symbols: _cvSetImageIOFunctions _CVPixelBufferCreate _CVPixelBufferGetBaseAddress _CVPixelBufferGetBytesPerRow _CVPixelBufferLockBaseAddress _CVPixelBufferRelease _CVPixelBufferUnlockBaseAddress /usr/bin/libtool: internal link edit command failed ld: Undefined symbols: _cvSetImageIOFunctions _CVPixelBufferCreate _CVPixelBufferGetBaseAddress _CVPixelBufferGetBytesPerRow _CVPixelBufferLockBaseAddress _CVPixelBufferRelease _CVPixelBufferUnlockBaseAddress /usr/bin/libtool: internal link edit command failed

    If I try to build using cvs download on the command line, I get the make[3]: Nothing to be done for `all’. errors reported by others on the yahoo groups.

    Also looking for a programmer who would be interested in a commercial project using opencv, probably on a Mac.

    Best wishes for 2007.

    Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 17 January 2007 09:03, by Jean-Baptiste LE STANG

      Hello,

      Sorry for the late reply, I took a few days off. From right now, all Mac developers should really stick to the CVS repository version of OpenCV that compiles on Mac OS X (PPC & Intel). All my work is now done on this repository and my previous developments have all been integrated in the OS X branch of OpenCV. So checkout the latest version of the repository !

      See online : Mac OS X Native port for OpenCV

      Reply to this message

    • > OpenCV on Tiger (PPC and Intel) 17 January 2007 09:07, by Jean-Baptiste LE STANG

      Could you also contact me in private so that we can discuss of your proposal? My mail address is attached to this reply.

      Reply to this message

  • > OpenCV on Tiger (PPC and Intel) 9 October 2007 10:44, by maddama

    Try adding:

    -lavutil -lavformat -lavcodec -lz -lavutil -lm

    in Other Linker Flags in the Linking collection of the target that uses OpenCV

    Reply to this message

Reply to this article

SPIP | template | | Site Map | Follow-up of the site's activity RSS 2.0