Giter VIP home page Giter VIP logo

docker-python3-opencv's Introduction

Docker Automated buil

Docker image with python 3.7 and opencv 4.1.0

Usage:

docker run -it jjanzic/docker-python3-opencv python
>>> import cv2

Image tagged with :contrib contains docker image built with contrib modules

List of available docker tags:

  • opencv-4.1.0 (latest branch)
  • contrib-opencv-4.1.0 (opencv_contrib branch)
  • opencv-4.0.1
  • contrib-opencv-4.0.1
  • opencv-4.0.0
  • contrib-opencv-4.0.0
  • opencv-3.4.2
  • contrib-opencv-3.4.2
  • opencv-3.4.1
  • contrib-opencv-3.4.1
  • opencv-3.4.0
  • contrib-opencv-3.4.0
  • opencv-3.3.0
  • contrib-opencv-3.3.0
  • opencv-3.2.0
  • contrib-opencv-3.2.0

docker-python3-opencv's People

Contributors

albertoxamin avatar denismakogon avatar dnstanciu avatar f9n avatar gigante avatar gorogoroyasu avatar handflucht avatar janza avatar ptqa avatar puneetkohli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-python3-opencv's Issues

Docker Image Name and Tags

Can we rename the docker image?

If we use this name (jjanzic/python3-opencv) would be more appropriate,
Instead of using this name (jjanzic/docker-python3-opencv).

And also tags.

  • Current Tags
    • opencv-4.0.0
    • contrib-opencv-4.0.0
  • New Tags
    • 4.0.0
    • 4.0.0-contrib

Usage

$ # Current
$ docker container run -it jjanzic/docker-python3-opencv:opencv-4.0.0 python
$ docker container run -it jjanzic/docker-python3-opencv:contrib-opencv-4.0.0 python
$ # New
$ docker container run -it jjanzic/python3-opencv:4.0.0 python
$ docker container run -it jjanzic/python3-opencv:4.0.0-contrib python

Run Gui windows

Dear janza, i have this error:

error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

When use things with windows, what can i do please?

did docker build but cannot import cv2

Greeting,

I ran this Dockerfile on my unbuntu VM, with a minor change in the first line as "from python". After it's done I tried import cv2, but got

>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

Do I miss anything? Thanks,

Chun-Yen

Create image with previous version of contrib

We've been using your docker image for our testing and noticed our code started failing today on automated builds due to the upgrade.

We reverted to contrib-opencv-3.4.1 but that has an older version of cmake.

Can you release a version of contrib which was pushed 3 months ago in August?

OpenCV 4.0.1

To use OpenCV 4.0.1 instead of 4.0.0, is it just a matter of changing the OPENCV_VERSION variable?

I could submit a pull request.

Thanks.

ModuleNotFoundError: No module named 'cv2' in opencv-4.0.0 and contrib-opencv-4.0.0 tags

Hi,
I think these tags doesn't work correctly.

tags: opencv-4.0.0, contrib-opencv-4.0.0

$ docker container run -it jjanzic/docker-python3-opencv:opencv-4.0.0 python 
Unable to find image 'jjanzic/docker-python3-opencv:opencv-4.0.0' locally
opencv-4.0.0: Pulling from jjanzic/docker-python3-opencv
54f7e8ac135a: Already exists 
d6341e30912f: Already exists 
087a57faf949: Already exists 
5d71636fb824: Already exists 
0c1db9598990: Already exists 
bfb904e99f24: Already exists 
78a3d3a96a32: Already exists 
885a0ed92c89: Already exists 
dd7cc9ace242: Already exists 
a24a072f8608: Pull complete 
a64f3f9c9555: Pull complete 
4212a3a34e29: Pull complete 
Digest: sha256:cf8c2f8a00c9bdc35ade7894bfa8f68b70434f4534d097ec0ea4069134f47784
Status: Downloaded newer image for jjanzic/docker-python3-opencv:opencv-4.0.0
Python 3.7.1 (default, Nov 16 2018, 22:26:09) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
$ docker container run -it jjanzic/docker-python3-opencv:contrib-opencv-4.0.0 python
Unable to find image 'jjanzic/docker-python3-opencv:contrib-opencv-4.0.0' locally
contrib-opencv-4.0.0: Pulling from jjanzic/docker-python3-opencv
54f7e8ac135a: Already exists 
d6341e30912f: Already exists 
087a57faf949: Already exists 
5d71636fb824: Already exists 
0c1db9598990: Already exists 
bfb904e99f24: Already exists 
78a3d3a96a32: Already exists 
885a0ed92c89: Already exists 
dd7cc9ace242: Already exists 
a07329d466c4: Pull complete 
57e9858ba364: Pull complete 
64f7b9be4e22: Pull complete 
2ffe99e25909: Pull complete 
Digest: sha256:de9bd86415472aabbdec81ef2295e57baeb8525a4e40d3d4c3cca16d98bcb0d8
Status: Downloaded newer image for jjanzic/docker-python3-opencv:contrib-opencv-4.0.0
Python 3.7.1 (default, Nov 16 2018, 22:26:09) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

