how to call vibe in python? [closed]
I want to detect vehicle and I got problem with winding trees.. I tried MOG and MOG2, not so much satisfy with the result, and I found video example of vibe that can reduce false foreground detection.. I search in opencv documentation but only for c++, any other way to call it in python?
there was a gpu:vibe in 2.4.6, but it is no more. (and no, you can't interact with opencv cuda code from python)
I can't use gpu, my laptop not compatible.. any other bgs algorithm like vibe one?? I need to handle the winding trees..
you could try to port the pseudocode to numpy
thanks @berak, I'll try it...
uhm @berak, I want to ask again.. there code in the link "distance = getEuclideanDist(image[x][y], samples[x][y][index]);" where samples[x][y] is background samples, doesn't we used bgs algorithm like vibe to find background sample so we can know foreground? Do I need implemented like mog to get background model and used it to vibe?
no problem asking again ;)
the 'samples' are a stack of images, the 'model'. maybe 'background' samples is confusing, it is more like caching 'history'. if enough of those samples agree on a pixel being 'backgound', the pixel in the final segmentation image is set to 0.
@berak, uhm sorry disturbing you again but I don't get it how to program to get samples[x][y][index], could you help me?
maybe it gets easier, if samples is an array of np.uint8 images ? so you'd have samples[index][y][x] in python / numpy
@berak what images, you mean numpy array of next frames? and do you mean about indexing of numpy array? I'm so sorry, I'm really newbie in image processing..