KR20050051029A - Method and apparatus for detecting code image - Google Patents

Method and apparatus for detecting code image Download PDF

Info

Publication number
KR20050051029A
KR20050051029A KR1020030084713A KR20030084713A KR20050051029A KR 20050051029 A KR20050051029 A KR 20050051029A KR 1020030084713 A KR1020030084713 A KR 1020030084713A KR 20030084713 A KR20030084713 A KR 20030084713A KR 20050051029 A KR20050051029 A KR 20050051029A
Authority
KR
South Korea
Prior art keywords
candidate
pixel
image
area
region
Prior art date
Application number
KR1020030084713A
Other languages
Korean (ko)
Other versions
KR100606404B1 (en
Inventor
권병훈
유현중
조휘택
Original Assignee
(주)아이미디어아이앤씨
조휘택
유현중
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)아이미디어아이앤씨, 조휘택, 유현중 filed Critical (주)아이미디어아이앤씨
Priority to KR1020030084713A priority Critical patent/KR100606404B1/en
Publication of KR20050051029A publication Critical patent/KR20050051029A/en
Application granted granted Critical
Publication of KR100606404B1 publication Critical patent/KR100606404B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K2019/06215Aspects not covered by other subgroups
    • G06K2019/06225Aspects not covered by other subgroups using wavelength selection, e.g. colour code

Landscapes

  • Image Analysis (AREA)

Abstract

본 발명은 입력영상에 포함된 코드이미지 영역을 검출하는 방법 및 그 장치에 관한 것으로, 상기 입력 이미지에서 배경영역과 후보영역이 구분된 이진화 이미지에서 픽셀들을 순차적으로 스캔하여 상기 후보영역에 해당하는 픽셀들에 대해 우선법을 적용하여 코드 이미지에 해당하는 영역을 추출하며, 코드이미지의 후보 영역을 검출하기 위해 전처리된 이미지에 미로 찾기에 사용되는 우선법 알고리즘을 적용하여 컬러코드 이미지 영역의 좌표를 보다 효과적으로 도출할 수 있다. The present invention relates to a method and a device for detecting a code image region included in an input image. The present invention relates to a pixel corresponding to the candidate region by sequentially scanning pixels in a binarized image having a background region and a candidate region separated from the input image. Apply the prioritization method to the code image to extract the area corresponding to the code image, and apply the prioritization algorithm used to find the maze to the preprocessed image to detect the candidate area of the code image. It can be effectively derived.

Description

코드이미지 검출 방법 및 장치{Method and apparatus for detecting code image}Method and apparatus for detecting code image

본 발명은 코드 이미지 디코딩에 관한 것으로, 특히 입력영상에 포함된 코드이미지 영역을 검출하는 방법 및 그 장치에 관한 것이다.The present invention relates to code image decoding, and more particularly, to a method and apparatus for detecting a code image region included in an input image.

상품 정보를 표시하기 위해 널리 사용되는 바코드(bar code)는 흑백의 선의 굵기, 이중선 등에 의해 인코딩된 숫자를 표시한다. 바코드는 흑백 이미지에 속하므로 미관 및 용량상의 단점이 있다. 바코드에 비해 컬러코드 이미지는 미관상 수려하고 더 많은 조합을 수용할 수 있기 때문에, 용도가 더 다양하여 컬러로 정보를 표시한 코드 이미지의 이용이 확대되고 있다. A bar code widely used for displaying commodity information indicates a number encoded by the thickness of a black and white line, a double line, or the like. Barcodes belong to black and white images, so there are disadvantages in aesthetics and capacity. Compared to barcodes, color coded images are aesthetically pleasing and can accommodate more combinations, and thus the use of coded images displaying information in color is being expanded.

흑백 또는 컬러로 형성된 코드 이미지가 어떤 객체의 표면에 부착되어 있는 상태에서 카메라와 같은 촬영장치로 코드 이미지를 포함한 영상을 촬영하게 되면, 촬영 환경이나 장비 특성에 따라 컬러의 왜곡이 일어나기 쉽고, 따라서 입력 이미지에서 코드 이미지에 해당하는 영역을 정확하게 검출하기 어려운 문제점이 있었다.When a coded image formed in black and white or color is attached to the surface of an object and the image including the coded image is captured by a photographing device such as a camera, color distortion is likely to occur according to the shooting environment or equipment characteristics. There is a problem that it is difficult to accurately detect the area corresponding to the code image in the image.

본 발명이 이루고자 하는 기술적 과제는 입력된 이미지를 전처리하여 이진화 이미지를 형성한 다음 입력이미지에서 코드 이미지에 해당하는 영역을 보다 효과적으로 검출하기 위한 코드이미지 검출 방법 및 장치를 제공하는 것이다.An object of the present invention is to provide a code image detection method and apparatus for pre-processing an input image to form a binarized image and then more effectively detecting a region corresponding to a code image in the input image.

상기의 기술적 과제를 이루기 위한 본 발명에 따라 입력 이미지에 포함되어 있는 코드 이미지를 추출하는 방법은, (a) 상기 입력 이미지에서 배경영역과 후보영역을 구분하여 이진화 이미지를 생성하는 단계; (b) 상기 이진화 이미지의 픽셀들을 순차적으로 스캔하여 상기 후보영역 중에서 처음으로 만나는 픽셀의 위치를 검색하는 단계; (c) 상기 첫 픽셀부터 시작하여 우선법을 적용하여 상기 후보영역의 외곽선 좌표를 인식하는 단계; (d) 상기 인식된 외곽선 좌표에 의하여 형성되는 사각형의 영역을 코드 이미지에 대한 후보 사각형 영역으로 설정하는 단계; (e) 다른 후보영역에 대해서도 상기 (b)에서 (d) 과정을 반복하는 단계; (f) 상기 검색된 후보 사각형 영역들 중에서 최종 후보 사각형 영역을 결정하는 단계; 및 (g) 상기 결정된 후보 사각형 영역에 표시된 코드 이미지를 추출하는 단계;를 포함한다.According to an aspect of the present invention, there is provided a method of extracting a code image included in an input image, the method comprising: (a) generating a binarized image by dividing a background region and a candidate region from the input image; (b) sequentially scanning pixels of the binarized image and searching for a position of a pixel first meeting among the candidate regions; (c) recognizing outline coordinates of the candidate area by applying a priority method starting from the first pixel; (d) setting an area of a rectangle formed by the recognized outline coordinates as a candidate rectangle area for a code image; (e) repeating steps (d) to (d) for other candidate regions; (f) determining a final candidate rectangle area among the searched candidate rectangle areas; And (g) extracting a code image displayed on the determined candidate rectangular area.

상기 (c) 단계는 상기 첫 픽셀을 시작점으로 하여, (c1) 당해 픽셀에서 시계방향으로 90도 회전하여 그 앞에 있는 픽셀이 후보영역 밖에 있는 것인지를 확인하는 단계; (c2) 만일 후보영역 밖의 것이면 반시계방향으로 회전한 다음 상기 (c1) 단계로 돌아가고, 그렇지 않으면 현재 픽셀 위치에서 한 픽셀 앞으로 전진하는 단계; (c3) 현재 픽셀의 위치가 시작점 픽셀로 되돌아 올 때까지 상기 (c1)과 (c2) 과정을 반복하는 단계; 및 (c4) 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외각으로 형성되는 사각형의 좌표를 획득하는 단계를 포함하는 것이 바람직하다.The step (c) may include: (c1) checking a pixel in front of the candidate pixel by rotating it 90 degrees clockwise from the pixel; (c2) if it is outside the candidate area, rotate counterclockwise and then return to step (c1), otherwise advance one pixel forward at the current pixel position; (c3) repeating the steps (c1) and (c2) until the position of the current pixel is returned to the starting pixel; And (c4) acquiring the coordinates of the quadrangle formed at the outer edge of the candidate area based on the coordinates of the pixels obtained during the pixel movement.

