KR20070103789A - Barcode recognition apparatus - Google Patents

Barcode recognition apparatus Download PDF

Info

Publication number
KR20070103789A
KR20070103789A KR1020077023711A KR20077023711A KR20070103789A KR 20070103789 A KR20070103789 A KR 20070103789A KR 1020077023711 A KR1020077023711 A KR 1020077023711A KR 20077023711 A KR20077023711 A KR 20077023711A KR 20070103789 A KR20070103789 A KR 20070103789A
Authority
KR
South Korea
Prior art keywords
bar
width
bar code
barcode
input image
Prior art date
Application number
KR1020077023711A
Other languages
Korean (ko)
Other versions
KR100791704B1 (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 KR1020077023711A priority Critical patent/KR100791704B1/en
Publication of KR20070103789A publication Critical patent/KR20070103789A/en
Application granted granted Critical
Publication of KR100791704B1 publication Critical patent/KR100791704B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

After binarization is performed, adjacent relationship of a concatenation area is analyzed from a labeled input image according to the characteristic of the barcode structure, and a barcode area is extracted. According to the width of the concatenation area of black pixels in the barcode area extracted, a unit width serving as the barcode module width is determined. In the arrangement of magnifications of the unit width, a defined barcode pattern is matched with the input width pattern, thereby recognizing the barcode. In the matching, by setting an allowance for each magnification of the width matching, it is possible to reduce the affect from the noise and accurately recognize the barcode even in a low-resolution image picked up by a small-size image sensor built in a cellular terminal.

Description

바코드 인식 장치{BARCODE RECOGNITION APPARATUS}Barcode Recognition Device {BARCODE RECOGNITION APPARATUS}

본 발명은 입력한 화상 데이터로부터 바코드 영역을 추출하여 바코드를 인식하는 바코드 인식 장치, 인식 방법, 프로그램 등에 관한 것이다. The present invention relates to a barcode recognition device, a recognition method, a program, and the like for extracting a barcode region from input image data.

최근, 소형이고, 저소비 전력의 이미지 센서가 개발된 것에 수반하여, 휴대 전화기 등의 휴대형 장치에 카메라를 내장하는 것이 가능해져, 내장 카메라에 의해 촬영한 화상을, 전자 메일로 바로 송신할 수 있는 것이 가능하게 되었다. 이들 내장 카메라는 소형인 것이 우선되며, 일반적인 디지털 카메라보다도 해상도가 낮다. In recent years, with the development of a compact and low power consumption image sensor, it is possible to incorporate a camera into a portable device such as a mobile phone, and to be able to send an image taken by the built-in camera directly by e-mail. It became possible. These built-in cameras are preferred to be small, and have a lower resolution than ordinary digital cameras.

또한, 최근의 휴대 전화기는 인터넷에 접속하는 기능을 갖고 있다. 인터넷에 접속하기 위해서는, URL을 키를 통해 입력할 필요가 있으며, 휴대 전화기의 키로는, 긴 URL을 쳐 넣기 때문에 시간이 걸렸다. 따라서, URL을 일의(一意)의 번호로 관리하고, 그 번호에 대응하는 바코드를 인쇄한 것을 바코드 리더로 판독함으로써, URL의 입력 수고를 줄여, 유저의 사용성을 좋게 하는 시도가 이루어지고 있다. 이러한 장치에서는 별도 바코드 리더를 휴대 전화기에 접속할 필요가 있다. In addition, recent mobile phones have a function of connecting to the Internet. In order to connect to the Internet, it is necessary to enter a URL through a key, which takes a long time because a long URL is entered as a key of a mobile phone. Therefore, attempts have been made to improve the usability of the user by reducing the effort of inputting the URL by managing the URL as a unique number and reading a barcode printed by the barcode corresponding to the number with a barcode reader. In such a device, a separate barcode reader needs to be connected to the cellular phone.

따라서, 카메라를 내장한 휴대 장치에서는, 그 내장 카메라에 의해 입력한 바코드 화상에 대하여 바코드를 인식할 수 있으면, 별도 바코드 리더를 준비하지 않더라도, 이러한 서비스를 이용할 수 있다. Therefore, in the portable device with a built-in camera, if the barcode can be recognized with respect to the barcode image input by the built-in camera, such a service can be used even if a separate barcode reader is not prepared.

그러나, 현재의 내장 카메라의 해상도는, 바코드 리더에 이용되는 이미지 센서보다도 해상도가 낮고, 고정밀도로 바코드를 인식하는 것이 곤란했다. However, the resolution of the current built-in camera is lower than that of the image sensor used for the barcode reader, and it is difficult to recognize the barcode with high accuracy.

또한, 바코드의 인식을 곤란하게 하는 원인으로서, 입력 화상 중에 촬영되는 바의 폭이 일정하지 않다고 하는 것이 있다. 이것은, 바코드와 카메라의 거리 관계가 입력할 때마다 변하기 때문이다. 접사하는 타입의 스캐너에서는, 항상 바코드를 일정한 크기로 입력할 수 있기 때문에, 바의 폭을 미리 정하여 놓을 수 있지만, 손으로 유지한 카메라로 바코드를 촬영하는 경우에는, 일정한 바 폭을 미리 정하여 놓는 것은 불가능하다. In addition, as a cause of difficulty in recognizing the barcode, there is a fact that the width of the bar photographed in the input image is not constant. This is because the distance relationship between the barcode and the camera changes each time it is input. In a scanner of a close-up type, the bar width can always be set to a certain size, so the width of the bar can be set in advance.However, when shooting a bar code with a hand held camera, it is necessary to set a constant bar width in advance. impossible.

바의 폭을 이미지 스캐너에 의해 입력된 바코드 화상으로부터 결정하여, 바코드를 인식하는 방법이 제안되어 있다. 예를 들면, 일본 특허 공개 평성 6-325197호 공보에서는, 주사선마다 화소의 폭의 도수를 계수함으로써 바의 폭을 결정하고 있다. 폭을 결정하는 원리에 대하여 설명한다. A method of recognizing a barcode by determining the width of a bar from a barcode image input by an image scanner has been proposed. For example, in Japanese Unexamined Patent Application Publication No. 6-325197, the width of the bar is determined by counting the frequency of the width of the pixel for each scan line. The principle for determining the width will be described.

도 19는 검출 빈도와 폭과의 관계를 도시하는 도면이다. 도 19에 도시한 바와 같이, 주사선에 대하여 폭의 검출 빈도를 추출한다. 이에 의해, 어떤 임계치 이상의 빈도 영역을 유효한 폭으로서 검출한다. 도 19의 예에서는 구간 1, 2, 3이 유효한 폭이다. 또한, 이 유효한 폭의 구간이 긴 것 2개를 선택하여, 바의 폭으로 하고 있다. 이 방법에서는, 빈도가 많은 상위 2개의 폭으로부터, 「가늘다」, 「굵다」의 2 종류의 폭을 검출할 수 있지만, 저해상도의 화상에서는, 빈도의 피크 간격이 짧아져, 검출이 불안정하다고 하는 문제가 있다. 또한, 복수의 폭을 갖는 바코드에는 대응할 수 없다. 19 is a diagram illustrating a relationship between a detection frequency and a width. As shown in Fig. 19, the detection frequency of the width is extracted from the scanning line. As a result, the frequency region above a certain threshold value is detected as the effective width. In the example of FIG. 19, intervals 1, 2, and 3 are effective widths. In addition, two long sections of this effective width are selected to be the width of the bar. In this method, two kinds of widths, “thin” and “thick”, can be detected from the two high frequency frequencies, but in low resolution images, the peak interval of the frequency becomes short and the detection is unstable. There is. In addition, it cannot respond to barcodes having a plurality of widths.

또한, 카메라에 의해 바코드를 촬영한 경우, 바코드 주변에 있는 바코드 이외의 문자나 모양 등의 영역도 입력 화상에 포함된다. 따라서, 입력 화상으로부터 바코드 영역을 추출할 필요가 있다. 일본 특허 공개 평성 9-16701호 공보(도 19)에서는, 바의 간격이 어떤 임계치 이내인 것을 조건으로 하여 바코드 영역을 추출하고 있다. 스캐너와 같이 비교적 안정적으로 입력 화상을 얻을 수 있는 시스템에 대해서는, 유효하다. 그러나, 카메라를 손으로 유지하면서 바코드를 입력하기 때문에, 바의 폭은 피사체와 카메라의 거리에 의한 변동이 많고, 고정의 임계치에서는 잘 추출할 수 없는 경우가 있어 문제로 되고 있었다. In addition, when a barcode is photographed with a camera, areas such as letters and shapes other than the barcode around the barcode are also included in the input image. Therefore, it is necessary to extract the barcode area from the input image. In Japanese Unexamined Patent Application Publication No. 9-16701 (FIG. 19), a bar code area is extracted on the condition that the interval between bars is within a certain threshold. It is effective for a system which can obtain an input image relatively stably like a scanner. However, since the bar code is input while the camera is held by hand, the width of the bar has a lot of variation due to the distance between the subject and the camera, and it may be difficult to extract at a fixed threshold.

이러한 문제를 해결하기 위해서, 일본 특허 공개 평성 9-22437호 공보에서는, 바코드 영역을 추출할 때에, 바코드 특유의 패턴을 조사함으로써 추출 정밀도를 개선하려고 하고 있다. In order to solve such a problem, Japanese Unexamined Patent Application Publication No. 9-22437 attempts to improve extraction accuracy by examining patterns unique to barcodes when extracting barcode regions.

도 18은 바코드의 구성의 설명도이다. 도시와 같이, 바코드(1)에는 바코드 특유의 레프트 가드 바(2)(또는, 스타트 바), 센터 바(3), 라이트 가드 바(4)(또는, 엔드 바)가 있다. 이 경우, 레프트 가드 바(2)는 바코드(1)의 개시점 측(좌측)에 마련되어 있으며, 흑 바와 백 바가 교대로 나란히 배열된 패턴으로 구성되고, 바코드(1)의 개시 정보로서 「101」의 정보(모듈 표현)를 설정한 패턴이다. 센터 바(3)는 바코드(1)의 중앙 위치에 마련되어 있으며, 흑 바와 백 바가 교대로 나란히 배열된 패턴으로 구성되고, 바코드(1)의 중심 정보로서 「01010」의 정보 (모듈 표현)를 설정한 패턴이다. 라이트 가드 바(4)는 바코드(1)의 종료점 측에 마련되어 있으며, 흑 바와 백 바가 교대로 나란히 배열된 패턴으로 구성되고, 바코드(1)의 종료 정보로서 「101」의 정보(모듈 표현)를 설정한 패턴이다. It is explanatory drawing of the structure of a barcode. As shown in the figure, the bar code 1 includes a left guard bar 2 (or start bar), a center bar 3, and a light guard bar 4 (or end bar) peculiar to the bar code. In this case, the left guard bar 2 is provided in the starting point side (left side) of the barcode 1, and consists of a pattern in which black bars and white bars are alternately arranged side by side, and is "101" as start information of the barcode 1. This is the pattern where information of a module (module expression) is set. The center bar 3 is provided in the center position of the barcode 1, and is comprised by the pattern which the black bar and the white bar alternately arranged side by side, and set the information (module representation) of "01010" as the center information of the barcode 1 One pattern. The light guard bar 4 is provided on the end point side of the bar code 1, is composed of a pattern in which black bars and white bars are alternately arranged side by side, and the information (module expression) of "101" is used as the end information of the bar code 1. This is a set pattern.

레프트 가드 바(2)와 센터 바(3)의 사이에 6 자릿수의 좌측 데이터 캐릭터(5)가, 센터 바(3)와 라이트 가드 바(4)의 사이에 6 자릿수의 우측 데이터 캐릭터(6)와 체크 디지트(7)가 배치되어 있다. 또한, 바코드(1) 아래의 좌단의 수치는 프리픽스 디지트(8)를 나타내고 있다. The six-digit left data character 5 between the left guard bar 2 and the center bar 3 is the six-digit right data character 6 between the center bar 3 and the light guard bar 4. And check digit 7 are arranged. In addition, the numerical value of the left end under the barcode 1 has shown the prefix digit 8.

도 20은 종래의 바코드 추출의 처리의 흐름을 설명하는 플로우차트이다. 우선, 상기한 바와 같이 바의 간격이 어떤 임계치 이내인 곳을 복잡 영역으로서 추출한다(단계 401). 복잡 영역은 바코드가 존재할 것이라고 추측되는 영역이라고 할 수 있다. 20 is a flowchart for explaining the flow of a conventional bar code extraction process. First, as described above, a place where the bar interval is within a certain threshold is extracted as a complex area (step 401). The complicated area may be said to be an area where a barcode is supposed to exist.

다음으로, 추출된 복잡 영역으로부터 상기의 센터 바, 라이트 가드 바, 레프트 가드 바의 유무를 판정하고, 추출된 복잡 영역이 바코드인지의 여부를 판정한다(단계 402 내지 단계 404). 그리고, 바코드라고 판정된 영역에 대하여, 바코드의 각 캐릭터를 인식한다(단계 405). Next, the presence or absence of the center bar, the light guard bar and the left guard bar is determined from the extracted complex region, and it is determined whether the extracted complex region is a barcode (steps 402 to 404). Then, each character of the barcode is recognized in the region determined as the barcode (step 405).

여기서, 센터 바, 라이트 가드 바, 레프트 가드 바의 유무를 판정할 때에, 추출한 바의 폭과 미리 정해진 바의 모듈 폭을 기준으로 하여 바 구조의 모듈 표현의 패턴을 대조하고 있다. 모듈 폭은 스캐너의 해상도에 의해 미리 정해진다. Here, when determining the presence or absence of the center bar, the light guard bar, and the left guard bar, the pattern of the module expression of the bar structure is collated based on the width of the extracted bar and the module width of the predetermined bar. The module width is predetermined by the resolution of the scanner.

예를 들면, 200dpi의 해상도를 갖는 스캐너로 장표(帳票)를 판독한 경우에는, 1 모듈당 4 화소로 표현되므로, 모듈 폭은 4 화소로 정해진다. For example, when a document is read by a scanner having a resolution of 200 dpi, the module width is determined to be 4 pixels because it is represented by 4 pixels per module.

그러나, 상기한 바와 같이, 카메라를 손으로 유지하면서 바코드를 입력하기 때문에, 바의 폭은 피사체와 카메라의 거리에 의한 변동이 많으므로, 모듈 폭을 미리 특정하는 것은 불가능하다고 하는 문제가 있었다. However, as described above, since the bar code is input while the camera is held by hand, there is a problem that the width of the bar is largely changed by the distance between the subject and the camera, so that it is impossible to specify the module width in advance.

또한, 저해상도의 카메라로 입력한 화상은, 바의 폭이 2 화소 정도로 되어, 4 종류의 폭을 이용하는 바코드에서는, 입력 시의 노이즈 등에 의해, 모듈 폭과 완전하게 동일한 폭의 바는 존재하지 않아, 엄밀히 폭을 비교하는 것만으로는, 굵은 바를 가늘다고 잘못 인식하는 경우가 있어, 정확하게 대조할 수 없다고 하는 문제가 있었다. In addition, an image input by a low-resolution camera has a bar width of about 2 pixels, and in a bar code using four types of widths, a bar having a width exactly the same as the module width does not exist due to noise at the time of input. Only by comparing the widths strictly, the thick bars may be mistaken for being thin and there was a problem that they could not be accurately matched.

이 문제를 해결하기 위해서, 일본 특허 공개 평성 4-263381호 공보에서는, 규정되어 있는 패턴에 있는 바의 폭과 입력된 바의 폭을 비교할 때, 바 폭이 동일하다라고 하는 판정은, 어떤 폭을 갖게 하여 그 범위 내에 있을 때와 동일하다고 한다. 예를 들면, 바 폭 a와 바 폭 b가 동일한 조건은, In order to solve this problem, Japanese Patent Application Laid-Open No. 4-263381 discloses that when comparing the width of the bar in the prescribed pattern with the width of the input bar, the determination that the bar width is the same is not determined. It is said to be the same as when it is in the range. For example, the condition that bar width a and bar width b are equal is

1.25 a≥b≥0.75a1.25 a≥b≥0.75a

로 된다. 그러나, 저해상도의 디지털 카메라로 바코드를 촬영한 경우, 그 화상에 있어서의 바의 최소의 폭은, 2 화소 정도밖에 없다. 폭 2 화소는 실제로는, 입력 처리의 오차 등에 의해 2 화소 폭이, 1 화소 폭이나 3 화소 폭으로 되는 것이 있다. 이 경우, 폭의 변동은 실제의 폭의 50%로 되어, 변동이 크다. 폭이 굵은 경우에는, 4 화소가 5 화소, 3 화소로 되는 경우가 많다. 이 경우에는, 변동의 폭은 실제의 폭에 대하여 25%로 된다. 상기한 바와 같이 모든 바의 폭을 비교할 때에, 폭의 범위를 전부 동일하게 결정하면, 바 폭에 대한 변동이 큰 등의 경우 에, 정확하게 판정할 수 없다고 하는 문제가 있었다.It becomes However, when a barcode is photographed with a low resolution digital camera, the minimum width of the bar in the image is only about 2 pixels. Actually, the width 2 pixels may be 2 pixels wide or 1 pixels wide due to an error in input processing or the like. In this case, the variation in width is 50% of the actual width, and the variation is large. When the width is thick, four pixels are often five pixels or three pixels. In this case, the variation width is 25% of the actual width. As described above, when comparing the widths of all the bars, if all the ranges of the widths are determined to be the same, there is a problem in that it cannot be accurately determined in the case of large variations in the bar widths.

본 발명이 해결하고자 하는 과제는, 저해상도의 이미지 센서를 이용하여 촬영한 바코드 화상으로부터 고정밀도로 바코드를 인식하는 것이다. 이를 위해서는, 입력한 화상으로부터 정밀도 좋게 바코드 영역을 추출할 필요가 있다. 또한, 입력 화상 중의 바의 폭이 변동하고 있더라도 정확하게 인식할 수 있도록, 미리 바의 폭을 지정하지 않고, 입력 화상 중에서 바의 폭을 추출할 필요가 있다. 또한, 저해상도의 이미지 센서를 이용함으로써, 가장 폭이 좁은 바의 폭은 2 화소 정도로 되지만, 이 때에도 노이즈 등의 영향을 받지 않고서 정확하게 복수의 바의 폭을 판정하여 인식하는 것이 필요하다. 또한, 복수의 폭을 갖는 바코드에서도 대응할 수 있도록 하는 것도 필요하다. The problem to be solved by the present invention is to recognize a barcode with high accuracy from a barcode image photographed using a low resolution image sensor. For this purpose, it is necessary to extract the barcode area with high accuracy from the input image. In addition, it is necessary to extract the width of the bar from the input image without specifying the width of the bar in advance so that it can be accurately recognized even if the width of the bar in the input image changes. In addition, by using a low resolution image sensor, the width of the narrowest bar is about 2 pixels, but at this time, it is necessary to accurately determine and recognize the widths of the plurality of bars without being affected by noise or the like. It is also necessary to be able to cope with barcodes having a plurality of widths.

본 발명은 이러한 문제점을 감안하여 이루어진 것으로, 휴대 단말기에 내장되는 소형의 이미지 센서로 촬영된 저해상도의 화상에서도, 바코드를 정밀도 좋게 인식할 수 있는 바코드 인식 장치를 제공하는 것을 목적으로 한다. SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and an object of the present invention is to provide a barcode recognition device capable of accurately recognizing a barcode even in a low resolution image captured by a small image sensor embedded in a portable terminal.

본 발명의 바코드 인식 장치는, 입력 화상에 대하여 전처리를 행하는 전처리 수단과, 전처리후의 입력 화상에 대하여 2치화를 행하는 2치화 처리 수단과, 2치화 처리후의 입력 화상에 대하여 라벨 부착을 행하는 라벨 부착 수단과, 라벨 부착후의 입력 화상으로부터 바코드 영역을 추출하는 바코드 영역 추출 수단과, 추출된 바코드 영역으로부터 바코드를 인식하는 바코드 인식 수단을 구비하는 것을 특징으로 한다. The barcode recognition device of the present invention includes preprocessing means for preprocessing an input image, binarization processing means for binarizing the input image after preprocessing, and labeling means for labeling the input image after the binarization processing. And bar code area extraction means for extracting a bar code area from the input image after labeling, and bar code recognition means for recognizing a bar code from the extracted bar code area.

또한, 본 발명의 바코드 인식 장치에 있어서, 전처리 수단은 히스토그램 변환을 행하는 것이 바람직하다. Moreover, in the barcode recognition apparatus of this invention, it is preferable that a preprocessing means performs a histogram conversion.

또한, 2치화 처리 수단은, 화상의 2치화에 있어서의 임계치의 결정 방법으로서, 판별 분석법을 이용하는 것이 바람직하다. In addition, it is preferable that the binarization processing means uses the discrimination analysis method as a determination method of the threshold value in the binarization of an image.

본 발명의 바코드 인식 장치에 있어서, 라벨 부착 수단은, 입력 화상에 대하여 하나 하나의 연결된 패턴마다 개별의 수치명을 매김으로써 라벨 부착을 행하는 것이 바람직하다. In the barcode recognition device of the present invention, it is preferable that the labeling means performs labeling by assigning individual numerical names to each connected pattern with respect to the input image.

또한, 라벨 부착 수단에 의해 라벨 부착된 입력 화상으로부터, 바의 폭을, 해당 바에 관련한 라벨의 흑 화소 수/ 수직 방향의 높이에 의해 정의하는 것이 바람직하다. Further, it is preferable to define the width of the bar by the number of black pixels / height in the vertical direction of the label associated with the bar, from the input image labeled by the labeling means.

또한, 바 또는 스페이스의 폭을 대조할 때에, 폭에 따른 폭의 허용 범위를 설정하는 것이 바람직하다. In addition, when contrasting the width of a bar or a space, it is preferable to set the allowable range of the width according to the width.

또한, 본 발명의 바코드 인식 장치에 있어서, 바코드 영역 추출 수단은, 바의 인접 관계를 추출하고, 그 인접 관계로부터 바의 좌단과 바의 우단을 결정하여, 바의 좌단과 바의 우단 사이의 바의 수가 어떤 규정치와 일치함으로써 바코드 영역을 추출하는 것이 바람직하다. Further, in the barcode recognition device of the present invention, the bar code area extracting means extracts the adjacent relationship of the bars, determines the left end of the bar and the right end of the bar from the adjacent relationship, and determines the bar between the left end of the bar and the right end of the bar. It is preferable to extract the bar code area by the number of s coincident with any prescribed value.

또한, 바의 인접 관계는, 2개의 바가 공유하는 주사선이 있을 것, 2개의 바의 높이의 차가 어떤 범위 내일 것, 2개의 바의 간격이 어떤 범위 내일 것을 전부 만족하는 경우에 인접해 있다고 판정하고, 바의 높이의 차의 범위 및 바의 간격의 범위가, 기준으로 되는 바의 높이와 폭으로부터 적응적으로 구해지는 것이 바람직 하다. In addition, the adjacency relationship between the bars is determined to be adjacent when there is a scan line shared between the two bars, the difference between the heights of the two bars is within a certain range, and the distance between the two bars is within a certain range. It is preferable that the range of the difference in the height of the bar and the range of the spacing of the bars are adaptively determined from the height and width of the reference bar.

또한, 본 발명의 바코드 인식 장치에 있어서, 바코드 인식은, 바코드 영역 추출 수단에 의해 추출된 바코드 영역 내의 바에서 최소의 폭을 단위 폭으로서 이용하고, 상기 추출된 바코드 영역에서의 이 단위 폭의 정수배의 바 및 스페이스의 폭의 패턴의 배열과 미리 규정된 바 및 스페이스의 폭의 패턴의 배열을 대조함으로써 행하는 것이 바람직하다. Further, in the barcode recognition device of the present invention, barcode recognition uses an integer width as a unit width in a bar in a barcode region extracted by a barcode region extraction means, and an integer multiple of this unit width in the extracted barcode region. It is preferable to perform by contrasting the arrangement of the pattern of the width of the bar and the space with the arrangement of the pattern of the width of the bar and the space.

또한, 바코드 인식은 단위 폭을 변화시켜 반복하여 행하는 것이 바람직하다.In addition, it is preferable to perform barcode recognition repeatedly by changing a unit width.

본 발명의 바코드 인식 장치에 따르면, 휴대 단말기에 내장되는 소형의 이미지 센서에서 이용한 카메라에 의해, 촬영한 바코드 화상으로부터 정밀도 좋게 바코드를 인식할 수 있다. 또한, 본 발명에 따르면, 저해상도의 카메라를 이용한 경우에도 바코드를 인식할 수 있기 때문에, 특별히 바코드 리더를 부가하지 않더라도 바코드를 판독할 수 있다. According to the barcode recognition device of the present invention, a barcode can be accurately recognized from a photographed barcode image by a camera used in a small image sensor incorporated in a portable terminal. In addition, according to the present invention, since a barcode can be recognized even when a low resolution camera is used, the barcode can be read even without adding a barcode reader.

또한, 본 발명에 따른 휴대 전화기는, 본 발명의 바코드 인식 장치를 구비한 것을 특징으로 한다. 휴대 전화기에 바코드 인식 장치를 내장함으로써, 어디서나 손쉽게 바코드 인식을 할 수 있게 되고, 또한, 바코드 인식 장치에서 인식한 바코드를 바로 송신 가능하다. Moreover, the mobile telephone which concerns on this invention was equipped with the barcode recognition apparatus of this invention. It is characterized by the above-mentioned. By embedding a barcode recognition device in the mobile phone, it is possible to easily recognize the barcode anywhere, and can also directly transmit the barcode recognized by the barcode recognition device.

또한, 본 발명에 따른 바코드 인식 방법은, 입력 화상에 대하여 전처리를 행하는 공정과, 전처리후의 입력 화상에 대하여 2치화를 행하는 공정과, 2치화 처리후의 입력 화상에 대하여 라벨 부착을 행하는 공정과, 라벨 부착후의 입력 화상으로부터 바코드 영역을 추출하는 공정과, 추출된 바코드 영역으로부터 바코드를 인 식하는 공정을 갖는 것을 특징으로 한다. Moreover, the barcode recognition method which concerns on this invention is the process of preprocessing an input image, the process of binarizing the input image after preprocessing, the process of labeling the input image after a binarization process, and a label, And a step of extracting a bar code region from the input image after adhesion, and a step of recognizing the bar code from the extracted bar code region.

또한, 본 발명은 컴퓨터를 바코드 인식 장치로서 기능시키는 프로그램으로서, 또한, 해당 프로그램을 기록한 기록 매체로서도 실현할 수 있다. In addition, the present invention can be realized as a program for causing a computer to function as a barcode recognition device, and also as a recording medium on which the program is recorded.

본 발명에 따르면, 휴대 단말기에 내장되는 소형의 이미지 센서에서 이용한 카메라에 의해, 촬영한 바코드 화상으로부터, 정밀도 좋게 바코드를 인식할 수 있다. 또한, 본 발명에 따르면, 저해상도의 카메라를 이용한 경우에도 바코드를 인식할 수 있기 때문에, 특별히 바코드 리더를 부가하지 않더라도 바코드를 판독할 수 있게 된다.According to the present invention, a bar code can be recognized with high accuracy from a photographed bar code image by a camera used in a small image sensor incorporated in a portable terminal. In addition, according to the present invention, since a barcode can be recognized even when a low resolution camera is used, the barcode can be read without a barcode reader added.

본 발명에서는, 입력된 화상에 대하여, 히스토그램 변환의 전처리를 실시한 후에, 2치화를 행하고, 또한 라벨 부착 처리를 행한다. 라벨 부착된 화상으로부터, 바코드의 구조의 특징에 기초하여 바의 인접 관계를 계산한다. 인접 관계는 일례로서, 이하의 조건을 충족시키고 있는 바 후보의 연결 영역을 인접 바로 하여, 화상의 모든 연결 영역에 대하여 조사한다. In the present invention, after the preprocessing of the histogram conversion is performed on the input image, binarization is performed, and further, labeling processing is performed. From the labeled images, the adjacencies of the bars are calculated based on the characteristics of the structure of the barcode. The adjacency relationship is an example. As a result of satisfying the following conditions, all the connection areas of the image are irradiated with the adjoining connection areas of candidates.

(1) 도 21에 도시한 바와 같이, 2개의 바에 공유되는 수평 주사선(9)이 존재한다.(1) As shown in Fig. 21, there is a horizontal scanning line 9 shared by two bars.

(2) 도 22에 도시한 바와 같이, 인접하는 바 높이의 차가 어떤 범위 내이다. 여기서는, 바 높이의 20% 이내인 것으로 한다. (2) As shown in FIG. 22, the difference in height between adjacent bars is within a certain range. It is assumed here that it is within 20% of the height of the bar.

(3) 도 23에 도시한 바와 같이, 위치 좌표의 X 방향의 차가 어떤 범위 내이 다. 여기서는, 바 폭의 6배 이내인 것으로 한다. (3) As shown in Fig. 23, the difference in the X direction of the position coordinate is within a certain range. It is assumed here that it is within 6 times the width of the bar.

다음으로, 좌단과 우단에 삽입되어 있는 바의 수를 카운트하여, 카운트 값이 규정 수이면, 바코드 영역으로서 추출한다. 추출된 바코드 영역 내의 흑 화소의 연결 영역의 폭으로부터 바코드의 모듈 폭으로 되는 단위 폭을 결정한다. Next, the number of bars inserted into the left and right ends is counted, and if the count value is a prescribed number, it is extracted as a bar code area. The unit width that becomes the module width of the barcode is determined from the width of the connection region of the black pixels in the extracted barcode region.

단위 폭의 정수배의 바 및 스페이스의 폭의 패턴의 배열로, 규정되어 있는 바코드 패턴과 추출된 바코드 영역에서의 패턴을 대조함으로써 바코드를 인식한다. 인식은 바코드의 레프트 가드의 패턴을 최초로 대조하고, 성공하면 순차적으로, 좌측 6 자릿수의 패턴, 프리픽스 디지트, 센터 바, 우측 6 자릿수의 패턴과 대조를 행한다. 상기한 패턴의 대조 시에는 바 및 스페이스의 폭에 따라서, 즉 배율마다 허용 범위를 마련함으로써, 저해상도의 화상 중에서의 노이즈 등의 영향을 경감한다. A bar code is recognized by collating a prescribed bar code pattern with a pattern in an extracted bar code area by arranging a bar pattern of an integer multiple of a unit width and a width of a space. The recognition checks the pattern of the left guard of the barcode for the first time and, if successful, sequentially checks the pattern with the left six-digit pattern, the prefix digit, the center bar, and the right six-digit pattern. When the pattern is matched, an allowable range is provided according to the width of the bar and the space, i.e., for each magnification, thereby reducing the influence of noise and the like in the low resolution image.

본 발명에 따르면, 휴대 단말기에 내장되는 소형의 이미지 센서로 촬영된 저해상도의 화상에 있어서도, 바코드를 정밀도 좋게 인식할 수 있다. According to the present invention, even in a low resolution image captured by a small image sensor incorporated in a portable terminal, the barcode can be recognized with high accuracy.

이하, 본 발명의 실시 형태에 대하여, 첨부 도면을 참조하여 상세하게 설명한다. EMBODIMENT OF THE INVENTION Hereinafter, embodiment of this invention is described in detail with reference to an accompanying drawing.

도 1은 바코드 인식의 처리 흐름을 설명하는 플로우차트이다. 1 is a flowchart illustrating a processing flow of barcode recognition.

도 1에 있어서, 단계 1에서는 입력 화상에 대하여, 전처리로서 히스토그램 변환을 행한다. 입력 화상의 휘도의 최소치를 Yi로 하고, 최대치를 Yj로 하면 휘도 Y에 대한 변환후의 휘도 Y'는, 하기 수학식 1로 구해진다. In Fig. 1, in step 1, histogram conversion is performed on the input image as a preprocess. When the minimum value of the luminance of the input image is Yi and the maximum value is Yj, the luminance Y 'after conversion to the luminance Y is obtained by the following equation.

Figure 112007073962974-PAT00001
Figure 112007073962974-PAT00001

우선, 휘도 Y'의 미분치를 구하고, 미분치가 임계치 이상의 화소를 에지부로 하고, 이 에지부에 대한 휘도의 히스토그램을 작성한다. First, a derivative value of the luminance Y 'is obtained, and the histogram of luminance for the edge portion is created by using the pixel whose derivative value is equal to or greater than the threshold value.

단계 2에서는, 단계 1의 처리 화상에 대하여 2치화를 행한다. 2치화 처리로 휘도의 미분치 계산을 안정시키고, 콘트라스트가 낮은 화상에 대하여 콘트라스트를 향상한다. In step 2, binarization is performed on the processed image of step 1. The binarization process stabilizes the differential value calculation of luminance and improves the contrast for an image with low contrast.

상기에서 구한 히스토그램으로부터 2치화 임계치를 결정하고, 화상의 2치화를 행한다. 임계치의 결정 방법은 예를 들면, 판별 분석법을 이용하면 된다. 판별 분석법은 이하와 같이 하여 행한다. The binarization threshold is determined from the histogram obtained above, and binarization of the image is performed. As the determination method of the threshold value, for example, a discriminant analysis method may be used. The discriminant analysis method is performed as follows.

휘도의 범위가 「0 내지 D」인 화상을 임계치 t에서 2치화했을 때, 휘도가 「0∼t-1」인 화소의 평균 휘도를 f0, 휘도가 「t 내지 D」인 화소의 평균 휘도를 f1, 화상 전체의 평균 휘도를 f, 휘도 k를 갖는 화소의 수를 nk로 하면, 클래스간 분산 σB 2는 하기 수학식 2로 되고, 클래스내 분산 σI 2는 하기 수학식 3으로 된다. When the image whose luminance range is "0 to D" is binarized at the threshold t, the average luminance of the pixel having the luminance "0 to t-1" is f 0 and the average luminance of the pixel having the luminance "t to D". Is f 1 , the average luminance of the entire image is f and the number of pixels having luminance k is n k , the inter-class dispersion σ B 2 is represented by Equation 2 below, and the intra-class dispersion σ I 2 is represented by Equation 3 below. Becomes

Figure 112007073962974-PAT00002
Figure 112007073962974-PAT00002

Figure 112007073962974-PAT00003
Figure 112007073962974-PAT00003

이 때의 분산비는 하기 식(4)에 나타낸 바와 같이 되기 때문에, 이 F(t)를 최대로 하는 t를 임계치로 한다. Since the dispersion ratio at this time is as shown by the following formula (4), let t which maximizes this F (t) be a threshold value.

Figure 112007073962974-PAT00004
Figure 112007073962974-PAT00004

단계 3에서는 라벨 부착 처리를 행한다. 라벨 부착 처리는, 도 2에 도시한 바와 같이 2치화후의 화상의 흑 화소(화소치가 1로 함)에 대하여, 연결되어 있는 모든 흑 화소에 일의의 라벨을 붙이는 것이다. 연결되어 있는 흑 화소가 차지하는 영역을 연결 영역이라고 한다. 라벨 부착의 방법은 여러 가지 있지만 일례로서 이하와 같은 방법이 있다. In step 3, labeling processing is performed. In the labeling process, as shown in Fig. 2, a unique label is applied to all the black pixels connected to the black pixels (pixel value is 1) of the binarized image. The area occupied by the connected black pixels is called a connection area. Although the labeling method is various, there is the following method as an example.

(1) 화상 위를 죄측 위로부터 우측 아래를 향하여 주사하여, 화소치가 1이고, 또한 라벨이 붙어 있지 않은 화소 P를 찾아내어, 새로운 라벨을 붙인다. (1) The image is scanned from the upper side to the lower right side to find a pixel P having a pixel value of 1 and unlabeled, and attaching a new label.

(2) 화소 P에 대하여, 화상 내의 연결되어 있는 모든 화소에 동일한 라벨을 붙인다(도면 중 10∼12는 라벨임). (2) With respect to the pixel P, the same label is attached to all the connected pixels in the image (10-12 in the figure are labels).

(3) (1)로 되돌아가서, 아직 라벨이 붙어 있지 않은 화소가 발견되면, 새로운 라벨을 붙여 (2)의 처리를 행한다. (3) Returning to (1), if a pixel which has not been labeled yet is found, a new label is attached and the process of (2) is performed.

(4) 화상 전체의 주사가 끝났을 때, 처리를 종료한다. (4) When scanning of the whole image is complete | finished, a process is complete | finished.

단계 4에서는, 라벨 부착 결과로부터, 연결 흑 화소의 높이, 폭으로 구성되는 패턴 정보로부터, 바코드인, 흑 화소의 연결 영역(바)이 소정의 조건하에 나란히 배열된 영역을 바코드 영역으로서 추출한다. In step 4, the area | region where the connection area | region (bar) of the black pixel which is a barcode is arranged side by side under predetermined conditions is extracted as a barcode area | region from the pattern information which consists of the height and width of the connection black pixel from the labeling result.

단계 5에서는 추출된 바코드 영역의 바와 스페이스의 폭의 배열을 조사하여, 바코드를 인식한다. In step 5, the bar code is recognized by checking the arrangement of the bar and space widths of the extracted bar code area.

단계 4의 바코드 영역의 추출은, 라벨 부착된, 각 연결 영역의 인접 관계를 조사함으로써 실행된다. 이후, 라벨 부착되어 연결 영역을 바라고 부른다. Extraction of the barcode region of step 4 is performed by examining the adjacent relationship of each connection region, which is labeled. The labeling area is then called the connecting area.

도 3, 도 4는 인접하는 바의 탐색 처리의 흐름을 설명하는 플로우차트이다. 3 and 4 are flowcharts for explaining the flow of search processing of adjacent bars.

인접 관계는 바의 폭과 높이 및 위치의 정보를 이용하여 행한다. 다음과 같이 바 폭, 바 높이를 구한다. Adjacent relationships are performed using information on the width, height and position of the bars. Find the bar width and bar height as follows:

바 높이: 연결 영역을 둘러싼 사각형의 높이 Bar height: Height of the rectangle surrounding the connection area

바 폭: 연결 영역의 면적/ 바 높이 Bar Width: Area of Connection Area / Bar Height

연결 영역을 둘러싼 사각형의 왼쪽 위의 좌표를 그 바의 위치 좌표로 한다. 인접 조건을 일례로 하여, 다음과 같이 정한다. The upper left coordinate of the rectangle surrounding the connection area is the position coordinate of the bar. Taking adjacent conditions as an example, the following conditions are determined.

(1) 2개의 바에 공유되는 수평 주사선이 존재한다. (1) There is a horizontal scanning line shared by the two bars.

(2) 인접하는 바 높이의 차는 바 높이의 20% 이내이다. (2) The difference between adjacent bar heights is within 20% of the bar height.

(3) 위치 좌표의 X 방향의 차는 바 폭 6배 이내이다. (3) The difference in the X direction of the position coordinates is within 6 times the bar width.

상기의 조건을 만족하고, 대상으로 되는 바의 위치 좌표에 가장 가까운 위치 좌표를 갖는 바를 그 바의 인접 바로 한다. 인접 바는 좌측과 우측에 각각 존재할 가능성이 있다. The bar which satisfies the above conditions and has the position coordinates closest to the position coordinates of the target bar is made the bar adjacent to the bar. Adjacent bars may exist on the left and right sides, respectively.

모든 바에 대하여 인접 관계가 구해지면, 다음의 수순에서 바코드 영역인지의 여부를 검사한다. If a neighbor relationship is found for all bars, it is checked whether or not it is a bar code area in the following procedure.

도 3, 도 4에 의해 인접 바의 탐색 처리의 흐름을 설명한다. 도 3, 도 4에서, 이하와 같이 정의한다. 3 and 4, the flow of the search processing of the adjacent bars will be described. In FIG. 3, FIG. 4, it defines as follows.

바(L): 라벨 L이 부착된 연결 영역(바) Bar (L): connection area with label L (bar)

바 높이(L): 라벨 L이 부착된 바의 높이(바 높이) Bar height (L): Height of the bar with the label L attached (bar height)

바 폭(L): 라벨 L이 부착된 바의 폭(바 폭) Bar width (L): width of the bar with the label L attached (bar width)

바 위치_x(L): 라벨 L이 부착된 바의 위치 좌표의 x 좌표 Bar position_x (L): x coordinate of the position coordinate of the bar with the label L attached

MAX_LABEL: 라벨의 최대치 MAX_LABEL: label maximum

MIN_LABEL: 라벨의 최소치MIN_LABEL: label minimum

좌 거리: 바의 좌측에 존재하는 바의 수평 거리의 최소치Left distance: the minimum horizontal distance of the bar on the left side of the bar

우 거리: 바의 우측에 존재하는 바의 수평 거리의 최소치 Right Distance: The minimum horizontal distance of the bar on the right side of the bar.

바 거리(L, L2): 라벨 L이 부착된 바와 라벨 L2가 부착된 바의 수평 거리 Bar distance (L, L2): horizontal distance between bar with label L and bar with label L2

바 높이 차(L, L2): 라벨 L이 부착된 바와 라벨 L2가 부착된 바의 높이의 차 Bar height difference (L, L2): The difference between the height of the bar with the label L and the bar with the label L2

단계 101에서는 우선, 탐색의 기준으로 되는 주목 바를 나타내는 라벨을 변수 L에 대입한다. 라벨은 라벨의 최소치(LABEL_MIN)로부터 라벨의 최대치(LABEL_MAX)로 순차로 증가한다. In step 101, first, a label indicating a bar of interest as a reference for searching is substituted into the variable L. In FIG. The label is sequentially increased from the label LABEL_MIN to the label LABEL_MAX.

단계 102에서는, 주목 바에 대한 인접 후보로 되는 바를 나타내는 라벨을 변수 L2에 대입한다. 라벨은 라벨의 최소치(LABEL_MIN)로부터 라벨의 최대 치(LABEL_MAX)로 순차로 증가한다. In step 102, a label indicating a bar to be an adjacent candidate for the bar of interest is substituted into the variable L2. The label is sequentially increased from the minimum label LABEL_MIN to the maximum label LABEL_MAX.

단계 103에서는 변수 L과 변수 L2의 값이 동일한, 즉 동일한 바를 나타내고 있을 때에는, 단계 116으로 간다. 그렇지 않으면, 단계 104로 진행한다. In step 103, when the values of the variable L and the variable L2 are the same, i.e., indicate the same bar, step 116 is reached. Otherwise proceed to step 104.

단계 104에서는 상기의 조건(1)에 나타내는 조건을 테스트한다. 조건(1)을 만족하고 있으면, 단계 105로 진행한다. 만족하고 있지 않으면, 단계 116으로 진행한다. In step 104, the condition indicated by condition (1) is tested. If condition (1) is satisfied, the process proceeds to step 105. If not, go to Step 116.

단계 105에서는, 변수 L로 나타내지는 라벨이 부착되어 있는 바의 바 높이 와 변수 L2로 나타내지는 라벨이 부착되어 있는 바의 바 높이 차를 계산한다. In step 105, the difference between the bar height of the bar labeled with the variable L and the bar height of the bar labeled with the variable L2 is calculated.

단계 106에서는 상기의 조건(2)에 나타내는 조건을 테스트한다. 조건(2)을 만족하고 있으면, 단계 107로 진행한다. 만족하고 있지 않으면, 단계 116으로 진행한다. In step 106, the condition indicated by condition (2) is tested. If condition (2) is satisfied, the process proceeds to step 107. If not, go to Step 116.

단계 107에서는, 변수 L로 나타내지는 라벨이 부착되어 있는 바의 바 위치와 변수 L2로 나타내지는 라벨이 부착되어 있는 바 위치의 수평 방향의 거리를 계산한다. In step 107, the horizontal distance between the bar position of the bar indicated by the variable L and the bar position indicated by the variable L2 is calculated.

단계 108에서는, 상기의 조건(3)에 나타내는 조건을 테스트한다. 조건(2)을 만족하고 있으면, 단계 109로 진행한다. 만족하고 있지 않으면, 단계 116으로 진행한다. 조건(3)은 바의 폭에 대한 상대치를 임계치로 하고 있기 때문에, 입력 화상의 바의 폭이 일정하지 않더라도 정확하게 판정을 할 수 있다. In step 108, the condition indicated by condition (3) is tested. If condition (2) is satisfied, the process proceeds to step 109. If not, go to Step 116. Since condition (3) is a threshold value relative to the width of the bar, the judgment can be made accurately even if the width of the bar of the input image is not constant.

단계 109에서는, 변수 L로 나타내지는 라벨이 부착되어 있는 바에 대하여, 변수 L2로 나타내지는 라벨이 부착되어 있는 바가 우측에 있는 것인지, 좌측에 있 는 것인지를 바 위치 좌표를 기준으로 판정한다. 우측에 있다고 판정된 경우에는, 단계 110으로, 좌측에 있다고 판정된 경우에는, 단계 113으로 각각 진행한다. In step 109, it is determined on the basis of the bar position coordinate whether the bar indicated by the variable L is attached to the bar indicated by the variable L2 on the right side or the left side. If it is determined that it is on the right side, it proceeds to step 110, and if it is determined that it is on the left side, it proceeds to step 113, respectively.

단계 110에서는, 현재까지 발견된 우측의 바와의 최소 거리가 보존되어 있는 변수 「우 거리」와 현재의 우측의 바의 거리를 비교하여, 보다 거리가 가까우면, 단계 111로 진행한다. 그렇지 않으면, 이 바는 오른쪽 옆이 아닌 것으로 하여, 단계 116으로 진행한다. In step 110, the distance between the variable "right distance" in which the minimum distance to the right side bar found so far is stored and the distance of the bar on the right side right now is compared, and if it is closer, it progresses to step 111. FIG. Otherwise, the bar is not to the right side, and proceeds to step 116.

단계 111에서는, 변수 L2로 나타내지는 라벨이 부착되어 있는 바가 오른쪽 옆이다고 하여, 변수 L2의 값을 기억한다. 단계 112에서는, 변수 「우 거리」를 갱신한다. 단계 113에서는, 현재까지 발견된 좌측의 바와의 최소 거리가 보존되어 있는 변수 「좌 거리」와 현재의 좌측의 바의 거리를 비교하여, 보다 거리가 가까우면 단계 114로 진행한다. 그렇지 않으면, 이 바는 왼쪽 옆이 아닌 것으로 하여, 단계 116으로 진행한다. In step 111, the value of the variable L2 is stored, assuming that the bar indicated by the variable L2 is on the right side. In step 112, the variable "right distance" is updated. In step 113, the distance between the variable "left distance" in which the minimum distance from the left bar found so far is stored is compared with the distance of the bar on the left side, and proceeds to step 114 if the distance is closer. Otherwise, the bar is not to the left side and proceeds to step 116.

단계 114에서는, 변수 L2로 나타내지는 라벨이 부착되어 있는 바가 왼쪽 옆이다고 하여, 변수 L2의 값을 기억한다. 단계 115에서는, 변수 「좌 거리」를 갱신한다. 단계 116에서는 변수 L2를 다음으로 작은 라벨로 갱신한다. In step 114, the value of the variable L2 is stored, assuming that the bar indicated by the variable L2 is on the left side. In step 115, the variable "left distance" is updated. In step 116, the variable L2 is updated with the next smaller label.

단계 117에서는, 변수 L2에 의해 인접 후보로서 탐색되어 있지 않은 라벨이 있으면, 단계 103으로 진행하여, 처리를 반복한다. 모든 라벨에 대하여 탐색이 끝나면, 단계 118로 진행한다. In step 117, if there is a label that has not been found as an adjacent candidate by the variable L2, the flow proceeds to step 103, and the process is repeated. After searching for all labels, the process proceeds to step 118.

단계 118에서는, 변수 L을 순차적으로 큰 라벨로 갱신한다. 이 때, 단계 111 및 114에서 기억된 오른쪽 옆 바, 왼쪽 옆 바를 변수 L로 나타내지는 바의 오 른쪽 옆 바, 왼쪽 옆 바로서 각각 확정한다. In step 118, the variable L is sequentially updated with the large label. At this time, the right side bar and the left side bar memorized in steps 111 and 114 are determined as the right side bar and the left side bar of the bar represented by the variable L, respectively.

단계 119에서는, 변수 L에 의해 탐색되어 있지 않은 라벨이 있으면, 단계 102로 진행하여, 처리를 반복한다. 모든 라벨에 대하여 탐색이 끝나면, 단계 120으로 진행하여, 처리를 종료한다. In step 119, if there is a label that has not been searched for by the variable L, the flow advances to step 102 to repeat the process. After searching for all the labels, the process proceeds to step 120, whereupon processing ends.

이상과 같이 하여, 인접 관계가 구해지면 다음에 나타내는 수순으로, 바코드 영역인지의 여부를 판정을 행한다. As described above, when the adjacent relationship is obtained, it is determined whether or not it is a bar code area in the following procedure.

우선, 왼쪽 옆의 바가 존재하지 않는 바를 좌단 바로 하여, 마크한다. 다음으로, 좌단 바부터 순차적으로 오른쪽 옆의 바를 탐색한다. 오른쪽 옆의 바가 존재하지 않는 바를 우단 바로 하여, 마크한다. First, the bar in which the left side bar does not exist is immediately set to the left end, and is marked. Next, the bars next to the right side are sequentially searched from the left end bar. The bar next to the right side is marked with the right side of the bar.

좌단 바로부터 우단 바까지의 바의 수를 카운트하여, 바의 수가 규정의 수이면, 좌단 바로부터 우단 바까지의 바와 이들 바 사이의 스페이스가 있는 영역을 바코드 영역으로 한다. 규정의 수는 바코드의 규격에 의해 결정된다. 예를 들면 JAN 13자릿수의 바코드이면, 바의 수는 30으로 된다. If the number of bars from the left end bar to the right end bar is counted and the number of bars is a prescribed number, the bar area from the left end bar to the right end bar and the space between these bars is used as the barcode area. The number of regulations is determined by the standard of the bar code. For example, in the case of a bar code of 13 digits of JAN, the number of bars is 30.

추출된 바코드 영역에 포함되는 바에 대하여, 바코드 인식의 처리를 행한다.The bar code recognition process is performed on the bar included in the extracted bar code area.

도 5는 바코드 인식의 처리의 흐름을 설명하는 플로우차트이다. 5 is a flowchart for explaining the flow of the bar code recognition process.

단계 201에서는 우선, 바 및 스페이스의 폭을 평가하는 기준으로 되는 단위 폭을 결정한다. 바코드 영역 내의 바 폭이고, 최소의 것을 단위 폭으로 한다. 단위 폭은 바코드의 모듈 폭에 상당한다. In step 201, first, the unit width as a reference for evaluating the widths of the bars and the spaces is determined. The bar width in the bar code area, the minimum being the unit width. The unit width corresponds to the module width of the barcode.

단계 202에서는, 좌단의 2개의 바를 대상으로 레프트 가드 바의 패턴과 대조하여, 레프트 가드인지의 여부를 테스트한다. 레프트 가드라고 판정되면, 단계 203으로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 202, the two bars at the left end are tested against the pattern of the left guard bar to test whether it is a left guard. If it is determined that it is a left guard, the flow proceeds to step 203. Otherwise, go to Step 212.

단계 203에서는, 다음의 12개의 바에 대하여 좌측 6 자릿수의 수치를 인식한다. 단계 204에서는, 좌측의 6 자릿수의 인식이 전부 정상적으로 완료되었는지 판정한다. 정상적으로 완료되어 있으면 단계 205로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 203, the left six digits of the next twelve bars are recognized. In step 204, it is determined whether the recognition of the left six digits has been completed normally. If normally completed, the flow proceeds to step 205. Otherwise, go to Step 212.

단계 205에서는, 좌측 6 자릿수의 짝수, 홀수 패리티의 조합으로부터 프리픽스 디지트를 인식한다. 단계 206에서는 프리픽스 디지트를 모순없이 인식할 수 있었는지의 여부를 판정한다. 모순없이 인식할 수 있었으면, 단계 206으로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 205, the prefix digit is recognized from the combination of the left six digits of even and odd parity. In step 206, it is determined whether or not the prefix digit was recognized without contradiction. If the discrepancy could be recognized, the flow proceeds to step 206. Otherwise, go to Step 212.

단계 207에서는, 다음의 2개의 바에 대하여, 센터 바의 패턴과 대조하여, 센터 바인지의 여부를 테스트한다. 센터 바라고 판정되면, 단계 208로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 207, the next two bars are tested to see if they are the center bars, in contrast to the pattern of the center bars. If it is determined that the center is desired, proceed to step 208. Otherwise, go to Step 212.

단계 208에서는, 다음의 12개의 바에 대하여 우측 6 자릿수의 수치를 인식한다. 단계 209에서는, 우측의 6 자릿수의 인식이 전부 정상적으로 완료되었는지 판정한다. 정상적으로 완료되었으면 단계 210으로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 208, the next six digits of the right six digits are recognized. In step 209, it is determined whether the recognition of the right six digits has been completed normally. If yes, proceed to step 210. Otherwise, go to Step 212.

단계 210에서는, 체크 디지트의 테스트를 행한다. 체크 디지트에 모순이 없으면, 단계 211로 진행한다. 그렇지 않으면, 단계 212로 진행한다. In step 210, a check digit is tested. If there is no contradiction in the check digit, the flow proceeds to step 211. Otherwise, go to Step 212.

또한, 체크 디지트란, 판독에 오류가 없는지를 체크하기 위해서 산출된 수치로, 우측 6 자릿수의 수치 중 최후의 1자릿수가 체크 디지트로 되어 있다. 체크 디지트 이외의 11자릿수로부터 규정의 산출 방법에 의해 체크 디지트를 산출한다. 그 산출 결과와 판독한 체크 디지트를 대조하여, 동일하면 모순이 없다고 한다. 도 18의 예에서는 체크 디지트는 우단의 수치 4이다. The check digit is a numerical value calculated to check whether there is an error in reading, and the last one digit of the right six digits is the check digit. The check digits are calculated by the prescribed calculation method from 11 digits other than the check digits. The calculation result is compared with the read check digit, and if it is the same, there is no contradiction. In the example of FIG. 18, the check digit is the numerical value 4 of the right end.

단계 211에서는, 인식이 성공했다고 하여 처리를 종료한다. 단계 212에서는, 단위 폭을 1 화소 증가시킨다. 단계 213에서는, 단위 폭의 증가가 3 이하인지의 여부를 판정한다. 3 이하이면, 단계 202로 진행하여, 재차 마찬가지의 인식 처리를 행한다. 그렇지 않으면 단계 214로 진행한다. 단계 214에서는, 인식이 실패했다고 하여 처리를 종료한다. In step 211, the processing ends as if recognition was successful. In step 212, the unit width is increased by one pixel. In step 213, it is determined whether the increase in the unit width is 3 or less. If it is 3 or less, the flow advances to step 202 to perform the same recognition process again. Otherwise proceed to step 214. In step 214, the processing is terminated because the recognition has failed.

상기의 레프트 가드의 테스트, 센터 바의 테스트, 수치의 인식에 있어서, 바 및 스페이스 폭을 미리 규정되어 있는 패턴과 비교하여 평가를 한다. 그 평가의 수순에 대하여 다음에 설명한다. In the above test of the left guard, the test of the center bar, and the recognition of the numerical value, the bar and the space width are evaluated by comparing with a predetermined pattern. The procedure of evaluation is demonstrated next.

도 6은 스페이스 폭을 설명하기 위한 도면이고, 도 7은 허용 오차율을 설명하기 위한 도면이다. FIG. 6 is a diagram for explaining a space width, and FIG. 7 is a diagram for describing an allowable error rate.

바와 스페이스의 폭은 단위 폭의 정수배이며, 배율마다 평가된다. 스페이스 폭(15)은, 도 6에 도시한 바와 같이 인접하는 2개의 바(13, 14) 사이의 폭이다. 스페이스 폭(15)은 다음과 같이 구한다. The width of the bar and the space is an integer multiple of the unit width and is evaluated for each magnification. The space width 15 is a width between two adjacent bars 13 and 14, as shown in FIG. The space width 15 is obtained as follows.

인접하는 바(L)(13)와 바(L2)(14)에 대하여, 수평 주사선마다 바 사이의 화소 수를 구한다. 바(L)(13) 및 바(L2)(14)가 공유하는 전 주사선에 있어서의 바 사이의 화소 수의 평균을 스페이스 폭(15)으로 한다. For the adjacent bars (L) 13 and the bars (L2) 14, the number of pixels between the bars is obtained for each horizontal scanning line. The average of the number of pixels between the bars in all the scanning lines shared by the bars (L) 13 and the bars (L2) 14 is used as the space width 15.

바코드의 패턴은, 기준으로 되는 모듈 폭(단위 폭)의 정수배의 폭을 갖는 바 또는, 스페이스의 배열로 규정되어 있다. 폭의 배율을 각각 1, 2, 3, 4로 한다. 여기서, 가장 좁은 폭이 1, 가장 넓은 폭이 4이다. The pattern of a barcode is prescribed | regulated by the bar which has the width of the integer multiple of the module width (unit width) used as a reference | standard, or an array of spaces. The magnification of the width is set to 1, 2, 3, and 4, respectively. Here, the narrowest width is 1 and the widest width is 4.

다음의 조건을 만족하는 최소의 배율이, 그 바(스페이스) 폭의 배율로 된다. 즉, 바(스페이스) 폭이 배율×단위 폭±허용 오차의 범위 내에 있을 것이 조건이다. The minimum magnification that satisfies the following condition is the magnification of the bar width. That is, the condition is that the bar width is within the range of magnification × unit width + tolerance.

여기서, 허용 오차는, 허용 오차=단위 폭×허용 오차율로 정의된다. 허용 오차율은 배율마다 도 7에 도시한 바와 같이 규정되어 있다. 여기서, 허용 오차를 갖게 하는 것은, 2치화에 의한 화소의 누락의 영향을 고려했기 때문이다. 저해상도의 디지털 카메라로 바코드를 촬영한 경우, 그 화상에 있어서의 단위 폭은 2 화소 정도밖에 없다. 2치화를 행하면, 바의 화상에 1 화소의 정도의 결함이나, 팽창하는 노이즈가 존재한다. 폭 2 화소의 바로서 허용 오차없이 비교하면, 1 화소 폭이나 3 화소 폭은, 서로 다른 폭으로서 인식된다. 그러나 실제로는, 2치화의 노이즈에 의해 2 화소 폭이, 1 화소 폭이나 3 화소 폭으로 되는 경우가 있다. 허용 오차를 설정함으로써, 이 폭의 변동을 고려하여 동일한 폭이라고 인식할 수 있다. Here, the tolerance is defined as tolerance = unit width x tolerance. The allowable error rate is defined as shown in FIG. 7 for each magnification. The reason why the tolerance is given is that the influence of missing pixels due to binarization is taken into consideration. When a barcode is photographed with a low resolution digital camera, the unit width in the image is only about 2 pixels. When the binarization is performed, defects of about one pixel and noise to expand exist in the image of the bar. Comparing without tolerance as a bar of width 2 pixels, 1 pixel width and 3 pixel width are recognized as different widths. However, in practice, two pixel widths may be one pixel width or three pixel widths due to binary noise. By setting the tolerance, it is possible to recognize that the width is the same in consideration of the variation in the width.

상기 단계 202의 레프트 가드의 테스트는, 다음과 같이 행한다. The left guard test of step 202 is performed as follows.

도 8은 레프트 가드의 폭의 배열 패턴을 설명하기 위한 도면이고, 도 9는 레프트 가드의 바, 스페이스의 배열 패턴을 설명하기 위한 도면이다. 8 is a view for explaining the arrangement pattern of the width of the left guard, Figure 9 is a view for explaining the arrangement pattern of the bar, space of the left guard.

도 8 및 도 9에 도시한 바와 같이 규정된 레프트 가드의 바, 스페이스의 폭의 배열 패턴과, 추출된 바코드 영역에 있어서 폭의 평가에 기초하여 구한 레프트 가드의 폭의 바, 스페이스의 배열 패턴을 대조하여, 패턴이 일치한 경우, 그 바는 유효한 레프트 가드를 구성하는 바이다고 한다. The arrangement pattern of the bars and spaces of the left guard defined as shown in Figs. 8 and 9, and the arrangement pattern of the bars and spaces of the width of the left guard calculated based on the evaluation of the width in the extracted barcode region. In contrast, if the pattern matches, the bar is said to constitute a valid left guard.

상기 단계 203, 208의 수치의 인식은 다음과 같이 행한다. Recognition of the numerical values of steps 203 and 208 is performed as follows.

도 10은 수치에 대한 바 및 스페이스의 폭의 배열의 패턴의 규정을 도시하는 도면이고, 도 11은 도 10에 도시하는 폭 1 내지 폭 4가, 바 폭인지, 스페이스 폭인지의 조합을 도시하는 도면이고, 도 12는 수치의 인식의 처리의 흐름을 설명하는 플로우차트이다. FIG. 10 is a diagram showing the definition of a pattern of the arrangement of the widths of the bars and the spaces with respect to the numerical values, and FIG. 11 shows a combination of the widths 1 to 4 shown in FIG. It is a figure and FIG. 12 is a flowchart explaining the flow of a process of recognition of numerical value.

도 10에 있어서, 좌측의 6 자릿수에 대한 폭의 배열 패턴에는 홀수 패리티와 짝수 패리티가 존재한다. 도 10에 도시하는 폭의 배열은 홀수 패리티일 때이다. 짝수 패리티일 때에는, 동일한 표를 역방향으로부터, 즉 폭 4, 폭 3, 폭 2, 폭 1이라고 읽는다. 예를 들면 홀수 패리티에서 수치 9는, 좌측으로부터 3배 폭의 스페이스, 단위 폭의 바, 단위 폭의 스페이스, 2배 폭의 바의 배열 패턴으로 표시되고, 짝수 패리티에서 수치 1은, 좌측으로부터, 단위 폭의 스페이스, 2배 폭의 바, 2배 폭의 스페이스, 2배 폭의 바의 배열 패턴으로 표시된다(도 18의 좌측 1, 2번의 데이터 캐릭터 참조). In Fig. 10, odd parity and even parity exist in the arrangement pattern of the width for the six digits on the left. The arrangement of the widths shown in FIG. 10 is for odd parity. In the case of even parity, the same table is read from the reverse direction, i.e., width 4, width 3, width 2 and width 1. For example, in odd parity, the number 9 is represented by an array pattern of three times wider space, a unit width bar, a unit width, and a double width bar, and in even parity the number 1 is from the left, It is represented by an array pattern of unit widths, double width bars, double width spaces, and double width bars (see data characters 1 and 2 on the left in FIG. 18).

도 11에 있어서, 센터 바보다도 좌측의 6 자릿수와 우측의 6 자릿수에서는, 바와 스페이스의 배열의 패턴이 서로 다르므로, 도 11에서는 2 종류의 패턴이 정의되어 있다. 예를 들면, 우측에서 홀수 패리티로 수치 6은, 좌측으로부터, 단위 폭의 바, 단위 폭의 스페이스, 단위 폭의 바, 4배 폭의 스페이스의 배열 패턴으로 표시된다(도 18의 우측1번의 데이터 캐릭터 참조). In FIG. 11, at the six digits on the left side and the six digits on the right side of the center bar, since the patterns of the arrangement of the bar and the space are different from each other, two types of patterns are defined in FIG. For example, the numerical value 6 with odd parity on the right side is represented by an array pattern of unit width bars, unit width spaces, unit width bars, and quadruple width spaces from the left side (data at right right in FIG. 18). Character).

