Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rolling ball background subtraction algorithm for OpenCV

Is there an OpenCV (android) implementation of "rolling ball" background subtraction algorithm found in ImageJ: Process->Subtract Background?

OpenCV has a BackgroundSubtractorMOG class, but it is used for video streams not single, independent images.

This is an example of what this method does: https://i.sstatic.net/mXSLb.jpg

Here is a documentation of the process: http://imagejdocu.tudor.lu/doku.php?id=gui:process:subtract_background

like image 217
ZMolnar Avatar asked Jul 12 '26 17:07

ZMolnar


1 Answers

There's no implementation in the OpenCV C libraries that I know of and the Android JNI wrappers are just that - wrappers around the main libraries.

Having said that the source code for the ImageJ implementation is available online here and so you should be able to incorporate this directly into your Android image processing pipeline.

There is some discussion about the relative merits of rolling ball vs. e.g. using a disk structuring element (which is available in OpenCV) here.

If you absolutely require Rolling Ball and OpenCV then unfortunately it's not available 'out of the box'.

like image 76
Dave Durbin Avatar answered Jul 17 '26 21:07

Dave Durbin