Ask Your Question
0

How to add the "contrib" part to cv2

asked 2017-10-18 10:12:51 -0600

SpacePirate gravatar image

Hi,

I'm using openCv 3.1.0 and python 2.4, both x64 version. I was looking at this https://docs.opencv.org/3.2.0/d1/dc5/...

However none of those method are available (GMG, MOG, MOG2), and other one that I found with google, KNN is working.

Then I learned that the new version of opencv splitted this way : the 'opencv cv2' and the 'contrib' version. what I need is in the contrib part.

I installed opencv by downloading a .exe, which extracted a lot of stuff in a folder, an inside I found a cv2.pyd that I copy pasted in a folder of my python installation.

How do I do the same for the contrib version? I've been looking for days.

Thanks.

edit retag flag offensive close merge delete

Comments

hi, @SpacePirate, nice you made it here, finally ;9

it vaguely sounds like you're using windows ? if so, maybe you can just do:

pip install opencv-contrib-python

(windows being the only platform, where this is really working)

berak gravatar imageberak ( 2017-10-18 10:29:27 -0600 )edit

oh nice :D

SpacePirate gravatar imageSpacePirate ( 2017-10-20 09:15:20 -0600 )edit

i tested the tensorflow importer (using that), and it works !

berak gravatar imageberak ( 2017-10-20 09:17:59 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-10-18 10:30:41 -0600

VxW gravatar image

Hi,

so far I know the contrib part is not available in the pre-builds. You have to downlad the contrib part separately and build the opencv by your own. Using cmake gui you have to set the OPENCV_EXTRA_MODULES_PATH to /opencv3_3_contrib/modules

hope it helps

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-10-18 10:12:51 -0600

Seen: 187 times

Last updated: Oct 18 '17