상기의 기술적 과제를 이루기 위한 본 발명에 따라 입력 이미지에 포함되어 있는 코드 이미지를 디코딩하는 장치는, 상기 입력 이미지에서 배경영역과 후보영역이 구분된 이진화 이미지에서 픽셀들을 순차적으로 스캔하여 상기 후보영역에 해당하는 픽셀들에 대해 우선법을 적용하여 코드 이미지에 해당하는 영역을 추출하는 코드이미지 추출부; 및 상기 추출된 코드이미지 영역에 표시된 원래의 칼라 이미지로부터 코드정보를 추출하는 코드정보 추출부를 포함한다.According to an aspect of the present invention, a device for decoding a code image included in an input image includes sequentially scanning pixels in a binarized image in which a background region and a candidate region are separated from the input image, and scanning the pixels in the candidate region. A code image extracting unit extracting an area corresponding to a code image by applying a priority method to corresponding pixels; And a code information extracting unit extracting code information from an original color image displayed on the extracted code image area.

상기 코드이미지 추출부는 후보영역 내의 픽셀에서 시계방향으로 90도 회전하였을 때 앞에 있는 픽셀이 후보영역 밖에 있으면 반시계방향으로 회전하고, 그렇지 않으면 현재 픽셀 위치에서 한 픽셀 앞으로 전진하는 방식으로, 현재 픽셀의 위치가 시작점 픽셀로 되돌아 올 때까지 진행하여, 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외각으로 형성되는 사각형의 좌표를 획득하는 것이 바람직하다.The code image extracting unit rotates counterclockwise when the pixel in front of the candidate region is out of the candidate region when the pixel in the candidate region is rotated 90 degrees clockwise. Otherwise, the code image extracting unit advances one pixel forward at the current pixel position. It is preferable to proceed until the position returns to the starting point pixel, and to obtain the coordinates of the quadrangle formed at the outer corner of the candidate area based on the coordinates of the pixels obtained in the pixel movement process.

이하에서, 도면을 참조하여 본 발명의 실시예에 대하여 상세히 설명하기로 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1a에서 1d는 본 발명의 예시에 사용되는 컬러코드 이미지의 예들을 도시한 것이다. 도 1a는 사각형 이미지에 복수의 컬러가 줄무늬를 형성하고, 도 1b는 도너츠형 이미지에 각 컬러는 방사상으로 구분되어 표시되며, 도 1c는 사각형 매트릭스를 형성하고 각 셀에 컬러가 표시되며, 도 1d는 복수의 동심원으로 형성되어 동심원과 동심원 사이의 공간에 컬러가 표시된다.1A to 1D show examples of color coded images used in the example of the present invention. Figure 1a is a plurality of colors to form a stripe in the rectangular image, Figure 1b is a color of each color is radially divided in the donut-shaped image, Figure 1c forms a rectangular matrix and the color is displayed in each cell, Figure 1d Is formed of a plurality of concentric circles so that color is displayed in the space between the concentric circles and the concentric circles.

도 1d의 컬러코드 이미지는 동심원 형태로서 여러 개의 링으로 구성되며, 각 링은 도 2와 같이 R, G, B, C, M, Y의 여섯 가지 색 중에서 동일한 색이 인접되지 않도록 선정된다. 이와 같은 경우, 다섯 개의 링으로 구성하면, 이 코드 이미지로 나타낼 수 있는 조합 수는 6x54 이다. 중앙의 가장 작은 원은 보정 용도로 사용할 수 있다. 이와 같은 컬러코드의 장점은 모든 방향에 대해 대칭이라는 사실 외에도, Saturation 성분 이미지와 Hue 성분 이미지로부터 대략적 위치 파악이 용이하다는 것이다. 또한, 코드이미지에 표시하는 컬러를 안전한 색깔(safe color) 중에서 선정함으로써 잡음 또는 왜곡에 강인하다는 것이다. 따라서, 컬러코드 이미지는 Hue 값과 Saturation 값으로 특징을 구분할 수 있는 색들을 사용하는 것이 바람직하다. 필요시 216 개의 안전색(safe colors) 중에서 추가 선정하여 사용할 수 있다.The color coded image of FIG. 1D is composed of a plurality of rings as concentric circles, and each ring is selected so that the same color is not adjacent among six colors of R, G, B, C, M, and Y as shown in FIG. In this case, with five rings, the number of combinations represented by this code image is 6x5 4 . The smallest circle in the center can be used for calibration purposes. The advantage of this color code is that besides the fact that it is symmetrical in all directions, it is easy to approximate the position from the saturation component image and the Hue component image. In addition, it is robust to noise or distortion by selecting a color to be displayed in the code image among safe colors. Therefore, the color coded image preferably uses colors that can distinguish features by Hue and Saturation values. If necessary, it can be used by selecting from 216 safe colors.

도 1d의 컬러코드 이미지에 대해 도 11a, 11b, 12를 통하여 보다 자세히 설명하기로 한다. 컬러코드 이미지는 적어도 둘의 컬러를 이용하여 소정의 정보를 표시하기 위한 것으로서, 복수의 컬러를 표시하기 위한 복수의 영역을 포함한다. 중심부분에 있는 제1영역에는 하나의 컬러가 표시되며, 제1영역의 주위를 둘러싸는 일정 부분에는 제2영역을 형성하여 소정의 컬러가 표시된다. 또한, 제2영역의 주위를 둘러싸는 일정 부분에 제3영역을 형성하여 소정의 컬러가 표시되며, 필요에 따라서 이러한 방식으로 추가의 영역을 더 구비할 수 있다. 위와 같이 형성되는 영역들은 하나의 중심점을 중심으로 하여 복수의 폐곡면을 형성하되, 내부의 폐곡면을 외부의 폐곡면이 전부 둘러싸는 형태가 되며, 폐곡면과 폐곡면의 사이에 각 영역이 형성된다.The color coded image of FIG. 1D will be described in more detail with reference to FIGS. 11A, 11B, and 12. The color coded image is for displaying predetermined information using at least two colors, and includes a plurality of areas for displaying a plurality of colors. One color is displayed in the first area in the center portion, and a predetermined color is displayed by forming a second area in a predetermined portion surrounding the first area. In addition, a predetermined color is displayed by forming a third area in a portion surrounding the second area, and an additional area may be further provided in this manner as needed. The areas formed as described above form a plurality of closed curved surfaces centering on a single center point, and the closed closed surfaces of the inside are surrounded by the outer closed surfaces, and each region is formed between the closed curved surfaces and the closed curved surfaces. do.

도 11a에 도시된 실시예의 컬러코드 이미지는 중심점을 중심으로 복수의 동심원의 형태로 이루어지며, 각 동심원과 동심원의 사이에 형성되어 있는 제1~5영역(A1~5)에는 소정의 컬러가 표시된다. 또한, 복수의 영역에 표시된 컬러의 인식율을 높이기 위하여 각 영역의 면적은 영역 간에 서로 일정한 상관관계가 있도록 형성할 수 있으며, 그 일 예로서 각 영역의 면적이 서로 동일하게 되도록 할 수 있다(도 11b 참조).The color coded image of the embodiment illustrated in FIG. 11A is formed in the form of a plurality of concentric circles about a center point, and a predetermined color is displayed in the first to fifth areas A1 to 5 formed between each concentric circle and the concentric circles. do. In addition, in order to increase the recognition rate of the color displayed on the plurality of areas, the areas of each area may be formed to have a constant correlation between the areas, and as an example, the areas of each area may be equal to each other (FIG. 11B). Reference).

도 11b는 도 11a에 도시된 컬러 태그의 각 영역을 구분짓는 동심원들 간의 반지름의 상대적인 관계를 나타내는 도면이다. FIG. 11B is a diagram illustrating a relative relationship of radii between concentric circles that distinguish each area of the color tag illustrated in FIG. 11A.

제1영역(A1)의 면적은 이고, 제2영역(A2)의 면적은 이므로, 양자가 동일한 값이 되기 위해서는 이 되어야 한다. 제3영역(A3)의 면적은 인데, 이것이 제1영역(A1)의 면적 가 같기 위해서는 이 되어야 한다.The area of the first area A1 is The area of the second area A2 is In order for both to be the same value, Should be The area of the third area A3 is This is the area of the first area A1 To be equal Should be

