leftcalgary.blogg.se

Macports install cv2
Macports install cv2











macports install cv2
  1. #MACPORTS INSTALL CV2 CODE#
  2. #MACPORTS INSTALL CV2 PASSWORD#
  3. #MACPORTS INSTALL CV2 FREE#
  4. #MACPORTS INSTALL CV2 MAC#

:)īash profile better be one of the best protected files on the system. It's actually quite clever, as it usually allows you to have multiple installs of a library on a system at once etc. Well, for starters, MacPorts usually installs in a completely different directory, so it may not have seen the other Python installs. Hope I wasn't talking down to you, I'm new to this and wanted to write down what I did before I go to sleep and forget it all, haha.

#MACPORTS INSTALL CV2 FREE#

It's a huge barrier to entry for an amazing, free product. It's strange that it's so difficult to install. Yeah, this was all much easier on Linux basically just: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON. As you can see, port has some options and there is more information here. Then I just needed to install numpy with "sudo port install py27-numpy " and opencv with "sudo port install opencv +python27". And switched it to the one I desired with "sudo port select -set python python27". Then I checked the port version with "sudo port select -list python". I type "python" to make sure it is accessing the correct one. This makes the "python" terminal command access the "python 2.7" that I want it to. I then added the line "export PATH=/opt/local/Library/Frameworks/amework/Versions/2.7/bin:$PATH" at the end of the file.

#MACPORTS INSTALL CV2 PASSWORD#

Then I opened up the hidden ~/.bash_profile (I don't know who Apple is trying to protect by making me enter the same password 5 times to edit that file). Then, I installed MacPorts, then used "sudo port install python27" in the terminal to install a MacPorts version of Python that the MacPorts version of OpenCV could access (it can't just use the python 2.7 preinstalled for some reason). I already had ffmpeg and a few other things installed. Yes, I spent a good 12 hours trying to get this thing to work, but I got it working with some help from MacPorts for Maveriks. Let me know the results, this is quite frustrating :).Įdit: By the way, strangely enough, ffplay plays the video just fine.Įdit2: Try asking on /r/computervision - it's a bigger community. I actually think OpenCV already attempts to build with FFMPEG by default, so if you have a new version installed, you could be just fine after rebuilding it using whatever. I just use MacPorts nowadays (Which by the way should have some support for compilation flags as well, as that's what it does - compile). I haven't been able to build OpenCV from scratch for quite some time since Mountain Lion / Mavericks. If you try this though, then be prepared for failure.

#MACPORTS INSTALL CV2 MAC#

There are guides to do a general build on a Mac and there are guides to build OpenCV on Linux with support for everything - so you could combine them both. Even displaying a single channel seems to be empty.Īnyway, if this is indeed a problem with FFMPEG, which may well be the case - I have had so many with the thing, then you probably have to rebuild OpenCV with FFMPEG support flags from scratch after installing the new versions.

#MACPORTS INSTALL CV2 CODE#

I couldn't find a solution even after trying every cvtColor code and capture property I could think of.

macports install cv2 macports install cv2

Seems to be a conversion problem of some sort. The reason I think the data is there is that when I try to imwrite the frames, they're fine. I have not had time to actually look at the data in the pixels. Anyway, loading it up in OpenCV goes without error, but the highgui imshow indeed displays just a black frame. "ffprobe -i video.avi" tells me, it's RGB555le format. I couldn't find the input video you linked to, so I used random other one I found. Allright, I played around with it for a while and while I can't spend any more time on it today, I believe you're right.













Macports install cv2