I'm trying to install openCV on university's iMac,
but the problem is our university's network is so strict.
and I couldn't install openCV using MacPorts.
I tried google to look for a way to install but it all failed
i guess because it is kind of old ways and because my network is so strict.
So if anybody knows a way that I can download a ready framework with how to use it inside
Xcode. or at least a framework with how to install it to work with Xcode.
or a way to download from the source and compile it then install it in Xcode
please.
Because I tried the cmake way and I still have no luck to get it work.
thanks in advance.
sources I used:
http://salemsayed.me/?p=240
http://opencv.willowgarage.com/wiki/InstallGuide
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
http://www.ient.rwth-aachen.de/cms/software/opencv/
I'm using Lion + Xcode 4.x branch, with OpenCV svn trunk. Everything works fine. You have to install cmake first, then get the code from the svn following the instructions at http://code.opencv.org . The compilation process worked fine for me for all the core modules + the Qt module + the GPU module + TBB acceleration.
The instructions are the same as the Linux platform.
After setting up cmake configuration in a terminal (using ccmake for a more interactive tool),
I set the architecture to x86_64 (on my MBP Core 2 Duo), the target directory to /usr/local/(the default), and I have Intel TBB installed in /usr/local/.
Cmake generates the makefiles for you, so you just have to type make -j2 to compile, then sudo make install. If you're working on a workstation, then you have more CPU power, and you can replace the value 2 by more, e.g. 8.
Related
I have a Mac with Big Sur and Apple's chip M1, which is ARM's chip, as you probably know.
Problem arises when I try to include Google's libwebp.a to my project. Xcode says that "it is not build for architecture arm64".
I installed Homebrew and then installed libwebp with brew install libwebp (or similar, I am writing from memory), opened directory where it was saved, copied libwebp.a and Xcode gave me same error.
Then I downloaded source and did:
./configure
make
make install
I copied compiled library and Xcode again gave me the same error. It seems that libwebp is not compiled for arm64.
Is it even possible to compile it for arm64 on Big Sur, and if yes, how?
To use brew on Apples M1 you need to use two installs:
First (the one for ARM): /opt/homebrew
Second (the one for x86): /usr/local
There are pretty good articles how to build a side-by-side install:
https://soffes.blog/homebrew-on-apple-silicon
https://noahpeeters.de/posts/apple-silicon/homebrew-setup/
When you got this working you need to remove the old lib (that was built with the x86 arch) and install it freshly using the arm packages.
I have been trying to install bakefile(v0.2.9) in mac osx 10.11. Whenever I try to install bakefile using the dmg file I get The installation failed.The installer could not install the software because there was no software found to install error.
I even tried building it from the source code(v1.2.5.1 from github). I built it using the sudo make command.However sudo make install command throws No rule to make target install.
Is there any other way to install bakefile in macosx 10.11?
Edit :
Finally I managed to install the bakefile 0.2.9 in osx 10.11. I can't use the latest version as it does not supports the bakefile we have been using in our projects.
Though the installation is successful,I get the segmentation fault 11 when I try to build the bakefiles(.bkl). Some of the forums suggested that the problem could be associated with python 2.7. I followed all the steps needed to resolve the issue. But none of them helped.
I have been using python 2.7.11. How can I avoid this segmentation fault?
I advice against using the legacy 0.2.9 version.
I even tried building it from the source code(v1.2.5.1 from github).
You didn’t, that’s the problem — you tried to build a very different version, 0.2.9 != 1.2.5.1. The relation between these two branches is explained at http://bakefile.org — they are incompatible and different.
If you want to build 0.2.9 from sources, you need to download and build 0.2.9.
If you want to use the 1.x version, you can download packaged “binary” version, as explained at https://github.com/vslavik/bakefile
P.S. You don’t need to, and shouldn’t, use sudo when installing somewhere you typically have access to, such as /usr/local on OS X.
The ironic thing is that all this used to work on my Mac, but Apple no longer supports 10.5.8, so I was forced to update to Snow Leopard, 10.6. And everything broke (thank you Apple).
On the surface, it seems simple. Build an open source package like octave under Snow Leopard (Mac OS X 10.6)
Apple has made this difficult, to say the least. They no longer download XCode for older operating systems unless you are a paid developer. My Macbook pro 2.16Ghz cannot load Lion, so that option is not available.
My old fink doesn't work because it was old. In order to build a new one, I need Xcode 3.2, which I can't get (see above).
I downloaded a free gcc 4.2, and it works fine.
So in order to try to build octave, it's the old style gnu install:
./configure
make
make install
./configure fails because there is no fortran installed. That's a special case because the install of gcc didn't include fortran. So a fallback would be building a complete gcc which I have done in the past.
downloaded gcc 4.9:
gcc-4.9-20130728
inside, gcc49
gcc can't build because it needs the three subsidiary packages gmp, mpfr and mpc
I am now trying to build these, so that I can bootstrap a complete gcc build, but in the meantime, is there any simpler way to bootstrap these things? I find it hard to understand why no binaries are available for:
fink
octave
which would solve part of my current problems.
You can still get XCode. You just have to be registered on Apple Developer, but you do not have to pay for the license. You then download it through the Mac App store, or you can get a link that opens it in the App store here. Finally, you have to install the command line tools from within Xcode. These can be found under the Components tab of the Download Preferences panel.
Let me know if that does not help. My iMac running 10.6 is currently in for repairs, so I am on my 10.7 laptop and cannot test all the specifics yet.
I am new to openCV. How do I install this library on Mac OS X 10.6.8 and how do I include it in Xcode?
Start with one thing at a time:
Install OpenCV
Setup an XCode project
The easiest way is to install OpenCV is via MacPorts.
Make sure you've installed XCode's Command Line Tools first!
sudo port install opencv
note that you can also use ports variants (to add extra features e.g. python and QT support)
sudo port install opencv +qt4 +python27
As of very recently there should also be OpenNI support in MacPorts.
The other option is to build from source using Terminal. You'd also need CMake on top of XCode Command Line Tools
Regarding using OpenCV in XCode, it's a matter of making a c++ project and setting up the header and library search paths for the projects. If you use Macports those would be /opt/local/include/ and /opt/local/lib
I'm trying to build OpenCV 2.2 with CUDA on my mac (using Mac OS 10.6.7 and Xcode 4). I followed the instructions on the opencv wiki, but it doesn't seem to work.
First of all, I can't find the NPP for the 3.2 version of the CUDA toolkit. I've tried then using the 4.0 version (even though it is not yet stable). The structure of the NPP directories is completely different than that assumed by the CMake script shipped with OpenCV. I've tried adapting it so that that it would find the NPP.
Apparently it had worked, except that when I build OpenCV on Xcode, I generate every library except gpu.
Has someone tried and was successful when trying to build OpenCV with CUDA on Mac OSX?
Thanks,
Renan
install cuda 4
then go to...
$ cd /developer/gpu computing/
build samples and libs.....
$ make
$ open /OpenCV-2.3.0/modules/gpu/CMakeLists.txt
go to line #48 and comment out this if statement....
//if (APPLE)
//set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-fno-finite-math-only;")
//endif()
now you should be able to compile gpu libs.
basically your getting rid of the 3.2 no NPP exception.
you could enable exceptions like this....
if (APPLE)
set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
endif()
my gnu tests where faster negating the apple statement.