도 12의 플로우차트에 있어서, 단계 301에서는, 좌측의 6 자릿수의 데이터 캐릭터에 대하여, 레프트 가드의 테스트와 마찬가지의 수순으로, 대상의 바, 스페이스의 폭의 배열의 패턴을 구한다. In the flowchart of FIG. 12, in step 301, the pattern of the arrangement | sequence of the width | variety of the target bar and the space is calculated | required with the procedure similar to the left guard test with respect to the left six-digit data character.

단계 302에서는, 도 10 및 도 11에 규정된 대조 패턴을 이용하여, 상기한 폭의 평가를 행하고, 바와 스페이스의 배열의 패턴이 일치하는지 여부를 순차로 조사한다. 좌측 6 자릿수에서는, 홀수 패리티의 폭 패턴인지 짝수 패리티의 폭 패턴인지도 순차적으로 조사한다. In step 302, the above-described width is evaluated using the control patterns defined in Figs. 10 and 11, and it is sequentially checked whether the patterns of the bar and the space arrangement match. In the left six digits, the width pattern of the odd parity or the width pattern of the even parity is sequentially checked.

단계 303에서는, 패턴이 일치한다고 판정되었을 때에는, 단계 304로 진행한다. 그렇지 않으면, 단계 307로 진행한다. 단계 304에서는, 입력 화상으로부터 얻어진 실제의 폭과 규정되어 있는 폭의 패턴의 폭 차를 구한다. 폭 차는 대응하는 4개의 폭의 각각의 차의 합계치로 한다. In step 303, when it is determined that the pattern matches, step 304 is reached. Otherwise, go to Step 307. In step 304, the width difference between the actual width obtained from the input image and the pattern of the prescribed width is obtained. The width difference is a sum of the differences of the respective four widths.