제일 중심부에 있는 제1영역(A1)을 형성하는 동심원의 반지름을 1이라고 할 때 제2, 3, 4, 5영역(A2, A3, A4, A5)의 바깥 경계를 형성하는 동심원의 반지름은 각각 = 1.414, = 1.732, = 2, = 2.236로 정할 수 있다. 그렇게 되면, 제2영역(A2)의 동심원 반지름과 그 안쪽에 있는 제1영역(A1)의 동심원 반지름의 차이가 0.414인데 비하여, 제3영역(A3)의 동심원 반지름과 그 안쪽에 있는 제2영역(A2)의 동심원 반지름의 차이가 0.318로 작아지게 되며, 바깥 쪽으로 갈수록 동심원의 반지름 차이가 점차적으로 줄어들게 된다.When the radius of the concentric circles forming the first region A1 at the center is 1, the radius of the concentric circles forming the outer boundary of the second, third, fourth, and fifth regions A2, A3, A4, and A5 is respectively. = 1.414, = 1.732, = 2, = 2.236. Then, the difference between the concentric radius of the second region A2 and the concentric radius of the first region A1 therein is 0.414, whereas the concentric radius of the third region A3 and the second region within it are The difference in the radius of concentric circles in (A2) is reduced to 0.318, and the difference in the radius of the concentric circles gradually decreases toward the outside.

이와 같이 동심원의 반지름을 조정하여 각 영역의 면적을 서로 동일하게 함으로써, 일정한 간격을 갖는 동심원으로 형성된 코드이미지에 비하여 각 영역별 인식 확률을 동등하게 하여, 촬영된 화상에서 코드이미지를 형성하는 모든 영역이 포착될 가능성을 높일 수 있을 뿐만 아니라 코드이미지의 디코딩 과정을 보다 효율적으로 수행할 수 있다. 또한, 각 영역의 면적을 동일하게 하는 것과 같이 각 영역의 면적이 서로 일정한 상관관계를 갖도록 형성하는 다른 방법을 적용할 수도 있다. 예를 들어, 바깥 영역으로 갈수록 면적이 작게 되도록 하는 등과 같이 규칙적으로 변하게 할 수 있으며, 코드이미지의 크기나 응용 분야에 따라서 적절한 방법을 선택할 수 있다. In this way, by adjusting the radius of the concentric circles to equal the area of each region, all the regions that form the code image in the photographed image by equalizing the recognition probability of each region compared to the code images formed of the concentric circles having a constant interval. Not only can this increase the likelihood of being captured, but it can also perform the decoding process of code images more efficiently. In addition, other methods of forming the areas of each area to have a constant correlation with each other, such as making the areas of each area the same may be applied. For example, it can be changed regularly such that the area becomes smaller toward the outside area, and an appropriate method can be selected according to the size or application of the code image.

도 12는 도 11a의 컬러코드 이미지의 각 영역에 표시할 수 있는 컬러들의 일 예를 도시한 것으로, 흑색, 적색, 황색, 녹색, 시얀색, 청색, 마젠타색, 백색, 회색을 예로 들고 있다. 만일 도 11a와 같이 5개의 동심원 영역(A1~5)으로 구성하면서 흑색, 백색, 회색을 경계선이나 배경색으로 사용하고 나머지 6색으로 숫자를 표시하는 경우, 65=7,776 가지의 숫자를 표현할 수 있다. 즉, 위 예에서 체육대회 참가자가 약 7,000명 이하라면 도 11a의 컬러 태그 형태로 5색의 컬러를 이용하여 적용할 수 있음을 말한다. 만일 이웃하는 영역간의 컬러를 다르게 되도록 설정하는 것으로 정한다면 컬러 태그로 표현할 수 있는 경우 수는 줄어들지만 태그 검출은 보다 용이하게 할 수 있다. 216 개의 안전색(safe colors) 중에서 추가 선택하여 사용하여 조합수를 증가시킬 수 있다.FIG. 12 illustrates an example of colors that can be displayed in each area of the color coded image of FIG. 11A, and illustrates black, red, yellow, green, cyan, blue, magenta, white, and gray. If 5, concentric circles (A1 to 5) are configured as shown in FIG. 11A and black, white, and gray are used as the boundary or background color, and the remaining 6 colors are displayed, 6 5 = 7,776 numbers can be represented. . That is, in the above example, if the number of participants in the athletic competition is about 7,000 or less, it can be applied using five colors in the color tag form of FIG. 11A. If it is determined that the color between neighboring areas is set to be different, the number of cases that can be represented by the color tag is reduced, but the tag detection can be made easier. Additional combinations of 216 safe colors can be used to increase the number of combinations.

한편, 흑색, 백색 또는 회색을 선택적으로 배경색으로 사용할 수 있다고 하면, 6 가지의 숫자 표시용 컬러와 3가지의 배경색을 이용하여 65x3 가지의 숫자를 표현할 수 있으며, 참가자를 3 종류로 그룹핑하여 구분할 때 유용하다.On the other hand, if black, white, or gray can be selectively used as the background color, 6 5 x 3 numbers can be represented using 6 number display colors and 3 background colors, and the participants can be grouped into 3 types. This is useful when distinguishing.

한편, 코드이미지가 사각형 및 삼각형으로 형성될 수 있으며, 문자나 숫자와 같은 코드정보를 표시하기 위한 영역의 외각에 배경영역을 별도로 더 표시할 수 있다. 배경영역은 정보 표시용 영역과는 다른 색깔 또는 모양으로 설정하는 것이 바람직하다. 또한, 각 영역과 영역 사이에는 영역들을 시각적으로 구분하기 위한 경계선 또는 경계영역을 더 포함할 수 있다.Meanwhile, the code image may be formed as a rectangle and a triangle, and the background area may be further displayed on the outer surface of the area for displaying code information such as letters or numbers. The background area is preferably set to a different color or shape than the information display area. In addition, each region and the region may further include a boundary line or boundary region for visually distinguishing the regions.

경계선 또는 경계영역에 사용되는 컬러 또는 배경영역의 배경색은 정보 표시용으로 사용되는 컬러 이외의 것으로 설정되며, 백색, 흑색 또는 회색 중 어느 하나로 정해서 사용하는 경우 배경색을 기준으로 정보표시용 영역에서 인식된 컬러의 콘트라스트 보정에 이용할 수 있다.The background color of the color or background area used for the border line or border area is set to other than the color used for information display, and when used as one of white, black or gray, it is recognized in the information display area based on the background color. It can be used for contrast correction of colors.

이와 같은 코드이미지가 사용되는 일 사례를 설명하기로 한다. 수천명이 참가하는 체육대회(또는 마라톤 대회)에서 각 참가자들에게 참가번호가 인코딩된 컬러 코드이미지를 배포하고, 각 참가자는 코드이미지를 상의 왼쪽에 부착하고 있다고 가정한다. 체육 행사에서 참가자들의 활동 상황을 정지영상(사진)이나 동영상으로 촬영하여 각 참가자에게 제공하는 서비스를 수행하는 경우, 코드이미지는 영상에 잡힌 참가자가 누군인지를 확인하기 위한 식별자로서 작용하게 된다. 즉, 코드이미지로부터 참가번호를 인식하여 참가자의 이름 및 주소를 확인하여 그 참가자가 촬영된 정지영상이나 동영상을 무상 또는 유상으로 제공하거나 인터넷과 같은 통신망을 통하여 제공할 수 있다.An example in which such a code image is used will be described. It is assumed that in a sports competition (or marathon) with thousands of participants, each participant is given a color coded image encoded with the entry number, and each participant attaches the coded image to the left side of the prize. In the case of performing a service provided to each participant by photographing a participant's activity in a sports event as a still image (picture) or a video, the code image serves as an identifier for identifying who is the participant caught in the video. That is, the participant may recognize the participant number from the code image and check the participant's name and address so that the participant may provide a still image or a video captured free or for a fee or through a communication network such as the Internet.

상기한 예와 같이 코드이미지가 운동하는 참가자의 상의에 표시되어 있는 경우, 참가자의 정면으로 코드이미지가 평면적으로 촬영되면 이를 쉽게 인식할 수 있겠지만 촬영 당시 코드이미지가 표시된 부분이 접혀 있었다거나 팔이나 다른 것에 의해 일부분이 가려져 있거나 옆으로 비스듬한 방향에서 촬영된 경우 등이 얼마든지 가능하다. 다시 말하면, 최초 프린트된 당시의 코드이미지의 형태 그대로 촬영되는 것이 아니라 일부분을 소실하거나 형태가 변형되어 촬영되는 경우를 고려하여야 한다는 것이다.As shown in the above example, if the code image is displayed on the participant's top, it can be easily recognized if the code image is taken flat in front of the participant. This can be any case where a part is hidden or taken in a sideways oblique direction. In other words, it is not to be photographed in the form of the code image at the time of the first printing, but to consider a case where a part is lost or a photograph is modified.

