Do we need a stack to erase a component in a binary image?

  • Authors:
  • Tetsuo Asano

  • Affiliations:
  • Japan Advanced Institute of Science and Technology, Ishikawa, Japan

  • Venue:
  • FUN'10 Proceedings of the 5th international conference on Fun with algorithms
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Removing noises in a given binary image is one of common operations. A generalization of the operation is to erase arbitrarily specified component by reversing pixels values in the component. This paper shows that this operation is done without using any data structure like a stack or queue, or without using any extra work space in O(n log n) time for a component consisting of n pixels. This is an in-place algorithm, but the image matrix cannot be used as work space since it has a single bit for each pixel. Whenever we flip pixel value in an objective component, the component shape also changes, which causes some difficulty. An idea for our constant work space algorithm is a conversion keeping its topology.