Comments (26)
I tested yesterday in Ubuntu 17.10 x86_64 with Python 3.6.3.
$ pip freeze
opencv-python==3.3.1.11
...
Before I had to link to an OpenCV installed against my Python version with FFMPEG.
Now it just works out of the box 😃 Thanks everyone!
from opencv-python.
Just a quick status update. I have now built new layers which include FFmpeg to the manylinux containers. The OpenCV build is not working yet (linker does not find FFmpeg libs) but I hope I can get that fixed in the next few days.
from opencv-python.
Thanks!
from opencv-python.
These are current settings. Nothing is compiled in statically. Installing FFmpeg
doesn't help, so I guess dynamic linking won't work too.
>>> import cv2
>>> print(cv2.getBuildInformation())
General configuration for OpenCV 3.3.0 =====================================
Version control: 3.3.0
Platform:
Timestamp: 2017-09-03T09:41:40Z
Host: Linux 4.4.0-83-generic x86_64
CMake: 3.9.0
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/gmake
Configuration: Release
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2
SSE4_1 (2 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: NO
C++ Compiler: /opt/rh/devtoolset-2/root/usr/bin/c++ (ver 4.8.2)
C++ flags (Release): -fPIC -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fPIC -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: /opt/rh/devtoolset-2/root/usr/bin/cc
C flags (Release): -fPIC -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fPIC -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release):
Linker flags (Debug):
ccache: NO
Precompiled headers: YES
Extra dependencies: /opt/Qt4.8.7/lib/libQtGui.so /opt/Qt4.8.7/lib/libQtTest.so /opt/Qt4.8.7/lib/libQtCore.so /lib64/libz.so stdc++ dl m pthread rt
3rdparty dependencies: ittnotify libprotobuf libjpeg libwebp libpng libtiff libjasper IlmImf
OpenCV modules:
To be built: core flann imgproc ml objdetect photo video dnn imgcodecs shape videoio highgui superres features2d calib3d stitching videostab python2
Disabled: world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 ts viz
GUI:
QT 4.x: YES (ver 4.8.7 EDITION = OpenSource)
QT OpenGL support: NO
OpenGL support: NO
VTK support: NO
Media I/O:
ZLib: /lib64/libz.so (ver 1.2.3)
JPEG: libjpeg (ver 90)
WEBP: build (ver encoder: 0x020e)
PNG: build (ver 1.6.24)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
GDAL: NO
GDCM: NO
Video I/O:
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: NO
avcodec: NO
avformat: NO
avutil: NO
swscale: NO
avresample: NO
GStreamer: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
Aravis SDK: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: NO/NO
XIMEA: NO
Xine: NO
Intel Media SDK: NO
gPhoto2: NO
Parallel framework: pthreads
Trace: YES (with Intel ITT)
Other third-party libraries:
Use Intel IPP: NO
Use Intel IPP IW: NO
Use Intel IPP Async: NO
Use VA: NO
Use Intel VA-API/OpenCL: NO
Use Lapack: NO
Use Eigen: NO
Use Cuda: NO
Use OpenCL: YES
Use OpenVX: NO
Use custom HAL: NO
OpenCL: <Dynamic loading of OpenCL library>
Include path: /io/opencv/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: python (ver 2.7.13)
Libraries:
numpy: /opt/python/cp27-cp27mu/lib/python2.7/site-packages/numpy/core/include (ver 1.11.1)
packages path: /opt/python/cp27-cp27mu/lib/python2.7/site-packages
Python 3:
Interpreter: NO
Python (for build): python
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab: Matlab not found or implicitly disabled
Tests and samples:
Tests: NO
Performance tests: NO
C/C++ Examples: NO
Install path: /usr/local
cvconfig.h is in: /io/opencv/build
-----------------------------------------------------------------
from opencv-python.
This issue now has a funding of 0.045 ETH (21.0 USDT) attached to it.
- If you would like to work on this issue you can claim it here.
- If you've completed this issue and want to claim the bounty you can do so here
from opencv-python.
I've added some ether as a bonus to make it happen. )
from opencv-python.
None of the current builds are linked/built with FFmpeg. I will build new layers with FFmpeg and libjpeg-turbo (#52) to the Docker images as soon as I find some more free time. Thanks for the bonus 👍
from opencv-python.
@abitrolly thanks :)
from opencv-python.
hi from gitcoin.co -- doing my best to source someone to turn this around. will keep yall posted
from opencv-python.
The OpenCV build is not working yet (linker does not find FFmpeg libs)
Is there more information about that? Upstream bug maybe?
from opencv-python.
Current ouput from Travis:
-- FFMPEG: YES
-- avcodec: YES (ver 58.6.103)
-- avformat: YES (ver 58.3.100)
-- avutil: YES (ver 56.5.100)
-- swscale: YES (ver 5.0.101)
-- avresample: NO
Error:
[100%] Linking CXX shared module ../../lib/python3/cv2.cpython-35m-x86_64-linux-gnu.so
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: cannot find -lavcodec
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: cannot find -lavformat
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: cannot find -lavutil
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: cannot find -lswscale
collect2: error: ld returned 1 exit status
make[3]: *** [lib/python3/cv2.cpython-35m-x86_64-linux-gnu.so] Error 1
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/rule] Error 2
make: *** [opencv_python3] Error 2
It might also be related to custom install location. Full build logs are at Travis: https://travis-ci.org/skvark/opencv-python/builds/316114040
from opencv-python.
Builds are working now. I added FFmpeg lib path to LDFLAGS
.
from opencv-python.
The funding of 0.045 ETH (30.83 USD) attached has been claimed by @@skvark.
@@skvark, please leave a comment to let the funder (@abitrolly) and the other parties involved your implementation plan. If you don't leave a comment, the funder may expire your claim at their discretion.
- Learn more on the gitcoin issue page
- Questions? Get help on the Gitcoin Slack
- $10417.04 more Funded OSS Work Available at: https://gitcoin.co/explorer
from opencv-python.
👋 @skvark
from opencv-python.
@abitrolly @owocki I'll merge these changes during this week after I have done some local tests with the packages.
from opencv-python.
@skvark great. Looking forward to see this committed. What could help to fix this sooner? Would there be less hassle if CMake could provide a better error message, like checking for libraries in advance?
from opencv-python.
Probably would get fixed sooner if I had more time to focus on this :) But I'll try to get this done today or tomorrow (and couple of other issues too). And yes, it would be a lot faster to test the build if the compilation failed instantly vs in the very end.
from opencv-python.
great to see the progress here.. keep it up @skvark !
from opencv-python.
The changes are already in master but I'll close #53 and #48 before release.
from opencv-python.
If you prefer building the current OpenCV version for Python 3 including video support on your own locally, I provided a simple CLI tool on PyPI named cvbuilder that downloads the official sources, configures and compiles them in a virtual environment taking installed libraries into account.
from opencv-python.
Thanks. The local build support in this repository will be done via setup.py
and scikit-build
(a future proof tool targeting for upcoming PEP 518, see https://www.python.org/dev/peps/pep-0518/ and https://github.com/scikit-build/scikit-build).
The local build support is not yet there but first transition step will be after #60 has been merged. After that will follow also sdist
so users will be able to build this package locally with pip install opencv-python
if their system is missing prebuilt wheels or force an sdist
build with pip install opencv-python --no-binary
.
from opencv-python.
@abitrolly @owocki New releases with FFmpeg should be soon at PyPI.
from opencv-python.
@abitrolly let us know if its time to payout the bounty
from opencv-python.
Sorry for the delay. Christmas and all the stuff. =) Checking that it works..
$ virtualenv xxx
New python executable in /home/anatoli/a/xxx/bin/python2
Also creating executable in /home/anatoli/a/xxx/bin/python
Installing setuptools, pip, wheel...done.
$ cd xxx
$ ./bin/pip install opencv-python
Collecting opencv-python
Downloading opencv_python-3.3.1.11-cp27-cp27mu-manylinux1_x86_64.whl (24.7MB)
100% |████████████████████████████████| 24.7MB 32kB/s
Collecting numpy>=1.11.1 (from opencv-python)
Using cached numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.13.3 opencv-python-3.3.1.11
Installation is ok. Now I need to find some example to run..
from opencv-python.
I can't find anything to run right now and there is little time on my back. Info is reporting FFMPEG is compiled in, so I see no reason to delay the award anymore. )
>>> import cv2
>>> print(cv2.getBuildInformation())
General configuration for OpenCV 3.3.1 =====================================
Version control: 3.3.1-dirty
...
Video I/O:
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: YES
avcodec: YES (ver 58.6.103)
avformat: YES (ver 58.3.100)
avutil: YES (ver 56.5.100)
swscale: YES (ver 5.0.101)
avresample: NO
...
...
from opencv-python.
The funding of 0.045 ETH (30.61 USD) attached to this issue has been approved & issued to @skvark.
- Learn more at on the gitcoin issue page
- Questions? Get help on the Gitcoin Slack
- $9634.84 more Funded OSS Work Available at: https://gitcoin.co/explorer
from opencv-python.
Related Issues (20)
- PyPI: macOS arm64 wheel missing
- cv2.createThinPlateSplineShapeTransformer not exist in 4.10
- imdecode jpeg2000 segfault or deadlock in multithreading HOT 2
- Typing of compare does not allow scalar for src1 or src2
- Why Building wheel for opencv-python when using "pip install opencv-python"
- remove the desired text from the image
- Add option to skip jacobian calculation for cv2.projectPoints() to speed up calculation HOT 8
- Picture overlap error HOT 2
- Maybe cv2.findContours() error. It is inconsistent.
- BUG: cv2.fillPoly() causing segmentation fault on Ubuntu 22.04.4 LTS HOT 1
- [Suggestion] Metapackage as solution to current issues with opencv as dependency HOT 1
- Build from source python 3.12 fails HOT 6
- error: OpenCV(4.8.0) /io/opencv/modules/core/src/copy.cpp:71: error: (-215:Assertion failed) cn <= 4 in function 'scalarToRawData'
- ModuleNotFoundError: No module named 'distutils' in latest release HOT 7
- MacOS arm64 wheels missing from PyPI 4.10 release HOT 2
- ImportError: numpy.core.multiarray --- Numpy 2.0.0 HOT 1
- cv2/cv2.abi3.so, 2): Library not loaded: /usr/local/opt/libunistring/lib/libunistring.2.dylib Referenced from: /usr/local/opt/gnutls/lib/libgnutls.30.dylib HOT 1
- When will opencv-python support numpy 2.0? HOT 6
- compile bug
- AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-python.