코드이미지의 형태를 좌우 상하로 규칙적이고 대칭적인 모양으로 형성하면 촬영된 영상에서 컬러 태그의 일부분이 소실되더라도 중심점에 있는 영역을 비롯하여 모든 영역에 대해서 적어도 부분적만이라도 소정 컬러가 표시된 것을 찾을 수 있으면 디코딩이 가능하게 된다. 또한, 상황에 따라 90도 간격 등으로 분할하여 부착할 수 있는 장점도 있다.If the shape of the code image is formed in a regular and symmetrical shape from left to right, up and down, even if a part of the color tag is lost in the captured image, decoding can be found if at least a partial color can be found for all areas including at the center point. It becomes possible. In addition, there is an advantage that can be attached by dividing at intervals of 90 degrees depending on the situation.

또한, 각 영역의 면적을 동일하게 하면, 촬영된 영상에서 각 영역을 검출할 수 있는 확률도 동일하게 된다. 코드이미지를 인식함에 있어서, 모든 영역의 컬러를 인식하여야만 의미있는 디코딩을 수행할 수 있는 것이고 어느 하나의 영역이라도 검출되지 않으면 안 되기 때문에 모든 영역의 컬러를 검출하여야 한다. 따라서 숨겨지거나 가려질 확률이 가장 높은 중심부에 있는 영역에 대해서는 그 반지름을 상대적으로 크게 하고, 바깥쪽에 있는 영역은 그 바깥 둘레의 길이가 상대적으로 길어서 촬영될 확률이 상대적으로 크므로 그 폭을 좁게 함으로써 각 영역의 검출 확률을 같게 하고, 그럼으로써 코드이미지 자체의 인식율을 높일 수 있을 것이다. 한편, 경우에 따라서는 외각에 있는 영역의 면적은 그 내부에 있는 것에 비하여 상대적으로 작아지더라도 코드이미지에 대한 전체적인 인식율을 크게 떨어뜨리지 않을 수 있다. 만일 그렇다면 코드이미지가 차지할 수 있는 전체 면적이 일정하다고 할 때 코드이미지에 포함되는 영역의 수를 늘리거나 제일 안 쪽에 있는 영역의 면적을 보다 크게 할 수 있다. 이 경우 촬영 장치의 해상도가 높다면 보다 바람직할 것이다.In addition, if the area of each area is the same, the probability of detecting each area in the captured image is also the same. In recognizing the code image, it is necessary to recognize the colors of all the regions so that meaningful decoding can be performed and any one region must be detected, so the colors of all the regions must be detected. Therefore, for the area in the center where it is most likely to be hidden or hidden, the radius is made relatively large, and the area outside is relatively long because its outer circumference is relatively long, so the width is narrowed. By equalizing the detection probability of each area, the recognition rate of the code image itself can be improved. On the other hand, in some cases, even if the area of the outer area is relatively small compared to the inside, it may not significantly reduce the overall recognition rate of the code image. If so, you can increase the number of areas included in the code image or increase the area of the innermost area if the total area that the code image can occupy is constant. In this case, the higher the resolution of the photographing apparatus, the more preferable.

도 2는 RGB 컬러 큐브를 보여주며, 도 3은 이로부터 만든 HSI 컬러 모델을 보여준다. 도 3에서 원형 단면은 I(intensity) 축에 수직이다. 이 도면에서 보듯이 Saturation 값은 원점으로부터의 거리에 비례하며, Hue 값은 적색으로부터의 각도에 해당한다. 다음의 수학식 1과 2는 각각 Saturation과 Hue 값 계산을 위한 공식이다.2 shows an RGB color cube and FIG. 3 shows an HSI color model made from it. In Figure 3 the circular cross section is perpendicular to the I (intensity) axis. As shown in this figure, the saturation value is proportional to the distance from the origin, and the Hue value corresponds to the angle from red. Equations 1 and 2 are formulas for calculating saturation and hue values, respectively.

해당한다. 다음의 수학식 1과 2는 각각 Saturation과 Hue 값 계산을 위한 공식이다.Corresponding. Equations 1 and 2 are formulas for calculating saturation and hue values, respectively.

여기서, 각 θ는 다음의 수학식 3과 같이 표현된다.Here, the angle θ is expressed as in Equation 3 below.

따라서, 컬러코드 이미지에 사용된 색깔들은 순수하면, 수학식 1에 의해 Saturation 값이 최대(1.0)이며, Hue 값은 수학식 2에 의해 60도의 배수에 해당하는 값을 가짐을 알 수 있다. 즉, 컬러코드 이미지에 사용되는 색깔들은 수학식 1에 의해서는 최대값 1.0, 수학식 2에 의해서는 60의 배수를 갖게 된다. 따라서, 수학식 1에 의해 Saturation 성분 이미지를 만들고, 수학식 2에 의해서는 60의 n배 근처에서 최대값을 갖는 변환식을 만들어 목적에 맞게 변형시킨 Hue 성분 이미지를 생성할 수 있다. 이들에 대한 스레쉬홀딩 후, Hue 성분 이미지와 Saturation 성분 이미지 간의 AND 연산에 의해 컬러코드 이미지가 존재할 확률이 높은 영역, 즉, 후보 영역(들)을 그 이외의 배경영역과 구분한 새로운 이진화 이미지를 만든다. 이 결과 이진화 이미지에는 두 곳 이상의 후보 영역이 존재할 수 있다. Therefore, when the colors used in the color code image are pure, the saturation value is maximum (1.0) by Equation 1, and the Hue value has a value corresponding to a multiple of 60 degrees by Equation 2. That is, the colors used in the color code image have multiples of 1.0 in Equation 1 and 60 in Equation 2. Accordingly, the saturation component image can be generated by Equation 1, and the Hue component image can be generated according to Equation 2 and transformed according to the purpose by creating a conversion equation having a maximum value near n times 60. After the threshold holding on them, a new binarized image obtained by separating the candidate region (s) from the background region other than the background region where the color code image is likely to exist by the AND operation between the Hue component image and the Saturation component image is generated. Make. As a result, two or more candidate regions may exist in the binarized image.

본 발명의 실시예에 의하면, 컬러코드 이미지에 사용되는 컬러로 R, G, B, C, M, Y을 사용하면, 이들 컬러들의 위와 같은 특징을 이용하여 컬러코드 이미지에 해당할 수 있는 후보 영역을 입력 이미지에서 다른 영영과 분리하여 표시된 이진화 이미지를 생성하는 것이 용이하다.According to an embodiment of the present invention, if R, G, B, C, M, and Y are used as the colors used in the color code image, candidate regions that may correspond to the color code image using the above characteristics of these colors It is easy to generate the displayed binarized image by separating it from other domains in the input image.

다음으로, 상기 이진화 이미지에서 우선법 알고리즘에 의해 코드 이미지에 대한 각 후보 영역의 좌표를 정확하게 계산하는 방법을 설명한다.Next, a method of accurately calculating the coordinates of each candidate region with respect to the code image by the prioritization algorithm in the binarized image will be described.

도 4는 본 발명에 적용되는 우선법을 설명하기 위한 도면으로서, 우선법(right hand on wall)은 마우스 로봇 분야에서 미로에 들어간 마우스 로봇이 갈림길을 만났을 때 우선적으로 오른쪽으로 가는 방법이다. 즉, 미로의 입구에 들어 섰을 때, 로봇은 오른쪽 벽에 붙어서 앞으로 가면 돌아간다 하더라도 결국은 출구에 도달하게 된다는 것으로, 우선법 알고리즘을 의사코드로 표현 하면 다음과 같다.4 is a view for explaining the preferred method applied to the present invention, the right hand (right hand on wall) is a method in which the mouse robot enters the maze in the field of mouse robot preferentially goes to the right side first. In other words, when entering the entrance of the maze, the robot is attached to the right wall, and if you go forward, you will eventually reach the exit.

(a) 앞으로 진행(a) Go forward

(b) 아직 미로 안에 갇혀 있다면(b) if you are still trapped in a maze

(b1) 시계 방향으로 90도 회전  (b1) rotate 90 degrees clockwise

(b2) 만약 벽이 앞을 가로막고 있다면 반시계 방향으로 90도 회전 (반복)  (b2) If the wall is blocking the front, rotate it 90 degrees counterclockwise (repeat)

(b3) 그렇지 않으면 앞으로 진행  (b3) otherwise go forward

(b4) (b)로 돌아감  (b4) return to (b)