단계 305에서는, 폭 차가 지금까지 발견된 것보다도 작았던 경우에는, 단계 306으로 진행한다. 그렇지 않으면, 단계 307로 진행한다. In step 305, if the width difference is smaller than that found so far, the flow proceeds to step 306. Otherwise, go to Step 307.

단계 306에서는, 그 패턴에 대응하는 수치를 인식 후보의 수치로서 기억해 둔다. 동시에, 홀수 패리티나 짝수 패리티의 종별도 기억해 둔다. 또한, 폭 차의 초기치는 최대치로 설정되어 있다. In step 306, the numerical value corresponding to the pattern is stored as the numerical value of the recognition candidate. At the same time, the types of odd parity and even parity are also stored. In addition, the initial value of the width difference is set to the maximum value.

단계 307에서는, 도 10에 도시하는 모든 대조 패턴(수치 0∼9)에 대하여 처리가 종료되었으면, 단계 308로 진행한다. 그렇지 않으면, 단계 302로 진행하여, 다음의 대조 패턴에 대하여 처리를 반복한다. In step 307, if the processing has been completed for all the matching patterns (values 0 to 9) shown in FIG. 10, the flow proceeds to step 308. FIG. Otherwise, the flow advances to step 302 to repeat the process for the next control pattern.

단계 308에서는, 규정되어 있는 수치의 패턴과 일치한 경우에, 그 수치를 인식 결과로 하고, 단계 309로 진행하여, 인식 성공으로서 처리를 종료한다. 그렇지 않으면, 인식 불성공으로서, 단계 310으로 진행하여, 처리를 종료한다. In step 308, when the pattern is matched with the prescribed numerical value, the numerical value is regarded as the recognition result, the process proceeds to step 309, and the processing is completed as the recognition success. Otherwise, as recognition failure, the flow proceeds to step 310, and the process ends.

