A Comparison Algorithm of Rectangularly Partitioned Regions

직사각형으로 분할된 영역 비교 알고리즘

  • 정해재 (안동대학교 정보통신공학과)
  • Published : 2006.06.20

Abstract

In the applications such as CAD or image processing, a variety of geometric objects are manipulated. A polygon in which all the edges are parallel to x- or y-axis is decomposed into simple rectangles for efficient handling. But, depending on the partitioning algorithms, the same region can be decomposed into a completely different set of rectangles in the number, size and shape of rectangles. So, it is necessary an algorithm that compares two sets of rectangles extracted from two scenes such as CAD or image to see if they represent the same region. This paper proposes an efficient algorithm that compares two sets of rectangles. The proposed algorithm is not only simpler than the algorithm based on sweeping method, but also reduces the number $O(n^2)$ of overlapped rectangles from the algorithm based on a balanced binary tree to O(nlogn).

CAD나 화상 처리와 같은 응용에서는 다각형으로 구성된 다양한 기하 객체를 다룬다. x축과 y축에 평행한 변을 가지는 다각형은 효율적인 조작을 위해 단순 다각형인 직사각형으로 흔히 분할된다. 그러나 동일한 기하 객체 또는 영역이라 할지라도 분할 방법에 따라 직사각형의 수, 크기 및 모양에 있어 전혀 다르게 된다. 따라서 CAD 또는 화상과 같은 장면으로부터 추출된 두 개의 직사각형 집합이 동일한 영역을 나타내는지 판단하는 알고리즘이 요구된다. 본 고에서는 직사각형들로 구성된 두 집합을 효율적으로 비교하는 알고리즘을 제안한다. 제안된 알고리즘은 기존의 훑기에 근거한 알고리즘에 비해 간단할 뿐만 아니라, 균형이진트리를 이용한 알고리즘에서의 중첩 직사각형 수 $O(n^2)$을 O(nlogn)으로 줄인다.

Keywords