(c) 미로 탈출 성공.(c) Maze escape success.

도 5는 옷에 코드이미지가 부착된 상황을 카메라로 촬영한 입력영상의 예를 나타낸다. 도면에서 중앙 부분에 컬러 동심원 이미지가 포함되어 있다. 도 9는 본 발명의 일 실시예에 따라 도 5와 같은 입력 이미지에 포함되어 있는 코드 이미지를 추출하는 방법을 설명하는 흐름도이다. 5 illustrates an example of an input image captured by a camera in which a code image is attached to clothes. In the figure, a color concentric image is included in the center portion. 9 is a flowchart illustrating a method of extracting a code image included in an input image as shown in FIG. 5 according to an embodiment of the present invention.

도 5와 같은 입력 이미지에서 배경영역과 후보영역을 구분하여 이진화 이미지를 생성(91)한 다음 이진화 이미지의 픽셀들을 순차적으로 스캔하여(92) 후보영역 중에서 처음으로 만나는 픽셀의 위치를 검색한다(93)A binarized image is generated by dividing a background region and a candidate region in the input image as shown in FIG. 5 (91), and then sequentially scanning pixels of the binarized image (92) to search for the position of the first pixel among the candidate regions (93). )

첫 픽셀부터 시작하여 후보영역에 대해 우선법을 적용하여 그 후보영역의 외곽선 좌표를 인식하여(94), 그렇게 인식된 외곽선 좌표에 의하여 형성되는 사각형의 영역을 코드 이미지에 대한 후보 사각형 영역으로 설정한다(95).Starting with the first pixel, the prioritization method is applied to the candidate region to recognize the outline coordinates of the candidate region (94), and the rectangular region formed by the recognized outline coordinates is set as the candidate square region for the code image. (95).

하나의 후보영역에 대한 검색이 종료되면 후보영역 바깥의 좌표에서 다시 스캔을 시작하여 이진화 이미지에 포함되어 있는 다른 후보영역에 대해서도 상기 과정을 반복하여 후보 사각형 영역을 구한다(96). 상기와 같은 과정은 마지막 좌표에 대해서까지 수행된다(97). 상술한 과정에 의하여 하나 또는 둘 이상의 후보 사각형 영역을 구할 수 있다.When the search for one candidate area is completed, scanning is started again at coordinates outside the candidate area, and the process is repeated for other candidate areas included in the binarized image to obtain a candidate rectangle area (96). The above process is performed until the last coordinate (97). One or more candidate rectangular regions may be obtained by the above-described process.

후보 사각형 영역 중에서 서로 가깝거나 겹쳐진 것은 하나의 사각형 영역으로 합하거나(98), 하나의 후보 사각형 영역의 크기가 너무 크거나 작거나 또는 모양(가로 대 세로 비 등)이 다르면 후보에서 제거하여(99), 검색된 후보 사각형 영역들 중에서 최종 후보 사각형 영역을 결정한다(100). 이와 같이 결정된 후보 사각형 영역에 표시된 코드 이미지를 추출한다(101). 컬러와 문자와의 변환표에 의하여 코드 이미지에 표시된 컬러로부터 소정의 코드정보를 얻는다(101).The candidate rectangle regions that are close or overlapping with each other are summed into one rectangular region (98), or removed from the candidate if the size of one candidate square region is too large or too small or the shape (such as aspect ratio) is different (99). In operation 100, the final candidate rectangular region is determined from the found candidate rectangular regions. In operation 101, the code image displayed on the candidate rectangle area determined as described above is extracted. Predetermined code information is obtained from the color displayed in the code image by the conversion table between the color and the character (101).

도 6a-6d는 도 5의 입력이미지로부터 도 9의 방법에 의하여 후보영역을 추출하는 과정을 설명하는 도면이다.6A-6D illustrate a process of extracting candidate regions from the input image of FIG. 5 by the method of FIG. 9.

도 6a는 Hue 성분과 Saturation 성분 이미지를 구한 후, 이진화한 두 이미지를 “AND” 연산하여 얻은 이진화 이미지 중 우측 상단 부분을 확대한 이미지를 보여주며, 흰색 부분이 코드이미지가 존재할 가능성이 있는 후보 영역들이다. 도 6a에서, 코드이미지 후보 영역으로 도면 좌하단의 코드이미지 영역 외에, 도면 우측 위 쪽에도 추가의 영역이 나타남을 볼 수 있다. 후자의 영역도 원 영상에서 순도가 높고 Hue 값이 60의 n배 근처이기 때문에 선정되었다. 우측 위 쪽의 후보 영역은 필터링(예: 미디언 필터링), 가로 대 세로 비 측정, 크기 측정 등에 의해 후보 영역 목록에서 쉽게 제거시킬 수 있다. 만일 코드이미지의 모양이 원형인 경우, 후보 영역의 검증에 (동심)원을 찾기 위한 Hough 변환(Bassmann and Besslich, Ad Oculos Digital Image Processing, ITP, 1995, 참조)을 적용한다면 정확도를 높일 수 있을 것이다. FIG. 6A illustrates an enlarged image of an upper right portion of a binarized image obtained by performing an “AND” operation on two binarized images after obtaining Hue and Saturation component images, in which a white portion is a candidate region in which a code image may exist. admit. In FIG. 6A, in addition to the code image area in the lower left of the figure, an additional area may also appear in the upper right of the figure as the code image candidate area. The latter region was also selected because of its high purity in the original image and its Hue value near n times 60. Candidate regions in the upper right can be easily removed from the candidate region list by filtering (eg median filtering), aspect ratio measurement, size measurement, and so on. If the shape of the code image is circular, the accuracy can be improved by applying the Hough transform (see Bassmann and Besslich, Ad Oculos Digital Image Processing, ITP, 1995) to verify the (concentric) circle for verification of the candidate region. .

도 6b는 도 6a의 흰색으로 표시된 후보영역에 대해 우선법을 적용하여 후보영역을 둘러싸는 사각형과 그 좌표를 구하는 과정을 설명하는 것이다. 도 10은 후보영역의 좌표를 찾기 위하여 우선법을 적용하는 방법을 설명하는 흐름도이다. 후보 영역(들)에 대한 외곽 직각 사각형의 좌표를 계산하기 위해, 이진화 이미지에 우선법을 적용하며, 이 때 다음의 절차를 따른다. FIG. 6B illustrates a process of obtaining a rectangle surrounding the candidate area and its coordinates by applying a priority method to the candidate area indicated by white in FIG. 6A. 10 is a flowchart for explaining a method of applying a priority method to find coordinates of a candidate region. In order to calculate the coordinates of the outer rectangular rectangle for the candidate region (s), a prioritization method is applied to the binarized image, and the following procedure is followed.

도 6a와 같은 이진화 이미지에서 (0,0) 좌표 또는 확률 등에 의해 미리 선정된 첫 좌표에서부터 픽셀들을 순차적으로 스캔하여 후보영역 내에 속하는 것 중에서 처음으로 만나는 픽셀의 위치를 찾아 그 픽셀을 시작점으로 하여 우선법을 적용한다(105). 먼저, 당해 픽셀에서 시계방향으로 90도 회전하여(106) 그 앞에 있는 픽셀이 후보영역 밖에 있는 것인지를 확인한다(107). 만일 후보영역 밖의 것이면 반시계방향으로 회전한 다음 단계 107로 돌아간다(108). 반시계방향으로 계속하여 4번을 회전하게 된 경우에는 하나의 픽셀만으로 이루어진 후보영역으로 간주할 수 있다.In the binarized image as shown in FIG. 6A, the pixels are sequentially scanned from the first coordinate selected in advance by the (0,0) coordinate or the probability, and the position of the first pixel among those belonging to the candidate area is found first. Apply the law (105). First, it is rotated 90 degrees clockwise from the pixel (106) to check whether the pixel in front of it is outside the candidate area (107). If it is outside the candidate area, it rotates counterclockwise and returns to step 107 (108). In the case where the fourth rotation is continued in the counterclockwise direction, it can be regarded as a candidate area consisting of only one pixel.

