1. A computer-readable medium encoded with a computer program code for a method for labeling an unlabeled pixel in a classification map, said method comprising: performing a scan pass, of a classification map, in a first direction; identifying, in said scan pass, an unreliable pixel in said classification map; incrementing a scan-direction count for said unreliable pixel if a condition related to a plurality of spatially neighboring pixels to said unreliable pixel is satisfied, wherein said plurality of spatially neighboring pixels includes only pixels previously scanned in said scan pass; and labeling said unreliable pixel based on said scan-direction count.