단계 205의 프리픽스 디지트의 인식은, 다음과 같이 하여 행한다. Recognition of the prefix digit in step 205 is performed as follows.

도 13은 홀수 패리티와 짝수 패리티의 조합 결과(프리픽스 디지트)를 도시하는 도면이고, 도 14는 센터 바의 폭의 배열 패턴을 도시하는 도면이고, 도 15는 센터 바의 바, 스페이스의 배열 패턴을 도시하는 도면이다. FIG. 13 is a diagram showing a combination result (prefix digit) of odd parity and even parity, FIG. 14 is a diagram showing an arrangement pattern of widths of center bars, and FIG. 15 is a arrangement pattern of bars and spaces at center bars. It is a figure which shows.

단계 205에서는, 좌측 6 자릿수의 인식이 전부 성공했을 때의 홀수 패리티와 짝수 패리티의 기록으로부터 프리픽스 디지트를 인식한다. 홀수 패리티와 짝수 패리티의 조합 결과는, 도 13에 도시한 바와 같이 되어 있으며, 테이블로부터 검색하여, 일치한 것을 프리픽스 디지트로서 인식한다. 일치하는 조합이 발견되었을 때에는, 프리픽스 디지트의 인식은 실패로서 처리를 종료한다. 도 18의 예에서는, 좌측 6 자릿수의 데이터 캐릭터(5)는, 홀수 패리티의 9, 짝수 패리티의 1, 홀수 패리티의 2, 홀수 패리티의 3, 짝수 패리티의 4, 짝수 패리티의 5이고, 패리티의 조합은 101100이므로 프리픽스 디지트(8)는 도 13으로부터 4(도 18의 좌단에 표시)이다. In step 205, the prefix digits are recognized from the recording of odd parity and even parity when the recognition of the left six digits is all successful. The result of combining the odd parity and the even parity is as shown in Fig. 13, and is searched from the table to recognize the match as the prefix digit. When a match is found, the recognition of the prefix digit ends the process as a failure. In the example of FIG. 18, the left six-digit data character 5 is 9 of odd parity, 1 of even parity, 2 of odd parity, 3 of odd parity, 4 of even parity, and 5 of even parity. Since the combination is 101100, the prefix digit 8 is from 4 to 13 (indicated at the left end of FIG. 18).