한편, 단계 107의 판별 결과 후보영역 내에 있는 것이면 현재 픽셀에서 한 픽셀 앞으로 전진하여 당해 픽셀의 좌표를 확인한다(109). 상기와 같은 과정을 통하여 현재 위치가 시작점 픽셀로 되돌아 온 지를 확인하고, 그렇지 않으면 후보영역에 대한 X,Y 좌표에 대한 데이터를 갱신한다(111).On the other hand, if the result of the determination in step 107 is within the candidate region, the coordinates of the pixel are checked by advancing one pixel from the current pixel (step 109). Through the above process, it is checked whether the current position is returned to the starting point pixel, and if not, the data of the X and Y coordinates of the candidate region is updated (111).

후보영역에 대해 우선법을 적용하면 결과적으로 시작점 픽셀에서 시작하여 다시 그 위치로 되돌아 오게 되며, 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외곽으로 형성되는 사각형의 좌표를 획득할 수 있다(112). Applying the priority method to the candidate region results in starting from the starting pixel and returning to the position again. Based on the coordinates of the pixels obtained in the process of moving the pixel, the coordinates of the rectangle formed to the outside of the candidate region can be obtained. (112).

도 7은 후보영역에 우선법의 적용 예를 설명하기 위한 도면으로서, 점선으로 표시된 부분이 후보 영역에 해당하는 부분이며, 각 네모 칸은 하나의 픽셀을 의미한다. 그리고, 각 픽셀에 표시된 숫자는 우선법에 따른 추적 순서를 나타낸다. FIG. 7 is a diagram for explaining an example of applying the priority method to a candidate region, in which a dotted line corresponds to a candidate region, and each square column represents one pixel. The number displayed on each pixel indicates the tracking order according to the priority method.

입력 이미지를 왼쪽에서 오른쪽으로 스캔하여 첫 번째 시작점 픽셀로서 (1)번이 검출된 경우 그 좌표를 기록한다(105). 그런 다음 (1)번 픽셀에서 시계방향으로 90도 회전하면(106) 후보영역 내의 픽셀 (2)번이 나타난다. 이 경우 (1)번 픽셀에서 앞으로 전진하여 (2)번 픽셀로 이동한다(109). (2)번 픽셀에서 시계방향으로 90도 회전하면 그 앞에 있는 픽셀은 후보영역 밖이므로 반시계방향으로 90도 회전시킨다(108). 그러면, 후보영역 내의 (3)번 픽셀이 그 앞에 있으므로 앞으로 전진한다(109). (3)번 픽셀에서 시계방향으로 90도 회전하면 (4)번 픽셀을 만난다. The input image is scanned from left to right and the coordinates are recorded when (1) is detected as the first starting point pixel (105). Then, by rotating clockwise 90 degrees from pixel (1) (106), pixel (2) in the candidate region appears. In this case, it moves forward from pixel (1) and moves to pixel (2) (109). If it rotates 90 degrees clockwise at pixel (2), it rotates 90 degrees counterclockwise because the pixel in front of it is outside the candidate area (108). Then, the pixel (3) in the candidate area is in front of it, and thus it moves forward (109). Rotate 90 degrees clockwise at pixel (3) to meet pixel (4).

(4)번 픽셀에서 시계방향으로 90도 회전하면 후보영역 밖의 픽셀을 만나고, 그래서 반시계방향으로 90도 회전하면 또 후보영역 밖의 픽셀을 만나므로, 한번 더 반시계방향으로 90도 회전하게 되면 후보영역 내의 픽셀(5)를 만나므로 그 픽셀로 이동한다. 이와 같은 과정을 반복하여 도면에 쓰여진 숫자의 순서대로 픽셀 이동을 하고, 후보영역은 폐곡면을 형성하기 때문에 결국 시작점 픽셀을 만나게 되며, 그러면 우선법 검색이 종료된다. 참고로, 미로 찾기에서의 우선법은 입구에서 출발하여 출구로 나가는 알고리즘으로 되어 있으나, 본 발명에 우선법을 적용하게 되면 입구와 출구가 같게 된다.Rotating 90 degrees clockwise from pixel (4) meets the pixels outside the candidate area, and if rotated 90 degrees counterclockwise, it meets the pixels outside the candidate area. It encounters pixel 5 in the area and moves to that pixel. By repeating the above process, the pixels are moved in the order of the numbers written in the drawing, and since the candidate area forms a closed curved surface, the starting point pixels are eventually met, and the priority method search is terminated. For reference, the priority method in the maze finder is an algorithm for starting from the entrance to the exit. However, when the priority method is applied to the present invention, the entrance and the exit are the same.

상술한 바와 같은 방식으로 픽셀 이동하면서 각 픽셀의 좌표를 얻을 수 있으며, 후보영역에 속한 각 픽셀의 좌표들 중에서 최좌측, 최우측, 최상측, 최하측에 해당하는 좌표(a, b, c, d)로 형성되는 사각형의 좌표를 얻을 수 있다.As described above, coordinates of each pixel may be obtained while moving pixels, and coordinates corresponding to the leftmost, rightmost, topmost, and bottommost coordinates (a, b, c, The coordinates of the rectangle formed by d) can be obtained.

도 6b에서 구한 후보 사각형 영역 중에는 중간 위쪽에 있는 것과 같이 서로 가깝거나 겹쳐져 있는 경우가 있다. 이 경우, 이들 사각형을 하나의 영역으로 합쳐서 도 6c와 같이 후보 사각형 영역들을 형성한다. 도 8은 두 개의 후보 사각형 영역(81, 83)을 하나의 사각형 영역(87)으로 합치는 방법을 설명하기 위한 도면이다. 한 후보 사각형 영역(81)의 네 꼭지점 좌표에서 일정한 개수의 픽셀의 범위(본 예에서는 10 픽셀)로 설정되는 사각형 영역(85)과 겹쳐지는 다른 후보 사각형 영역(83)이 있는 경우 이들을 합하여 하나의 후보 사각형 영역을 형성하는 예를 보여준다.Among the candidate rectangular regions obtained in FIG. 6B, there may be cases in which they are close to or overlap with each other as shown in the upper middle. In this case, these rectangles are combined into one area to form candidate rectangle areas as shown in FIG. 6C. FIG. 8 is a diagram for describing a method of combining two candidate rectangular areas 81 and 83 into one rectangular area 87. If there are other candidate rectangular regions 83 that overlap with a rectangular region 85 that is set to a range of a certain number of pixels (10 pixels in this example) at the four vertex coordinates of one candidate rectangular region 81, the sum of them is one An example of forming a candidate rectangular region is shown.

한편, 후보 사각형 영역의 크기가 일정한 기준에 비교하여 상당히 작거나 큰 경우, 또는 가로 대 세로의 비가 너무 크거나 작은 경우, 이들은 후보에서 제거하게 되는데, 그 결과 도 6d와 같이 왼쪽 아래와 중간 위쪽의 두 후보 사각형 영역을 얻게 될 것이다. 후보 사각형 영역(들)이 결정되면 그 영역에 표시된 이미지의 모양 및 원래 이미지에서의 컬러를 인식하여 코드이미지로 합당한 것인지를 판별한 다음 코드정보를 얻게 된다.On the other hand, if the size of the candidate rectangular area is considerably smaller or larger than a certain criterion, or if the aspect ratio is too large or small, they are removed from the candidate. As a result, as shown in FIG. You will get a candidate rectangular area. When the candidate rectangular region (s) is determined, the shape of the image displayed in the region and the color of the original image are recognized to determine whether the image is suitable as the code image, and then code information is obtained.

도 13은 본 발명을 실현하기 위한 전체 시스템의 구성도를 나타낸다.Fig. 13 shows a block diagram of the entire system for implementing the present invention.

입력장치(134)는 입력이미지(133)를 스캔하여 디코더(135)에서 인식할 수 있는 이미지 신호로 변환하는, 스캐너나 카메라와 같은 장치를 말한다. 디코더(135)는 입력장치(134)에서 획득한 입력 이미지로부터 코드이미지를 추출한 다음 코드이미지에 내재된 코드정보(138)를 추출하며, 코드이미지 추출부(136) 및 코드정보 추출부(137)를 구비한다.The input device 134 refers to a device such as a scanner or a camera that scans the input image 133 and converts it into an image signal that can be recognized by the decoder 135. The decoder 135 extracts the code image from the input image acquired by the input device 134 and then extracts the code information 138 embedded in the code image, and the code image extracting unit 136 and the code information extracting unit 137 It is provided.

