Technical section: Note: An algorithm for contour-based region filling

  • Authors:
  • Marius C. Codrea;Olli S. Nevalainen

  • Affiliations:
  • Turku Centre for Computer Science and Department of Information Technology, University of Turku, Lemminkäisenkatu 14 A, FIN-20520 Turku, Finland;Turku Centre for Computer Science and Department of Information Technology, University of Turku, Lemminkäisenkatu 14 A, FIN-20520 Turku, Finland

  • Venue:
  • Computers and Graphics
  • Year:
  • 2005

Quantified Score

Hi-index 0.01

Visualization

Abstract

A linear-time algorithm for filling regions defined by closed contours in raster format is proposed. The algorithm relies on a single pass contour labeling and the actual filling is done in a scan-line manner, visiting the interior pixels only once. The interior endpoints of the scan-lines are discovered solely on the basis of the labeled contour. Despite its simplicity and low computation cost, the proposed method fills-in arbitrary shapes correctly, with no obvious exceptions. Possible special cases may arise from the 8-connectivity, inner contour detection. However, in extensive tests on complicated images, the proposed labeling scheme has given correct results.