단계 207의 센터 바의 테스트는, 레프트 가드의 테스트와 마찬가지로, 패턴의 매칭을 행한다. 또한, 센터 바의 테스트에 이용하는 바, 스페이스의 폭의 배열 패턴은, 도 14 및 도 15에 도시한 바와 같이 되어 있다. The test of the center bar of step 207 performs pattern matching similarly to the test of the left guard. In addition, as used for the test of the center bar, the arrangement pattern of the width of the space is as shown in FIGS. 14 and 15.

또한, 본 발명은 상기 실시 형태에 한정되지 않고, 여러 가지로 변경하여 실시하는 것이 가능하다. In addition, this invention is not limited to the said embodiment, It can change and implement in various ways.

또한, 본 발명의 바코드 인식 장치를 휴대 전화기에 내장하는 것도 가능하 다. 휴대 전화기에 바코드 인식 장치를 내장함으로써, 어디에서나 손쉽게 바코드 인식을 할 수 있게 되고, 또한, 바코드 인식 장치에서 인식한 바코드를 바로 송신 가능하다. It is also possible to incorporate the barcode recognition device of the present invention into a mobile phone. By embedding a barcode recognition device in the mobile phone, barcode recognition can be easily performed anywhere, and barcodes recognized by the barcode recognition device can be directly transmitted.