Thanks gorogoroyasu for this pull request.
The solution worked for me.

$ docker container run -it jjanzic/docker-python3-opencv:contrib-opencv-4.0.0 bash   
root@fa545d0bd227:$ python3 -c "import cv2; print(cv2.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
root@fa545d0bd227:$ ln -s /usr/local/python/cv2/python-3.7/cv2.cpython-37m-x86_64-linux-gnu.so /usr/local/lib/python3.7/site-packages/cv2.so
root@fa545d0bd227:$ python3 -c "import cv2; print(cv2.__version__)"
4.0.0

ENABLE_AVX='ON' is deprecated

OpenCV is giving a warning that this option is deprecated:

-- WARNING: Option ENABLE_AVX='ON' is deprecated and should not be used anymore
--          Behaviour of this option is not backward compatible
--          Refer to 'CPU_BASELINE'/'CPU_DISPATCH' CMake options documentation

Add Python 3.7 support

I tried myself and couldn't get it working. The jasper lib has issues and I didn't get too far

I cannot build it successfully

`
Scanning dependencies of target gen_opencv_python_source
[ 98%] Generate files for Python bindings and documentation
Note: Class Feature2D has more than 1 base class (not supported by Python C extensions)
Bases: cv::Algorithm, cv::class, cv::Feature2D, cv::Algorithm
Only the first base class will be used
Note: Class detail_GraphCutSeamFinder has more than 1 base class (not supported by Python C extensions)
Bases: cv::detail::GraphCutSeamFinderBase, cv::detail::SeamFinder
Only the first base class will be used
[ 98%] Built target gen_opencv_python_source
Scanning dependencies of target opencv_python3
[ 98%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-6/README.Bugs for instructions.
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/
/src2/cv2.cpp.o] Error 4
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [all] Error 2
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o' failed
CMakeFiles/Makefile2:3212: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
Makefile:160: recipe for target 'all' failed

`

imshow inside container

How to use imshow from inside container?

I am getting the following error:
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /opencv-3.4.0/modules/highgui/src/window.cpp, line 611
Traceback (most recent call last):
File "", line 1, in
cv2.error: /opencv-3.4.0/modules/highgui/src/window.cpp:611: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

Wot no gtk

Attempting to run camodet_python I get:

OpenCv version: 4.1.1
Video Height 1944 Width 2592
Traceback (most recent call last):
  File "/app.py", line 300, in <module>
    main()
  File "/app.py", line 292, in main
    if( (cv2.waitKey(1) & 0xFF) == ord('q') ):
cv2.error: OpenCV(4.1.1) /opencv-4.1.1/modules/highgui/src/window.cpp:693: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'

Taking the suggestion of installing libgtk2.0-dev and pkg-config before the cmake fixes it. The waitKey still doesn't actually work, and I don't really need it, but this doesn't seem like a bad additiion to your image anyway.

docker support GUI?

maybe this is a very silly question. I think docker can't have GUI. so any gui related function should not work with this docker image?

Use OPENCV_DUMP_CONFIG=1 environment variable for details

How to fix this error message?


begueradj@h4ck3r:~$ sudo docker run -it jjanzic/docker-python3-opencv python 
Python 3.6.4 (default, Feb 17 2018, 09:32:33) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2

******************************************************************
* FATAL ERROR:                                                   *
* This OpenCV build doesn't support current CPU/HW configuration *
*                                                                *
* Use OPENCV_DUMP_CONFIG=1 environment variable for details      *
******************************************************************

Required baseline features:
SSE - OK
SSE2 - OK
SSE3 - OK
SSSE3 - OK
SSE4.1 - OK
POPCNT - OK
SSE4.2 - OK
AVX - NOT AVAILABLE
OpenCV(3.4.1) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in initialize, file /opencv-3.4.1/modules/core/src/system.cpp, line 487
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.1) /opencv-3.4.1/modules/core/src/system.cpp:487: error: (-215) Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup. in function initialize](url)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.