adding extra attributes without upsetting my setup
I'm trying to work through this but have found out via the python shell command help(cv2)
that I havent got the BackgroundSubtractorMOG
and BackgroundSubtractorMOG2
attributes available in my build.
It took me ages to get opencv compiled and working, so i'm very nervous of re-compiling it and adding the extra attributes.
1) is there a safe way to install these extra attributes without upsetting my setup? 2) how can I do this, easy steps please, as I'm a beginner!
opencv2.4 or 3.0 ? (the usage of BackgroundSubtractorMOG etc is a bit different)
2.4.2 is my open CV version
no idea, if 2.4.2 even has it for python (and the py_tutorials are all about opencv3.0, too)
Can I not try these examples with my version of open CV?
The python tutorials can only be ran with the 3.0 version of OpenCV.
Forgive my ignorance, but how can I tell if some code is opencv2 or opencv3?
This states:
This guide is mainly focused on OpenCV 3.x version (although most of the tutorials will work with OpenCV 2.x also).
Where did you download it. If you build OpenCV yourself then you can go to your folder and do a
git branch
in the folder where you cloned the repo. If not then you can see where you downloaded your version.python also has
cv2.__version__
, but, ofc, this, as well as the idea above will only tell the version installed on your machine, not the version some arbitrary code was programmed for.Quite right berak, about "only tell the version installed on my machine". I take it there is now way of telling if if some sample code has been written for openCV2 or 3?
hmm, there's always some small hints, like if it's using cv2.cv, it must be 2.4 (no more possible in 3.0), or constants which changed(CV_AA <-->LINE_AA), or the way, e.g. SIFT is used