도 16은 본 발명의 바코드 인식 장치를 카메라 내장형 휴대 전화기에 내장한 경우의 블록도이고, 카메라 내장형 휴대 전화기는 전파를 송수신하는 안테나(21), 무선 통신의 송수신을 제어하는 무선부(22), 유저로부터의 키 조작 정보를 입력 생성하는 키 입력부(23), 문자 정보나 화상 정보를 유저에게 표시하는 표시부(24), 음성 신호를 출력하는 스피커(25), 유저로부터 음성 신호를 입력하는 마이크(26), 수신 또는 입력된 문자 정보, 화상 정보, 음성 신호를 기억하는 기억 메모리(27), 대상으로 되는 화상 정보를 입력하는 카메라(28), 및 바코드 인식 장치를 내장하고, 각 부를 제어하는 제어부(29)로 구성된다. 16 is a block diagram when the barcode recognition device of the present invention is incorporated in a camera-equipped cellular phone, the camera-embedded cellular phone includes an antenna 21 for transmitting and receiving radio waves, a wireless unit 22 for controlling transmission and reception of wireless communication, A key input unit 23 for inputting and generating key operation information from the user, a display unit 24 for displaying character information and image information to the user, a speaker 25 for outputting a voice signal, and a microphone for inputting a voice signal from the user ( 26), a control unit for storing the received or input character information, image information, audio signal, a memory memory 27 for storing the target image information, a camera 28 for inputting the target image information, and a bar code recognition device, and controlling each unit; It consists of 29.

