Ask Your Question

mc_escherichia's profile - activity

2013-06-27 16:31:10 -0600 asked a question Run-length calculation

Hello I'm using the Java interface to OpenCV 2.4.4 and trying to build a classifier for images, for various reasons, I've found myself implementing a published algorithm that uses "run-length" statistics on a binary image.

Basically they run horizontally through a binary matrix and count how many pixels are white and black, and then store the length and type of every "run." They also go bl to tr diagonally. These statistics are used as features for a machine learner.

I searched google and this website for run length encoding and didn't find anything.

Does openCV have a feature that does this, and I'm just missing the name? If not I suppose I could write it myself but I'd rather have the robustness that comes with the other openCV libraries.