코드이미지 추출부(136)는 전체 입력 이미지에서 코드 이미지의 후보 영역을 검출한 다음 각 후보영역에 대해 우선법 알고리즘을 적용하여 각 후보 영역의 외곽을 형성하는 사각형의 좌표를 도출한다. 코드정보 추출부(137)는 코드이미지 영역에 표시된 이미지로부터 코드정보를 추출한다.The code image extracting unit 136 detects candidate regions of the code image from the entire input image, and then derives the coordinates of the rectangle forming the outline of each candidate region by applying a prioritization algorithm to each candidate region. The code information extracting unit 137 extracts code information from an image displayed in the code image area.

코드이미지 추출부(136)에서 후보 사각형 영역을 찾기 위하여 적용되는 우선법은 도 10에서 설명된 바와 같이 수행된다. 즉, 후보영역 내의 픽셀에서 시계방향으로 90도 회전하였을 때 앞에 있는 픽셀이 후보영역 밖에 있으면 반시계방향으로 회전하고, 그렇지 않으면 현재 픽셀 위치에서 한 픽셀 앞으로 전진하는 방식으로, 현재 픽셀의 위치가 시작점 픽셀로 되돌아 올 때까지 진행하여, 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외곽으로 형성되는 사각형의 좌표를 획득하게 된다.The priority method applied to find the candidate rectangular area in the code image extracting unit 136 is performed as described in FIG. That is, when the pixel in the candidate region is rotated 90 degrees clockwise in the candidate region, if the preceding pixel is outside the candidate region, it rotates counterclockwise, otherwise it moves forward one pixel from the current pixel position. The process proceeds until it returns to the pixel, and based on the coordinates of the pixels obtained in the pixel movement process, the coordinates of the quadrangle formed outside the candidate area are obtained.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플라피디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, which are also implemented in the form of a carrier wave (for example, transmission over the Internet). It also includes. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상 도면과 명세서에서 최적 실시예들이 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.The best embodiments have been disclosed in the drawings and specification above. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not used to limit the scope of the present invention as defined in the meaning or claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible from this. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

상술한 바와 같이, 본 발명에 의하면 코드이미지의 후보 영역을 검출하기 위해 Saturation 성분 이미지와 Hue 성분 이미지에 대해 이진화하고 논리 연산을 적용하여 후보 영역을 일차적으로 검출한 후, 이렇게 전처리된 이미지에 미로 찾기에 사용되는 우선법 알고리즘을 적용하여 컬러코드 이미지 영역의 좌표를 보다 효과적으로 도출할 수 있다. As described above, according to the present invention, after detecting the candidate region by binarizing the saturation component image and the Hue component image and applying a logical operation to detect the candidate region of the code image, the maze is searched for the preprocessed image. It is possible to derive the coordinates of the color coded image area more effectively by applying the precedence algorithm used in.

도 1a에서 1d는 본 발명의 예시에 사용되는 컬러코드 이미지의 예들을 도시한 것이다. 1A to 1D show examples of color coded images used in the example of the present invention.

도 2는 RGB 컬러 큐브를 보여주며, 도 3은 이로부터 만든 HSI 컬러 모델을 보여준다. 2 shows an RGB color cube and FIG. 3 shows an HSI color model made from it.

도 4는 본 발명에 적용되는 우선법을 설명하기 위한 도면이다.4 is a view for explaining a preferred method applied to the present invention.

도 5는 코드이미지가 부착된 상황을 카메라로 촬영한 입력영상의 예를 나타낸다. 5 illustrates an example of an input image captured by a camera in which a code image is attached.

도 6a-6d는 입력이미지로부터 후보영역을 추출하는 과정을 설명하는 도면이다.6A-6D illustrate a process of extracting candidate regions from input images.

도 7은 후보영역에 우선법의 적용 예를 설명하기 위한 도면이다.7 is a diagram for explaining an example of applying a priority method to a candidate region.

도 8은 두 개의 후보 사각형 영역을 하나의 사각형 영역으로 합치는 방법을 설명하기 위한 도면이다. 8 is a diagram for describing a method of combining two candidate rectangular regions into one rectangular region.

도 9는 본 발명의 일 실시예에 따라 코드 이미지를 추출하는 방법을 설명하는 흐름도이다.9 is a flowchart illustrating a method of extracting a code image according to an embodiment of the present invention.

도 10은 후보영역의 좌표를 찾기 위하여 우선법을 적용하는 방법을 설명하는 흐름도이다. 10 is a flowchart for explaining a method of applying a priority method to find coordinates of a candidate region.

도 11a, 11b, 및 12는 컬러코드 이미지의 일 예를 설명하는 도면이다.11A, 11B, and 12 are diagrams illustrating an example of a color coded image.

도 13은 본 발명을 실현하기 위한 전체 시스템의 구성도를 나타낸다.Fig. 13 shows a block diagram of the entire system for implementing the present invention.

Claims (9)

입력 이미지에 포함되어 있는 코드 이미지를 추출하는 방법에 있어서,In the method for extracting the code image included in the input image, (a) 상기 입력 이미지에서 배경영역과 후보영역을 구분하여 이진화 이미지를 생성하는 단계;(a) generating a binarized image by dividing a background region and a candidate region in the input image; (b) 상기 이진화 이미지의 픽셀들을 순차적으로 스캔하여 상기 후보영역 중에서 처음으로 만나는 픽셀의 위치를 검색하는 단계;(b) sequentially scanning pixels of the binarized image and searching for a position of a pixel first meeting among the candidate regions; (c) 상기 첫 픽셀부터 시작하여 우선법을 적용하여 상기 후보영역의 외곽선 좌표를 인식하는 단계;(c) recognizing outline coordinates of the candidate area by applying a priority method starting from the first pixel; (d) 상기 인식된 외곽선 좌표에 의하여 형성되는 사각형의 영역을 코드 이미지에 대한 후보 사각형 영역으로 설정하는 단계;(d) setting an area of a rectangle formed by the recognized outline coordinates as a candidate rectangle area for a code image; (e) 다른 후보영역에 대해서도 상기 (b)에서 (d) 과정을 반복하는 단계;(e) repeating steps (d) to (d) for other candidate regions; (f) 상기 검색된 후보 사각형 영역들 중에서 최종 후보 사각형 영역을 결정하는 단계; 및(f) determining a final candidate rectangle area among the searched candidate rectangle areas; And (g) 상기 결정된 후보 사각형 영역에 표시된 코드 이미지를 추출하는 단계;를 포함하는 것을 특징으로 하는 코드이미지 추출방법.and (g) extracting a code image displayed in the determined candidate rectangular area. 제1항에 있어서, 상기 (c) 단계는 상기 첫 픽셀을 시작점으로 하여,The method of claim 1, wherein step (c) comprises the first pixel as a starting point, (c1) 당해 픽셀에서 시계방향으로 90도 회전하여 그 앞에 있는 픽셀이 후보영역 밖에 있는 것인지를 확인하는 단계;(c1) rotating the lens 90 degrees clockwise in the pixel to check whether the pixel in front of the pixel is outside the candidate area; (c2) 만일 후보영역 밖의 것이면 반시계방향으로 회전한 다음 상기 (c1) 단계로 돌아가고, 그렇지 않으면 현재 픽셀 위치에서 한 픽셀 앞으로 전진하는 단계;(c2) if it is outside the candidate area, rotate counterclockwise and then return to step (c1), otherwise advance one pixel forward at the current pixel position; (c3) 현재 픽셀의 위치가 시작점 픽셀로 되돌아 올 때까지 상기 (c1)과 (c2) 과정을 반복하는 단계; 및(c3) repeating the steps (c1) and (c2) until the position of the current pixel is returned to the starting pixel; And (c4) 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외각으로 형성되는 사각형의 좌표를 획득하는 단계를 포함하는 것을 특징으로 하는 코드이미지 추출방법.and (c4) acquiring a coordinate of a quadrangle formed on the outer edge of the candidate area based on the coordinates of the pixels obtained during the pixel movement. 제1항에 있어서, 상기 (f) 단계는 The method of claim 1, wherein step (f) 상기 검색된 후보 사각형 영역들 중 서로 가깝거나 겹쳐진 것을 합하여 하나의 후보 사각형 영역으로 설정하는 것을 특징으로 하는 코드이미지 추출방법.The method of claim 1, wherein the searched candidate rectangular areas are set to one candidate rectangular area by adding up close or overlapping one another. 제1항에 있어서, 상기 (f) 단계는 The method of claim 1, wherein step (f) 상기 검색된 후보 사각형 영역이 소정 크기보다 너무 크거나 작으면 후보에서 제외하는 것을 특징으로 하는 코드이미지 추출방법.And if the searched candidate rectangular area is too large or small than a predetermined size, exclude the candidate candidate area from the candidate. 제1항에 있어서, The method of claim 1, 상기 추출된 코드이미지로부터 코드정보를 추출하는 단계를 더 포함하는 것을 특징으로 하는 코드이미지 추출방법.And extracting code information from the extracted code image. 제1항에 있어서, 상기 (a) 단계는 The method of claim 1, wherein step (a) 입력 이미지에서 Hue 성분과 Saturation 성분 이미지를 구한 후, 상기 이진화한 두 이미지를 AND연산하여 배경영역과 후보영역을 구분하는 이진화 이미지를 생성하는 것을 특징으로 하는 코드이미지 추출방법.And obtaining a Hue component and a saturation component image from an input image, and generating an binarized image that distinguishes a background region from a candidate region by ANDing the two binarized images. 입력 이미지에 포함되어 있는 코드 이미지를 디코딩하는 장치에 있어서,An apparatus for decoding a code image included in an input image, 상기 입력 이미지에서 배경영역과 후보영역이 구분된 이진화 이미지에서 픽셀들을 순차적으로 스캔하여 상기 후보영역에 해당하는 픽셀들에 대해 우선법을 적용하여 코드 이미지에 해당하는 영역을 추출하는 코드이미지 추출부; 및A code image extracting unit extracting a region corresponding to a code image by sequentially applying pixels to the pixels corresponding to the candidate region by sequentially scanning pixels in a binarized image having a background region and a candidate region separated from the input image; And 상기 추출된 코드이미지 영역에 표시된 이미지로부터 코드정보를 추출하는 코드정보 추출부를 포함하는 것을 특징으로 하는 코드이미지 디코딩 장치.And a code information extracting unit which extracts code information from an image displayed in the extracted code image area. 제7항에 있어서, 상기 코드이미지 추출부는The method of claim 7, wherein the code image extraction unit 후보영역 내의 픽셀에서 시계방향으로 90도 회전하였을 때 앞에 있는 픽셀이 후보영역 밖에 있으면 반시계방향으로 회전하고, 그렇지 않으면 현재 픽셀 위치에서 한 픽셀 앞으로 전진하는 방식으로, 현재 픽셀의 위치가 시작점 픽셀로 되돌아 올 때까지 진행하여, 픽셀의 이동과정에서 얻은 픽셀들의 좌표에 기초하여 후보영역의 외각으로 형성되는 사각형의 좌표를 획득하는 것을 특징으로 하는 코드이미지 디코딩 장치.When rotated 90 degrees clockwise at a pixel in the candidate area, if the preceding pixel is outside the candidate area, it rotates counterclockwise; otherwise, it moves forward one pixel from the current pixel position, so that the position of the current pixel is moved to the starting pixel. Proceeding to return, and obtaining a coordinate of a quadrangle formed on the outer edge of the candidate region based on the coordinates of the pixels obtained during the movement of the pixel. 제1-6항 중 어느 한 청구항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the method of claim 1 on a computer.
KR1020030084713A 2003-11-26 2003-11-26 Method and apparatus for detecting color code image KR100606404B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030084713A KR100606404B1 (en) 2003-11-26 2003-11-26 Method and apparatus for detecting color code image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030084713A KR100606404B1 (en) 2003-11-26 2003-11-26 Method and apparatus for detecting color code image

