Is OpenCV supported on Python 3 yet? - opencv

I already have part of a program running in Python 3 but I need OpenCV (or SimpleCV), for a robotic vehicle, but I haven't found any install commands that seem to work, other than for Python 2.7.
If it is compatible could you please include instructions (/links to) for installation of the module?
I am using Ubuntu 14.

Maybe a little late to answer, but it's actually supported on OpenCV version 3 (in alpha state nowadays). I have successfully managed to install it, on MacOS, but I guess it would be similar on Ubuntu.
Now you have separated options for python2 and python3 when using Cmake. So you'll have to set those to make it work. That's all I needed to set:
BUILD_opencv_python3
PYTHON3_LIBRARY
PYTHON3_INCLUDE_DIR
PYTHON3_INCLUDE_DIR2
PYTHON3_NUMPY_INCLUDE_DIRS
...
Here you can find more detailed description: Link

Luigolas is correct that OpenCV 3.0 supports Python 3.x bindings. It was in release candidate status since April and the production version was released on 4 June 2015. Unfortunately for some reason the downloadable installation program on the OpenCV site does not contain a Python 3.x-compatible cv2.pyd file.
OP asked about Ubuntu but for those requiring a Windows installer, use Christoph Gohlke's site, which maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings. Visit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.

Related

How to install luagraph using luarocks

I'm trying to use luagraph, a binding to the graphviz library:
http://luagraph.luaforge.net/index.html
To install, I'm using luarocks in Mac OS X. The following command is executed in bash:
luarocks install luagraph
The output is the following:
Installing https://luarocks.org/luagraph-1.0.4-1.src.rock... Using
https://luarocks.org/luagraph-1.0.4-1.src.rock... switching to 'build'
mode
Error: Could not find expected file graphviz/graph.h, or
graphviz/graph.h for GRAPHVIZ -- you may have to install GRAPHVIZ in
your system and/or pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR to the
luarocks command. Example: luarocks install luagraph
GRAPHVIZ_DIR=/usr/local
I have been installed graphviz using homebrew, but I can't figure out how to pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR properly.
How can I install luagraph?
I've updated LuaGRAPH a couple of weeks ago. It now supports the newest version of Graphviz based on the cgraph library instead of the old graph library.
There is one drawback: I couldn't get luagraph to run on Windows using mingw because of some runtime library issues (compiler and dll compatibility probably). Please look at the README file for more details.
I personally never produced a rockspec for this module. This was created by someone else based on a fork of my luagraph library.
Installation without Luarocks is simple. Download from
https://github.com/hleuwer/luagraph
and follow the instruction in the documentation and the README file. You need adopt a simple config file which is included by make.
Herbert
Well, luaGRAPH is still the top result when searching for lua and graph. So the question is still standing.
And, unfortunately, the answer is: luagraph is OLD, the last update happened before the ubuntu 14.04 was released. And there seem to be some notable changes in the system itself, the flags the error message show do not seem to work. On top of that, graphviz is now about 20 releases newer than the luarock recommends.
There now is a bare bone alternative lua package: graphviz
It is extremely basic, and documentation in not at all informative, but at least it works.
update: Luagraph may be working again, but not through rocks. See the other answer.

Installing OpenCV on raspberry-pi

How to install OpenCv on raspberry-pi (OpenWRT)? and what is the best programming language to use on the Linux running on the Rpi?
Someone already tried to add this package to OpenWrt. You could try to update the patch.
I've also found this tutorial.
If you don't necessarily need OpenWrt, you could use Buildroot. This distro provides OpenCV already and Python integration patches were already posted to its mailing list.

'mingw32-make' is not recognized in cmd while integrate Qt 5.0.2 and OpenCV 2.4.4 with CMAKE 2.8.10.2 in Windows 7

I was installing QT5 and OpenCV 2.4.4 with CMAKE 2.8.10.2..
I was following the instruction from here and here .
The problem is, when I want to compile the OpenCV library with cmd, 'mingw32-make' is not recognized as internal or external command, operable program or batch file.
I don't know how to react, I've follow the instruction step by step..
Thanks for your answers :)
===============================
This question has been answered :)
the answer is I didn't put the path contains mingw32-make.exe (Qt5.0.2\Tools\MinGW\bin) to system variable. different version different path, made me confuse.
So, if you want to integrate Qt 5.0.2 and OpenCV 2.4.4 with CMAKE 2.8.10.2 in Windows 7, use instructions from two links that I mention it above, it works! Thanks:)
In start menu you can find pre-configured environment variable command prompt link for Qt MinGW. If you are using Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) you may find something like Qt 5.0.2 for Desktop (MinGW 4.7). Use it for your command. Please make sure you are using mingw32 version of Qt otherwise the command you are looking for is nmake.

Linux Version of Z3: Dependency On Old libgmp.so.3

Z3's dependency on libgmp.so.3 is unresolved in the linux package, leaving the user to provide this library. However, this library is very old and is not readily available.
Does anyone know a method for getting around this issue? I am currently running x86_64 and cannot get around this missing dependency without a great deal of hassle.
Is it possible the linux packages could be fixed such they include the expected library in the distribution?
You can get GMP3 by executing sudo apt install libgmp3-dev.
I'm not a Linux expert, but this is the command I used to install GMP before I compiled Z3.
When I installed the virtual machine for running Linux 64, I think I didn't find a package for the more recent versions of GMP.
I will try again. If it doesn't work, I will download the most recent GMP tar ball and build it from scratch.
BTW, the Z3 for Linux 32 comes with two .so files. One of them has GMP statically linked.
The trick I used for building this .so file didn't work for the 64 bit version.
As I said, I'm not a Linux expert, any suggestions on how to build a better Z3 library for Linux x86_64 users are welcome.

About installing the open cv library

sir,
I have tried my level best to install open cv library 2.2.0 version.but it has'nt suceeded
it shows that errors in linking the library hughigh,
whether we wanted to insatll the ipp library prior to install the opencv?
please help me ?..............
I can only recommend the install advice on the OpenCV page. If you are using a unix download the source of the library you want to install and then use cmake to install the library. That usually works fine for me.
Try installing the 1.1 version of OpenCV.
The 2.x version is brand new and as of Nov 1 2009 you will have difficulty finding documentation for that. The 1.1 version of OpenCV, on the other hand, is very well documented and you should have no trouble finding online tutorials for your platform that walk you through the installation process step-by-step.
As an aside: "IPP" refers to Intel's Performance Primitives. In the 1.1 version these are entirely optional. OpenCV does not require them. If you have the Performance Primitives installed, however, your OpenCV code may run faster. (For me it cut down my image processing time by a factor of five.) Once you get everything up and running you can purchase the IPP library from intel here: http://software.intel.com/en-us/intel-ipp/

Resources