상기 구성을 갖는 카메라 내장형 휴대 전화기에 있어서, 카메라(28)로부터 입력된 화상 정보(바코드)로부터 바코드의 인식을 행하는 경우, 유저는 키 입력부(23)를 조작하여 카메라 동작을 선택한다. 제어부(29)는 키 입력부에서의 설정에 기초하여 카메라(28)를 초기화하고, 화상 정보(바코드)의 취득을 개시한다. 카메라(28)로부터 취득된 화상 정보(바코드)는 제어부(29)를 통하여 기억 메모리(27)에 전송된다. 제어부(29)는 기억 메모리(27)에 저장된 화상 정보(바코드)를 표시부(24)에 전송하여, 화상 정보(바코드)의 표시를 행한다. 또한, 화상 정보(바코드)를 연속적으로 취득하고 표시함으로써, 유저는 카메라 화상을 동화상으로서 확인할 수 있다. 한편, 기억 메모리(27)에 저장된 화상 정보(바코드)는 바코드 인식 장치를 갖는 제어부(29)에 전송되고, 본 실시 형태에서 설명한 바코드 인식 처리로써 바코드 인식이 행하여진다. 인식에 성공한 경우, 인식 결과를 기억 메모리(27)에 전송하고, 기억 메모리(27)에 바코드 데이터로서 저장한다. In the camera-equipped mobile phone having the above structure, when the barcode is recognized from the image information (barcode) input from the camera 28, the user operates the key input section 23 to select the camera operation. The control unit 29 initializes the camera 28 based on the setting in the key input unit, and starts acquisition of image information (bar code). Image information (bar code) acquired from the camera 28 is transferred to the storage memory 27 via the control unit 29. The control unit 29 transmits the image information (bar code) stored in the storage memory 27 to the display unit 24 to display the image information (bar code). In addition, by continuously obtaining and displaying image information (bar code), the user can confirm the camera image as a moving image. On the other hand, the image information (barcode) stored in the storage memory 27 is transmitted to the control unit 29 having a barcode recognition device, and barcode recognition is performed by the barcode recognition process described in this embodiment. If the recognition is successful, the recognition result is transferred to the storage memory 27 and stored as barcode data in the storage memory 27.

다음으로 기억 메모리(27)에 저장된 바코드 데이터를 무선 또는 인터넷에 접속하여 송신처에 송신할 때의 동작에 대하여 도 17을 이용하여 설명한다. 유저는 키 입력부(23)를 조작하여 무선 또는 인터넷에의 접속을 선택한다. 제어부(29)는 키 입력부로부터의 설정에 기초하여 무선부(22)에 무선 또는 인터넷에의 접속을 지시한다. 무선부(22)는 제어부(29)로부터의 지시에 기초하여 무선 또는 인터넷에의 접속을 개시한다. 유저는 키 입력부(23)를 조작하여 기억 메모리(27)에 저장 완료한 바코드 데이터의 송신을 선택한다. 제어부(29)는 키 입력부(23)로부터의 설정에 기초하여 기억 메모리(27)에 저장 완료한 바코드 데이터를 무선부(22)에 전송하여 송신을 지시한다. 무선부(22)는 제어부(29)로부터의 지시에 기초하여, 전송된 바코드 데이터를 무선 또는 인터넷에 송신한다. 무선부(22)로부터 송신된 바코드 데이터는 무선망(33)을 통하여 URL 데이터 서버(32)에 송신된다. URL 데이터 서버(32)는 휴대 전화 단말기(34)의 무선망(33)과 인터넷(31)의 게이트웨이의 동작 제어를 행한다. URL 데이터 서버(32)는 수신한 바코드 데이터와 URL 데이터베이스로부터 송신처의 URL을 검색하여 인터넷(31)에의 접속을 행하고 송신처에 바코드 데이터를 전송한다. 전송 완료의 결과는 휴대 단말기(34)에 송신된다. Next, the operation at the time of transmitting the barcode data stored in the storage memory 27 to the transmission destination by wireless or internet connection will be described with reference to FIG. The user operates the key input unit 23 to select a connection to wireless or the Internet. The control unit 29 instructs the wireless unit 22 to connect to the radio or the Internet based on the setting from the key input unit. The radio unit 22 initiates a connection to the radio or the Internet based on the instruction from the control unit 29. The user operates the key input unit 23 to select transmission of the stored bar code data in the storage memory 27. The control unit 29 transmits the stored bar code data to the radio unit 22 based on the setting from the key input unit 23 to the radio unit 22 to instruct transmission. The radio unit 22 transmits the transmitted barcode data to the radio or the Internet based on the instruction from the control unit 29. The barcode data transmitted from the radio section 22 is transmitted to the URL data server 32 via the radio network 33. The URL data server 32 controls the operation of the wireless network 33 of the cellular phone terminal 34 and the gateway of the Internet 31. The URL data server 32 retrieves the URL of the transmission destination from the received barcode data and the URL database, connects to the Internet 31, and transmits the barcode data to the transmission destination. The result of the transfer completion is transmitted to the portable terminal 34.

또한, 본 발명은 컴퓨터를 바코드 인식 장치로서 기능시키는 프로그램으로서, 또한, 해당 프로그램을 기록한 기록 매체로서도 실현할 수 있다. In addition, the present invention can be realized as a program for causing a computer to function as a barcode recognition device, and also as a recording medium on which the program is recorded.

본 발명의 전자 메일 통신 장치는, 본 전자 메일 통신 장치를 기능시키기 위한 프로그램으로도 실현된다. 이 프로그램은 컴퓨터로 판독 가능한 기록 매체에 저장되어 있어도 된다. The electronic mail communication device of the present invention is also realized as a program for making the electronic mail communication device function. This program may be stored in a computer-readable recording medium.

이 기록 매체로서, 바코드 인식 장치 내장의 ROM 그 자체가 프로그램 미디어이어도 되고, 또한 바코드 인식 장치를 CD-ROM 드라이브 등의 프로그램 판독 장치에 접속하여, 거기에 기록 매체를 삽입함으로써 판독 가능한 CD-ROM 등의 프로그램 미디어이어도 된다. 어느 경우에 있어서도, 저장되어 있는 프로그램은 CPU가 액세스하여 실행시키는 구성이어도 되고, 프로그램을 판독하고, 판독된 프로그램은, 도시되어 있지 않은 프로그램 기억 에리어에 다운로드되어, 그 프로그램이 실행되는 방식이어도 된다. 이 다운로드용의 프로그램은 미리 본체 장치에 저장되어 있는 것으로 한다. As the recording medium, the ROM itself having a barcode recognition device may be a program medium, or a CD-ROM or the like which can be read by connecting the barcode recognition device to a program reading device such as a CD-ROM drive and inserting the recording medium therein. May be program media. In either case, the stored program may be configured to be accessed and executed by the CPU, or the program may be read, and the read program may be downloaded to a program storage area (not shown) to execute the program. This download program is preliminarily stored in the main body apparatus.

여기서 상기 프로그램 미디어는, 본체와 분리 가능하게 구성되는 기록 매체이고, 자기 테이프나 카세트 테이프 등의 테이프계, 플로피디스크나 하드디스크 등의 자기 디스크나 CD-ROM/MO/MD/DVD 등의 광 디스크의 디스크계, IC 카드(메모리 카드를 포함함)/ 광 카드 등의 카드계, 혹은 마스크 ROM, EPROM, EEPROM, 플래시 ROM 등에 의한 반도체 메모리를 포함시킨 고정적으로 프로그램을 담지(擔持)하는 매체이어도 된다.Here, the program medium is a recording medium which can be separated from the main body, and is a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy disk or a hard disk, or an optical disk such as a CD-ROM / MO / MD / DVD. Disks, IC cards (including memory cards) / cards such as optical cards, or a medium that contains a fixed program containing semiconductor memory such as a mask ROM, EPROM, EEPROM, flash ROM, or the like. do.

또한, 바코드 인식 장치를 구비하는 휴대 전화기의 송신부 및 수신부를 통하여 통신 네트워크로부터 프로그램을 다운로드하도록, 유동적으로 프로그램을 담지하는 매체이어도 된다. 또한, 이와 같이 통신 네트워크로부터 프로그램을 다운로 드하는 경우에는, 그 다운로드용 프로그램은 미리 장치 본체에 저장해 둔다든지, 혹은 별도의 기록 매체로부터 인스톨되는 것이어도 된다. 또한, 기록 매체에 저장되어 있는 내용으로서는 프로그램에 한정되지 않고, 데이터로서도 무방하다.Further, the medium may be flexibly supported so as to download the program from the communication network via the transmitter and the receiver of the mobile phone having the barcode recognition device. In addition, when downloading a program from a communication network in this way, the downloading program may be stored in the apparatus main body in advance, or may be installed from another recording medium. In addition, the content stored in the recording medium is not limited to a program, but may be data.

도 1은 바코드 인식의 처리의 흐름을 설명하는 플로우차트. 1 is a flowchart for explaining the flow of a bar code recognition process.

도 2는 라벨 부착 처리의 예를 도시하는 도면. 2 is a diagram illustrating an example of labeling processing.

도 3은 인접하는 바의 탐색 처리의 흐름을 설명하는 플로우차트(전반). 3 is a flowchart (overall) illustrating a flow of search processing of adjacent bars.

도 4는 인접하는 바의 탐색 처리의 흐름을 설명하는 플로우차트(후반). 4 is a flowchart (second half) illustrating a flow of search processing of adjacent bars.

