What the hell is up with BackgroundSubtractorMOG, MOG2, KNN, etc.?

asked 2015-07-08 10:31:36 -0500

wunjo gravatar image

There is some serious inconsistencies between the API and documentation for the Python bindings. In the online documentation (which BTW still says OpenCV 2.4.11):

link text

Shows that there is a python implementation for cv2.createBackgroundSubtractorMOG(), but when viewing the actual API in python there not only is no option for MOG, there appears to be an option for MOG2 and KNN. The MOG2 works good, but the documentation doesn't correspond to the actual parameters in the python version, there is also NO mention of cv2.createBackgroundSubtractorKNN() anywhere in the docs. Sorry if I'm nitpicking, but these are extremely important algortihms and it would be great to have the proper information on them so as to use and implement them properly. Please lend me your suggestions. Thanks!

edit retag flag offensive close merge delete

Comments

Suggestions? First of all, be polite while asking a question. And second, ask a real question.

LorenaGdL gravatar imageLorenaGdL ( 2015-07-08 13:46:21 -0500 )edit

I do apologize for the apparent "rudeness" of my question title. I was a bit frustrated when writing due to the fact that this is one of many inconsistencies I've found so far in the documentation. I greatly appreciate the OpenCV framework and I do understand that it is an ongoing open-source project therefore some of these kinds of liberties are not guaranteed. Also, condescendingly telling me to "ask a real question" doesn't make you look any better off attitude wise than me. I asked for clarification about inconsistencies when trying to implement a very specific algorithm and provided a link and descriptions. I don't think it gets more direct than that...

wunjo gravatar imagewunjo ( 2015-07-08 14:46:34 -0500 )edit

You didn't ask for clarification about inconsistences, you just pointed out that the docs were outdated and wrong. Thing that is actually false, because you're mixing 3.0.0 functionality with 2.4.x docs. Don't expect to be answered politely when you don't ask the same way. And now: 1st) read the FAQ, and 2nd) if you're looking for the 3.0.0 docs read here, where you even have a background subtraction tutorial for Python (also first link on simple Google search)

LorenaGdL gravatar imageLorenaGdL ( 2015-07-08 15:26:52 -0500 )edit

NAME cv2.bgsegm

FILE
    (built-in)

FUNCTIONS
    createBackgroundSubtractorGMG(...)
        createBackgroundSubtractorGMG([, initializationFrames[, decisionThreshold]]) -> retval

    createBackgroundSubtractorMOG(...)
        createBackgroundSubtractorMOG([, history[, nmixtures[, backgroundRatio[, noiseSigma]]]]) -> retval
joe minichino gravatar imagejoe minichino ( 2015-07-09 13:25:48 -0500 )edit

@ joe minichino: thanks for the input! However, I'm not seeing this in the API on OpenCV 3.0. Can you verify which version you're seeing this on?

wunjo gravatar imagewunjo ( 2015-07-16 13:18:22 -0500 )edit