Publications (2)

Publication Number Publication Date
KR20050051029A true KR20050051029A (en) 2005-06-01
KR100606404B1 KR100606404B1 (en) 2006-08-02

Family

ID=38666314

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030084713A KR100606404B1 (en) 2003-11-26 2003-11-26 Method and apparatus for detecting color code image

Country Status (1)

Country Link
KR (1) KR100606404B1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100701292B1 (en) * 2004-08-17 2007-03-29 (주)아이미디어아이앤씨 Image code and method and apparatus for recognizing thereof
WO2007148942A1 (en) * 2006-06-23 2007-12-27 Colorzip Media, Inc. Method of classifying colors of color based image code
US7978911B2 (en) 2006-06-23 2011-07-12 Colorzip Media, Inc. Method of classifying colors of color based image code
KR101112575B1 (en) * 2010-03-12 2012-02-16 안명호 Method for detecting fiducial mark and device using the method
US9086773B2 (en) 2013-11-20 2015-07-21 Samsung Electro-Mechanics Co., Ltd. Touchscreen device and method of processing touch data
KR101633455B1 (en) * 2015-04-15 2016-06-24 한국정보통신주식회사 Apparatus and method for scanning code image
KR20190042077A (en) * 2016-08-30 2019-04-23 알리바바 그룹 홀딩 리미티드 Digital Object Unique Identifier (DOI) recognition method and device
WO2019132093A1 (en) * 2017-12-28 2019-07-04 한화테크윈주식회사 Barcode detection device and barcode detection method using same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61109375A (en) * 1984-11-02 1986-05-27 Nippon Telegr & Teleph Corp <Ntt> Mark extracting processing system
JP2951814B2 (en) * 1993-02-25 1999-09-20 富士通株式会社 Image extraction method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100701292B1 (en) * 2004-08-17 2007-03-29 (주)아이미디어아이앤씨 Image code and method and apparatus for recognizing thereof
WO2007148942A1 (en) * 2006-06-23 2007-12-27 Colorzip Media, Inc. Method of classifying colors of color based image code
US7978911B2 (en) 2006-06-23 2011-07-12 Colorzip Media, Inc. Method of classifying colors of color based image code
CN102360441A (en) * 2006-06-23 2012-02-22 卡勒兹普麦迪亚公司 Method of classifying colors of color based image code
KR101112575B1 (en) * 2010-03-12 2012-02-16 안명호 Method for detecting fiducial mark and device using the method
US9086773B2 (en) 2013-11-20 2015-07-21 Samsung Electro-Mechanics Co., Ltd. Touchscreen device and method of processing touch data
KR101633455B1 (en) * 2015-04-15 2016-06-24 한국정보통신주식회사 Apparatus and method for scanning code image
KR20190042077A (en) * 2016-08-30 2019-04-23 알리바바 그룹 홀딩 리미티드 Digital Object Unique Identifier (DOI) recognition method and device
US10664674B2 (en) 2016-08-30 2020-05-26 Alibaba Group Holding Limited Digital object unique identifier (DOI) recognition method and device
WO2019132093A1 (en) * 2017-12-28 2019-07-04 한화테크윈주식회사 Barcode detection device and barcode detection method using same

Also Published As

Publication number Publication date
KR100606404B1 (en) 2006-08-02

Similar Documents

Publication Publication Date Title
KR100480781B1 (en) Method of extracting teeth area from teeth image and personal identification method and apparatus using teeth image
JP4505362B2 (en) Red-eye detection apparatus and method, and program
KR101971866B1 (en) Method and apparatus for detecting object in moving image and storage medium storing program thereof
JP4755202B2 (en) Face feature detection method
US7398928B2 (en) Coded target and photogrammetry method using such targets
JP4469873B2 (en) Image document search device, program, and recording medium
US7438232B2 (en) Two-dimensional code and information processing method
US20110081081A1 (en) Method for recognizing objects in images
JP2005518722A (en) Detection and correction of red-eye features in digital images
US10255490B2 (en) Method and apparatus for human detection in images
JP2000105829A (en) Method and device for face parts image detection
US7980473B2 (en) Camera based code reading
JP4242796B2 (en) Image recognition method and image recognition apparatus
CN107992856A (en) High score remote sensing building effects detection method under City scenarios
CN108182691B (en) Method and device for identifying speed limit sign and vehicle
KR100606404B1 (en) Method and apparatus for detecting color code image
JP6630341B2 (en) Optical detection of symbols
US8300927B2 (en) Mouth removal method for red-eye detection and correction
JP2006285956A (en) Red eye detecting method and device, and program
KR101249374B1 (en) Apparatus and method for detecting target shape from image
KR101741758B1 (en) A Real-time Face Tracking Method Robust to Occlusion Based on Improved CamShift with Depth Information
JPH11306348A (en) Method and device for object detection
CN115376131A (en) Design and identification method of dot-shaped coding mark
JP6468880B2 (en) Character area extraction apparatus and program
TWI417796B (en) Method of recognizing objects in images

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120718

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20130722

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee