Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacOS and OpenCV

Tags:

macos

opencv

Morning SO.

I would like to compile openCV to make it work on a webcam capture using Qt 4.7. For that purpose, OpenCV must be compiled for a 64bit system.

So, I've tried 3 compilations :

  • Compiling from the source with cmake :

    sudo cmake -G "Unix Makefiles" .
    

    it works, but I can't dump a video into a file using cvCreateVideoWriter : the output file is empty.

  • using macports :

    sudo port install opencv
    

    it's not that great because it depends on gtk2, ffmpeg and the libX .. and there is no image captured.

  • using the compiled framework

    the framework is compiled for 32 bit system only.

Does anyone have an idea ?

like image 854
dzen Avatar asked Jul 06 '10 11:07

dzen


People also ask

Does OpenCV work with Mac?

Follow the below steps to install the Opencv 4 package on macOS using the setup.py file: Step 1: Download the latest source package of Opencv 4 for python3 from here. Step 2: Extract the downloaded package using the following command. Step 3: Go inside the folder and Enter the following command to install the package.

Does OpenCV work on M1 Mac?

Welcome opencv-python for macOS on M1 It adds CI for native macOS M1 packages and supports python3. 7, 3.8, and 3.9 builds.

How do I get OpenCV for C++ on Mac?

To install Xcode go to App Store -> Search bar -> Type Xcode -> Click Download. Step 2: Now after the successful installation of Xcode, Next we have to install the command-line tool for Xcode. To install the command-line tool for Xcode, open the terminal and copy-paste the following code into your Terminal.


1 Answers

Using opencv-cocoa does the trick !

http://code.google.com/p/opencv-cocoa/

like image 166
dzen Avatar answered Oct 31 '22 16:10

dzen