Opened 5 years ago

Closed 4 years ago

#58845 closed enhancement (fixed)

Python support for OpenCV4

Reported by: renzresearch Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: ii343hbka, mzucker (Matt Zucker), mascguy (Christopher Nielsen)
Port: opencv4

Description

Python support for OpenCV 4 is missing.

It seems that OpenCV 3.4.7 is very different from 3.4.3. For example, cv2.findTransformECC requires to supply all arguments including those optional. I wanted to upgrade to OpenCV4. But there is no Python support now. Could these be added? Thanks.

Attachments (1)

opencv4-py2-enable.patch (3.1 KB) - added by ii343hbka 5 years ago.
Portfile patch to build python2 cv2 module

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Owner: set to stromnov
Status: newassigned
Type: requestenhancement

Changed 5 years ago by ii343hbka

Attachment: opencv4-py2-enable.patch added

Portfile patch to build python2 cv2 module

comment:2 Changed 5 years ago by ii343hbka

See attached "patch".

The only issue so far is cv2 install path -- /opt/local/lib/python2.7/site-packages. But it's easy to hack with PYTHONPATH=/opt/local/lib/python2.7/site-packages python. To be honest I'm to lazy to google for proper cmake option :(

comment:3 Changed 5 years ago by ii343hbka

Cc: ii343hbka added

comment:4 Changed 4 years ago by mzucker (Matt Zucker)

Cc: mzucker added

comment:5 Changed 4 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:6 Changed 4 years ago by mascguy (Christopher Nielsen)

Support for Python 3.5 through 3.9 will be implemented via pull request:

https://github.com/macports/macports-ports/pull/9555

comment:7 Changed 4 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In ca9ffa681f453399942385f9ef34cf1c124b6ea4/macports-ports (master):

opencv/opencv4: eliminate conflicts, improve consistency, add variants; update gerbil and py-pytorch for opencv4 changes

opencv: eliminate conflict with opencv4; add variants debug, nonfree, tests
opencv4: eliminate conflict with opencv; switch to shared libs; rename variant opencv_contrib to contrib, to match opencv; add variants debug, java, python35..39, qt4, qt5, tbb, tests, vtk
gerbil: update for opencv4 library move
py-pytorch: update for opencv4 library move

Fixes: #61912
Fixes: #61801
Fixes: #60118
Fixes: #58845
Fixes: #57640
Fixes: #51734
Fixes: #48218
Fixes: #32528

Note: See TracTickets for help on using tickets.