도 5는 바코드 인식의 처리의 흐름을 설명하는 플로우차트. 5 is a flowchart for explaining the flow of a bar code recognition process.

도 6은 스페이스 폭을 설명하기 위한 도면. 6 is a diagram for explaining a space width.

도 7은 허용 오차율을 설명하기 위한 도면. 7 is a diagram for explaining an allowable error rate.

도 8은 레프트 가드의 폭의 배열 패턴을 설명하기 위한 도면. 8 is a diagram for explaining an arrangement pattern of the width of the left guard.

도 9는 레프트 가드의 바, 스페이스의 배열 패턴을 설명하기 위한 도면. 9 is a diagram for explaining an arrangement pattern of bars and spaces of a left guard.

도 10은 수치에 대한 폭의 배열의 패턴을 도시하는 도면. 10 shows a pattern of an array of widths for numerical values.

도 11은 도 10에 도시하는 폭 1 내지 폭 4가, 바 폭인지 스페이스 폭인지의 조합을 도시하는 도면. FIG. 11 is a diagram showing a combination of widths 1 to 4 shown in FIG. 10 indicating bar widths or space widths. FIG.

도 12는 수치의 인식 처리의 흐름을 설명하는 플로우차트. 12 is a flowchart for explaining a flow of numerical value recognition processing.

도 13은 홀수 패리티와 짝수 패리티의 조합 결과(프리픽스 디지트)를 도시하는 도면. Fig. 13 is a diagram showing a combination result (prefix digit) of odd parity and even parity.

도 14는 센터 바의 폭의 배열 패턴을 도시하는 도면. 14 shows an arrangement pattern of the width of center bars.

도 15는 센터 바의 바, 스페이스의 배열 패턴을 도시하는 도면. Fig. 15 is a diagram showing an arrangement pattern of bars and spaces in a center bar.

도 16은 카메라 내장형 휴대 전화기의 구성의 설명도. 16 is an explanatory diagram of a configuration of a camera-equipped cellular phone;

도 17은 휴대 전화 단말기의 인터넷에의 접속을 도시하는 도면. Fig. 17 is a diagram showing a connection of the cellular phone terminal to the Internet.

도 18은 바코드의 구성의 설명도. 18 is an explanatory diagram of a configuration of a barcode.

도 19는 검출 빈도와 폭의 관계를 나타내는 도면. Fig. 19 shows the relationship between detection frequency and width.

도 20은 종래의 바코드 추출의 처리의 흐름을 설명하는 플로우차트. 20 is a flowchart for explaining the flow of a conventional bar code extraction process.

도 21은 인접 바의 조건(1)을 설명하기 위한 도면. 21 is a diagram for explaining condition (1) of an adjacent bar;

도 22는 인접 바의 조건(2)을 설명하기 위한 도면. 22 is a diagram for explaining condition (2) of an adjacent bar.

도 23은 인접 바의 조건(3)을 설명하기 위한 도면.Fig. 23 is a diagram for explaining the condition (3) of the adjacent bars.

Claims (3)

입력 화상에 대하여 에지부를 판정하고, 해당 에지부에 대하여 휘도에 관한 히스토그램 변환을 행하는 전처리 수단;Preprocessing means for determining an edge portion with respect to the input image and performing a histogram conversion on luminance with respect to the edge portion; 상기 전처리후의 입력 화상에 대하여 2치화를 행하는 2치화 처리 수단;Binarization processing means for performing binarization on the input image after said preprocessing; 2치화 처리후의 입력 화상에 대하여 라벨 부착을 행하는 라벨 부착 수단;Labeling means for labeling the input image after the binarization processing; 라벨 부착후의 입력 화상으로부터 바코드 영역을 추출하는 바코드 영역 추출 수단; 및Bar code area extraction means for extracting a bar code area from the input image after labeling; And 추출된 바코드 영역으로부터 바코드를 인식하는 바코드 인식 수단Bar code recognition means for recognizing a bar code from the extracted bar code area 을 포함하고,Including, 상기 라벨 부착 수단에 의해 라벨 부착된 입력 화상으로부터, 바의 폭을, 해당 바에 관련한 라벨의 흑 화소 수/수직 방향의 높이에 의해 정의하는 것을 특징으로 하는 바코드 인식 장치.A bar code recognition device, characterized in that the width of the bar is defined by the height in the number of black pixels / vertical direction of the label associated with the bar from the input image labeled by the labeling means. 입력 화상에 대하여, 임의의 임계치보다 크고, 휘도의 미분치를 갖는 화소에 의해서 획정되는 에지부를 결정하고, 해당 에지부에 대해서만 휘도의 히스토그램을 생성하기 위한 전처리 수단;Preprocessing means for determining, for an input image, an edge portion larger than an arbitrary threshold and defined by a pixel having a derivative of luminance, and generating a histogram of luminance only for the edge portion; 상기 전처리 수단에 의해 전처리된 입력 화상을, 상기 히스토그램으로부터 결정되는 2치의 임계치에 기초하여 2치화하는 2치화 처리 수단;Binarization processing means for binarizing the input image preprocessed by the preprocessing means based on a binary threshold determined from the histogram; 상기 2치화 처리 수단에 의해 2치화된 입력 화상에 기초하여 라벨 부착을 행 하는 라벨 부착 수단;Label applying means for labeling based on an input image binarized by said binarization processing means; 상기 라벨 부착 수단에 의해 라벨화된 입력 화상으로부터 바코드 영역을 추출하는 바코드 영역 추출 수단; 및Bar code area extraction means for extracting a bar code area from an input image labeled by said labeling means; And 상기 바코드 영역 추출 수단에 의해 추출된 바코드 영역으로부터 바코드를 인식하는 바코드 인식 수단Bar code recognition means for recognizing a bar code from the bar code area extracted by the bar code area extraction means. 을 포함하고, Including, 상기 라벨 부착 수단에 의해 라벨 부착된 입력 화상으로부터, 바의 폭을, 해당 바에 관련한 라벨의 흑 화소 수/수직 방향의 높이에 의해 정의하는 것을 특징으로 하는 바코드 인식 장치.A bar code recognition device, characterized in that the width of the bar is defined by the height in the number of black pixels / vertical direction of the label associated with the bar from the input image labeled by the labeling means. 입력 화상에 대하여 에지부를 판정하고, 해당 에지부에 대하여 휘도에 관한 히스토그램 변환을 행하는 전처리 수단;Preprocessing means for determining an edge portion with respect to the input image and performing a histogram conversion on luminance with respect to the edge portion; 상기 전처리후의 입력 화상에 대하여 2치화를 행하는 2치화 처리 수단;Binarization processing means for performing binarization on the input image after said preprocessing; 2치화 처리후의 입력 화상에 대하여 라벨 부착을 행하는 라벨 부착 수단;Labeling means for labeling the input image after the binarization processing; 라벨 부착후의 입력 화상으로부터 바코드 영역을 추출하는 바코드 영역 추출 수단; 및Bar code area extraction means for extracting a bar code area from the input image after labeling; And 추출된 바코드 영역으로부터 바코드를 인식하는 바코드 인식 수단Bar code recognition means for recognizing a bar code from the extracted bar code area 을 포함하고,Including, 바코드와 카메라와의 사이가 일정하지 않은 경우에도, 입력 화상 중에서 바코드의 폭을 추출할 수 있도록, 미리 바의 폭을 지정하지 않고, 입력 화상 중에서 바의 폭을 추출하며,Even when the bar code and the camera are not constant, the width of the bar is extracted from the input image without specifying the width of the bar in advance so that the width of the bar code can be extracted from the input image. 상기 라벨 부착 수단에 의해 라벨 부착된 입력 화상으로부터, 바의 폭을, 해당 바에 관련한 라벨의 흑 화소 수/수직 방향의 높이에 의해 정의하는 것을 특징으로 하는 바코드 인식 장치.A bar code recognition device, characterized in that the width of the bar is defined by the height in the number of black pixels / vertical direction of the label associated with the bar from the input image labeled by the labeling means.
KR1020077023711A 2007-10-16 2002-12-17 Barcode recognition apparatus KR100791704B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020077023711A KR100791704B1 (en) 2007-10-16 2002-12-17 Barcode recognition apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020077023711A KR100791704B1 (en) 2007-10-16 2002-12-17 Barcode recognition apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020057011092A Division KR100791705B1 (en) 2005-06-16 2002-12-17 Barcode recognition apparatus

Publications (2)

Publication Number Publication Date
KR20070103789A true KR20070103789A (en) 2007-10-24
KR100791704B1 KR100791704B1 (en) 2008-01-07

Family

ID=38817999

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020077023711A KR100791704B1 (en) 2007-10-16 2002-12-17 Barcode recognition apparatus

Country Status (1)

Country Link
KR (1) KR100791704B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101060753B1 (en) 2011-01-04 2011-08-31 (주)올라웍스 Method, terminal, and computer-readable recording medium for supporting collection of object included in inputted image
KR101079346B1 (en) 2011-03-02 2011-11-04 (주)올라웍스 Method, server, and computer-readable recording medium for providing advertisement using collection information
KR101102896B1 (en) 2011-03-04 2012-01-09 (주)올라웍스 Method, server, and computer-readable recording medium for assisting multiple users to perform collection simultaneously

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4323772A (en) * 1980-03-06 1982-04-06 R. J. Reynolds Tobacco Company Bar code reader system
JP2500859B2 (en) * 1986-11-01 1996-05-29 日本電装株式会社 Bar code reader
EP0484132B1 (en) * 1990-10-30 1999-06-30 Omniplanar, Inc. Multiple resolution machine readable symbols
JP3376175B2 (en) * 1995-07-06 2003-02-10 富士通株式会社 Barcode recognition device
KR100393423B1 (en) * 2001-03-21 2003-08-02 김지영 A method for recognizing 2D barcode information
JP2002290607A (en) * 2001-03-27 2002-10-04 Sanyo Electric Co Ltd Communication terminal device, communication method, and network system

Also Published As

Publication number Publication date
KR100791704B1 (en) 2008-01-07

Similar Documents

Publication Publication Date Title
US7562820B2 (en) Barcode recognition apparatus
US9195868B2 (en) Optical reader having an imager
KR101860569B1 (en) Recognition device for text and barcode reconizing text and barcode simultaneously
US7978911B2 (en) Method of classifying colors of color based image code
US7447362B2 (en) System and method of enabling a cellular/wireless device with imaging capabilities to decode printed alphanumeric characters
EP2407911A2 (en) An optical reader having a color imager
US20020102966A1 (en) Object identification method for portable devices
EP1727070A1 (en) 2-dimensional code region extraction method, 2-dimensional code region extraction device, electronic device, 2-dimensional code region extraction program, and recording medium containing the program
US20090017765A1 (en) System and Method of Enabling a Cellular/Wireless Device with Imaging Capabilities to Decode Printed Alphanumeric Characters
CN101382944A (en) Image processing apparatus and method, image forming apparatus and image reading apparatus
CN102831663A (en) Smart-phone two-dimensional code attendance checking system and smart-phone two-dimensional code attendance checking method
JP4163406B2 (en) Bar code recognition device
CN101364268B (en) Image processing apparatus and image processing method
KR100791704B1 (en) Barcode recognition apparatus
KR100791705B1 (en) Barcode recognition apparatus
Senda et al. Camera-typing interface for ubiquitous information services
JP4860150B2 (en) Optical reader with color imaging device
JPH11184965A (en) Slip identification register device
EP1303830B1 (en) Method and device for recording of information
WO2004086292A1 (en) Method and device for classifying field types of a digital image
JPH09130567A (en) Message transmitter, image information reader and device using it
JP2008040649A (en) Update registration method for image-equipped word dictionary system, and update registration program

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121130

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20131218

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20141219

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee