An implementation of a standard 2-scan connected component labeling algorithm using run-length encoding