[go: up one dir, main page]

KR100716692B1 - Code recognition method and device - Google Patents

Code recognition method and device Download PDF

Info

Publication number
KR100716692B1
KR100716692B1 KR1020057006867A KR20057006867A KR100716692B1 KR 100716692 B1 KR100716692 B1 KR 100716692B1 KR 1020057006867 A KR1020057006867 A KR 1020057006867A KR 20057006867 A KR20057006867 A KR 20057006867A KR 100716692 B1 KR100716692 B1 KR 100716692B1
Authority
KR
South Korea
Prior art keywords
cell
value
dimensional code
cells
image
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Lifetime
Application number
KR1020057006867A
Other languages
Korean (ko)
Other versions
KR20050084864A (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 KR1020057006867A priority Critical patent/KR100716692B1/en
Publication of KR20050084864A publication Critical patent/KR20050084864A/en
Application granted granted Critical
Publication of KR100716692B1 publication Critical patent/KR100716692B1/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

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
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1473Methods for optical code recognition the method including quality enhancement steps error correction
    • 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
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • G06K7/1478Methods for optical code recognition the method including quality enhancement steps adapting the threshold for pixels in a CMOS or CCD pixel sensor for black and white recognition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/403Discrimination between the two tones in the picture signal of a two-tone original

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Studio Devices (AREA)

Abstract

화상의 각 셀의 계조치로부터 해당 셀의 색이 백인지 흑인지를 결정하는 경우, 해당 셀의 계조치가 백 혹은 흑으로 충분히 치우쳐 있는 경우에는, 임계치와의 비교로 결정하지만, 해당 셀의 계조치가 그레이존에 있을 때는, 해당 셀의 주위에 있는 셀의 상태로부터 해당 셀의 색을 결정한다. 즉, 해당 셀의 계조치가 회색이고, 주위의 셀이 모두 흑인 경우에는, 해당 셀은 백으로 판단하고, 주위의 셀이 모두 백인 경우에는, 해당 셀은 흑으로 판단한다. When determining whether the color of the cell is white or black from the gradation value of each cell of the image, if the gradation value of the cell is sufficiently biased to be white or black, it is determined by comparison with the threshold, but the gradation value of the cell When is in the gray zone, the color of the cell is determined from the state of the cell around the cell. That is, when the gray value of the corresponding cell is gray and the surrounding cells are all black, the corresponding cell is determined as white, and when the surrounding cells are all white, the corresponding cell is determined as black.

2차원 코드, 셀, 계조치, 롱셔터, 데이터 코드어 2D code, cell, gradation value, long shutter, data codeword

Description

코드 인식 방법 및 장치{CODE RECOGNIZING METHOD AND DEVICE}CODE RECOGNIZING METHOD AND DEVICE

본 발명은, 스캐너나 CCD 카메라 등의 광학 판독 장치로부터 입력한 2차원 코드 화상을, 판독 인식 처리하는 2차원 코드 인식 방법과 인식 장치에 관한 것이다. The present invention relates to a two-dimensional code recognition method and a recognition device that read-recognize a two-dimensional code image input from an optical reading device such as a scanner or a CCD camera.

종래의 2차원 코드 판독 장치에서는, 광학 판독 장치로부터 입력한 2차원 코드 화상을 2치화 처리하고, 2치화한 화상을 이용하여 인식 처리를 행한다(특허 문헌1의 도 14나, 특허 문헌2의 도 1 참조).In the conventional two-dimensional code reading device, the two-dimensional code image input from the optical reading device is binarized, and the recognition process is performed using the binarized image (Fig. 14 of Patent Document 1 and Fig. Of Patent Document 2). 1).

광학 기기로부터 판독한 화상 데이터를 2치 데이터로 변환한 후, 인식 처리를 행하기 위해서는, 어느 일정치 이상의 광학 해상도가 아니면, 데이터의 왜곡에 의한 영향 때문에 인식 정밀도가 저하하는 문제가 있다. 예를 들면, 4방 혹은 8방을 종류가 서로 다른 셀로 둘러싸인 고립 셀(2차원 코드에서, 검은 점이나 흰 점을 구성하고 있는 하나의 격자를 셀이라고 함)은, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우에, 계조치가 인접 셀에 끌려가기 때문에, 다른 값으로 변환된다. 이와 같은 문제점은, 소형 카메라를 내장한 휴대 단말 장치에서, 내장 소형 카메라를 사용하여 2차원 코드를 판독하는 경우, 광학 장치가 작기 때문에, 수신할 수 있는 광량도 적어, 현저한 과제로 된다. In order to perform the recognition processing after converting the image data read from the optical device into binary data, there is a problem that the recognition accuracy is lowered due to the influence of the distortion of the data unless the optical resolution is above a certain value. For example, an isolated cell surrounded by cells of four or eight types of different types (in a two-dimensional code, a grating constituting a black or white point is called a cell) has a low optical resolution or focus. When a misalignment or the like occurs, the gradation value is dragged to an adjacent cell, so that it is converted to another value. Such a problem is a remarkable problem in the portable terminal device having a small camera, since the optical device is small when the two-dimensional code is read using the built-in small camera.

또한, 2치화 처리를 행하지 않고 인식 처리를 진행했다고 하더라도, 셀의 값을 결정할 때에, 단순 2치화의 방법을 이용해서는, 상기의 문제를 해결할 수는 없다.Even when the recognition process is performed without performing the binarization process, the above problem cannot be solved by using the simple binarization method when determining the cell value.

또한, 인식 대상의 2차원 코드에 대하여, 카메라가 부착된 인식 장치를 이동시키면서, 화상을 촬영하고, 인식을 행하는 경우, 일반적으로 화상 1매의 촬영 시간에 비교하여, 인식 처리에 필요로 하는 시간이 길고, 그 결과, 단위 시간 당 표시할 수 있는 화상의 매수가 저하함으로써, 사용자 인터페이스의 기능이 저하되었다. 또한, 이와 같은 경우, 화상의 촬영은 정지 화상의 촬영 제어 방법을 이용하고, 특히, 어두운 장소에서는 센서 감도를 유사적으로 향상시키기 위해서, 카메라의 1 프레임의 화상 데이터 판독 시간을 초과하여, 복수 프레임에 걸쳐 화상을 다중 노광(롱셔터)함으로써, 계조를 확보한 화상의 촬영을 행했다. 한편, 복수 프레임에 걸쳐 다중 노광함으로써, 움직임에 대해서는 흐린 화상이 촬영되고, 그 결과, 인식 성능이 저하한다는 문제가 있었다. In addition, when photographing an image and performing recognition while moving the recognition apparatus with a camera with respect to the two-dimensional code of a recognition object, the time required for recognition processing compared with the imaging time of one image generally As a result of this long, the number of images that can be displayed per unit time is reduced, thereby degrading the function of the user interface. In this case, the image capturing uses a still image capturing control method, and in particular, in a dark place, in order to similarly improve the sensor sensitivity, a plurality of frames exceeding the image data reading time of one frame of the camera. Multiple exposure (long shutter) of the image was performed to capture the image having the gray level secured. On the other hand, by multiple exposure over a plurality of frames, blurry images are picked up for motion, and as a result, there is a problem that the recognition performance is lowered.

[특허 문헌1] 특원평6-042587호 명세서(특개평7-254037호 공보) [Patent Document 1] Specification of Japanese Patent Application Laid-Open No. 6-042587 (JP-A-7-254037)

[특허 문헌2] 특원평8-341354호 명세서(특개평10-187868호 공보)[Patent Document 2] Specification of Japanese Patent Application Laid-Open No. Hei 8-341354 (Japanese Patent Application Laid-Open No. Hei 10-187868)

4 방향 혹은 8 방향을 종류가 서로 다른 셀(백의 셀과 흑의 셀 등, 계조치가 서로 다른 셀)로 둘러싸인 고립 셀은, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우에, 계조치가 인접 셀에 끌려가기 때문에, 단순 2치화의 방법을 이용하는 것만으로는, 셀의 값을 정확하게 변환할 수 없는 문제가 발생했다. Isolation cells surrounded by cells of different types (cells with different gradation values such as white cells and black cells) in four or eight directions have a gradation value when the optical resolution is low or when a focus shift occurs. Since it is attracted to an adjacent cell, a problem arises in that the value of a cell cannot be accurately converted only by using the simple binarization method.

본 발명의 과제는, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생했다고 하더라도, 셀의 값을 정확하게 변환하고, 인식 정밀도를 떨어뜨리지 않고, 2차원 코드의 판독이 가능한 2차원 코드 판독 방법을 제공하는 데 있다.SUMMARY OF THE INVENTION An object of the present invention is to provide a two-dimensional code reading method capable of accurately reading a two-dimensional code without converting a cell value accurately and degrading recognition accuracy even when the optical resolution is low or a misalignment occurs. There is.

또한, 본 발명의 과제는, 단위 시간 당의 인식 처리 속도를 향상함으로써, 표시할 수 있는 화상의 매수가 향상되고, 사용자 인터페이스의 기능을 향상하며, 또한, 어두운 장소에서도 인식에 적합한 화상 데이터를 촬영함으로써, 인식 성능이 향상된 인식 장치를 제공하는 데 있다.In addition, the problem of the present invention is that by increasing the recognition processing speed per unit time, the number of images that can be displayed is improved, the function of the user interface is improved, and the image data suitable for recognition is photographed even in a dark place. In addition, the present invention provides a recognition device with improved recognition performance.

그리고, 이들 과제는, 데이터를 셀화하여 2차원으로 배치한 2차원 코드의 인식에서, 2차원 매트릭스 상의 셀의 좌표치를 검출하는 좌표치 검출 과정과, 검출한 좌표 상의 계조치를 구하는 계조치 검출 과정과, 화상의 색성분의 빈도를 구하여 히스토그램를 작성하는 히스토그램 작성 과정과, 히스토그램로부터 임계치를 구하는 임계치 검출 과정과, 임계치로부터 어느 일정한 거리를 구하고, 임계치로부터 일정한 거리까지를 지정 영역으로 하는 영역 범위 결정 과정과, 계조치가 영역 범위 내에 있는 셀을 선택하는 영역내 셀 선택 과정과, 계조치가 영역 범위의 밖에 있는 셀을 선택하는 영역외 셀 선택 과정과, 상기 영역외 셀 선택 과정에서 선택한 셀을, 계조치와 임계치를 비교한 결과로부터, 셀의 종류(백 또는 흑)를 결정하는 셀치 결정 과정과, 상기 영역내 셀 선택 과정에서 선택한 셀을, 주목 셀에 인접하는 셀의 계조치를 검출하는 인접 셀 계조치 검출 과정과, 인접하는 셀이 모두 동일한 종류이면, 주목 셀을 인접 셀과 서로 다른 종류로 결정하는 제1 셀치 결정 과정과, 인접하는 셀이 모두 동일한 종류가 아니면, 주목 셀을 임계치와 비교하여 셀의 종류를 결정하는 제2 셀치 결정 과정을 갖는 것을 특징으로 한 2차원 코드 인식 방법에 의해 달성된다. These problems include a coordinate value detection step of detecting coordinate values of cells on a two-dimensional matrix in recognition of a two-dimensional code in which data is digitized and placed in two dimensions, and a gray level value detection step of obtaining a gray level value on the detected coordinates; A histogram creation process of obtaining a frequency of color components of an image to create a histogram, a threshold detection process of obtaining a threshold from a histogram, a region range determination process of obtaining a certain distance from a threshold, and setting a predetermined distance from the threshold to a designated area; Intra-area cell selection process for selecting cells whose gradation value is within the area range, Out-of-area cell selection process for selecting cells whose gradation value is outside the area range, and selected cells in the out-of-area cell selection process, A cell value determination process for determining the cell type (white or black) from the result of comparing the threshold value with If the cell selected in the area cell selection process detects the gradation value of the cell adjacent to the cell of interest, and the neighbor cell is of the same kind, the cell of interest is determined to be different from the neighboring cell. Achieved by the two-dimensional code recognition method, characterized in that the first cell value determination step and the adjacent cell are not all of the same type, and the second cell value determination step of determining the cell type by comparing the cells of interest with a threshold value is performed. do.

도 1은, 본 발명에서의 2차원 코드 인식 방법의 처리 블록을 도시하는 도면.1 is a diagram showing a processing block of a two-dimensional code recognition method according to the present invention.

도 2는, 셀의 판별을 위한 임계치의 결정 방법을 설명하는 도면.2 is a diagram for explaining a method for determining a threshold for cell discrimination.

도 3은, 4 근방 혹은 8 근방 인접 셀과의 비교에 의한 셀의 종류의 결정 방법을 설명하는 도면(그 1).FIG. 3 is a diagram illustrating a method of determining the type of a cell by comparison with four or eight adjacent cells (part 1). FIG.

도 4는, 4 근방 혹은 8 근방 인접 셀과의 비교에 의한 셀의 종류의 결정 방법을 설명하는 도면(그 2).FIG. 4 is a diagram for explaining a method of determining the type of a cell by comparison with four or eight adjacent cells (part 2). FIG.

도 5는, 4 근방 인접 셀 및 8 근방 인접 셀을 설명하는 도면.FIG. 5 is a diagram for explaining four neighboring neighboring cells and eight neighboring neighboring cells. FIG.

도 6은, 본 발명의 실시 형태에 따른 셀의 종류의 결정 방법을 설명하는 도면.Fig. 6 is a diagram for explaining a method for determining the type of cell according to the embodiment of the present invention.

도 7은, QR 코드의 인식 처리 플로우.7 is a flow of recognition processing of a QR code.

도 8은, 본 발명의 실시 형태에 따른 2차원 코드 인식 방법의 플로우를 도시하는 도면.8 is a diagram showing a flow of a two-dimensional code recognition method according to an embodiment of the present invention.

도 9는, 도 8의 단계 S203의 상세한 플로우를 도시하는 도면. 9 is a diagram showing a detailed flow of step S203 of FIG. 8;

도 10은, 도 9의 단계 S304의 상세한 플로우를 도시하는 도면. FIG. 10 is a diagram showing a detailed flow of step S304 of FIG. 9;

도 11은, 도 9의 단계 S307의 상세한 플로우를 도시하는 도면. FIG. 11 is a diagram showing a detailed flow of step S307 of FIG. 9;

도 12는, 도 9의 단계 S308의 상세 플로우를 도시하는 도면.FIG. 12 is a diagram showing a detailed flow of step S308 of FIG. 9;

도 13은, 본 발명의 실시 형태에 따른 전처리에 대해 설명하는 도면. It is a figure explaining the pretreatment which concerns on embodiment of this invention.

도 14는, 본 발명의 실시 형태에 따른 전처리의 다른 형태의 설명도. 14 is an explanatory diagram of another embodiment of the pretreatment according to the embodiment of the present invention;

도 15는, 전처리의 흐름을 도시하는 플로우차트.15 is a flowchart showing a flow of preprocessing.

도 16은, 본 발명의 실시 형태에 따른 화상 촬영 시의 노광 시간 제어 방법을 설명하는 도면.FIG. 16 is a view for explaining an exposure time control method at the time of image capturing according to the embodiment of the present invention; FIG.

도 17은, 본 발명의 실시 형태에 따른 2차원 코드와 배경색의 분리 방법을 설명하는 도면(그 1).FIG. 17 is a diagram for explaining a method for separating a two-dimensional code and a background color according to an embodiment of the present invention (No. 1). FIG.

도 18은, 본 발명의 실시 형태에 따른 2차원 코드와 배경색의 분리 방법을 설명하는 도면(그 2).FIG. 18 is a diagram for explaining a method for separating a two-dimensional code and a background color according to an embodiment of the present invention (No. 2). FIG.

도 1은, 본 발명에서의 2차원 코드 인식 방법의 처리 블록을 도시하는 도면이다.1 is a diagram showing a processing block of the two-dimensional code recognition method according to the present invention.

도 1에서, 참조부호 101에서 화상의 판독을 행하고, 광전 전환부인 102에서, 광전 변환을 행한다. 참조부호 103의 A/D 변환부에서는, 아날로그 신호를 디지털 신호로 변환한다. 2차원 코드 인식 처리부인 104에서는, 2차원 코드의 인식 처리를 행하고, 데이터 문자 출력부(105)에서, 2차원 코드의 인식 결과로부터 얻어진 데이터 문자를 출력한다. In Fig. 1, an image is read at 101 and photoelectric conversion is performed at 102 as a photoelectric conversion section. In the A / D conversion section 103, an analog signal is converted into a digital signal. In the two-dimensional code recognition processing unit 104, the two-dimensional code recognition process is performed, and the data character output unit 105 outputs the data character obtained from the recognition result of the two-dimensional code.

또한, 본 실시 형태에서는, 특히, 휴대 전화나 PDA 등의 휴대 단말기를 대상 장치로 한다. 이 종류의 장치에서는, 사진 촬영을 위한 카메라를 내장한 것이 보급되어 있지만, 요즘, 이 카메라를 이용하여 2차원 바코드를 판독하고, 인식한 텍스트 데이터를 장치 내에 수신하고, 텍스트 입력을 간이화시키는 기술이 제창되고 있다.In the present embodiment, in particular, a mobile terminal such as a mobile phone or a PDA is used as the target device. In this type of device, a built-in camera for taking pictures is prevalent, but nowadays, a technique for reading a two-dimensional bar code using this camera, receiving recognized text data in the device, and simplifying text input is used. It is being proposed.

광학 기기로부터 판독한 2차원의 코드 화상에서, 1개의 셀은 복수개의 화소에 의해 구성된다. 그 때문에, 개개의 셀이, 어느 종류(백 혹은 흑)에 속하는지를 결정할 필요가 있다. 먼저, 코드 화상의 셀의 좌표치를 구하고, 셀의 계조 성분을 구한다. 좌표치는 셀의 중심으로 한다. 다음으로, 셀의 계조 성분의 임계치 처리 등에 의해, 어느 종류에 속하는지를 결정한다.In the two-dimensional code image read out from the optical device, one cell is composed of a plurality of pixels. Therefore, it is necessary to determine which kind (white or black) each cell belongs to. First, the coordinate value of the cell of a code image is calculated | required, and the gradation component of a cell is calculated | required. The coordinate value is the center of the cell. Next, it determines which kind belongs to the threshold value processing of the gray-scale component of a cell.

다음으로, 셀이 어느 종류에 속하는지를 판별하기 위한 임계치를 결정한다.Next, a threshold for determining which kind the cell belongs to is determined.

도 2는, 셀의 판별을 위한 임계치의 결정 방법을 설명하는 도면이다. 2 is a diagram for explaining a method for determining a threshold for cell discrimination.

광의 조사량이 적은 경우나, 센서 감도의 범위가 낮은 경우 등(계조치의 범위 폭이 좁은 경우), 고정 임계치(예를 들면, 전체의 계조를 255개의 계조치로 나타낸다고 한 경우, 임계치를 중간의 128로 설정한다)에 의한 변환 방식에서는, 셀의 값을 정확하게 변환할 수 없다. 예를 들면, 광의 조사량이 적은 경우에는, 계조치의 범위는 전체적으로 낮은 레벨로 내려가고, "흐려짐"이나 "망가짐"이 발생한다. 2차원 코드는 흑백 2치로 표현된 것이 많고, 그 때문에 입력 화상의 히스토그램는 명 영역과 암 영역으로 2개의 산이 생긴다(도 2 참조). 그 산 사이의 중앙의 위치를 임계치로 함으로써, "흐려짐"이나 "망가짐"이 없는 최적의 변환 처리를 행하는 것이 가능하게 된다.When the irradiation amount of light is small or when the range of the sensor sensitivity is low (when the range width of the gradation value is narrow), and the fixed threshold value (for example, when the total gradation is represented by 255 gradation values, (The value is set to 128), the cell value cannot be converted accurately. For example, when the amount of light irradiation is small, the range of gradation values is lowered to a lower level as a whole, and "blur" and "broken" occur. The two-dimensional code is often expressed in black and white binary, so that the histogram of the input image generates two mountains in the light region and the dark region (see Fig. 2). By setting the center position between the mountains as the threshold value, it becomes possible to perform an optimal conversion process without "cloudiness" or "brokenness".

도 3 및 도 4는, 4 근방 혹은 8 근방 인접 셀과의 비교에 의한 셀의 종류의 결정 방법을 설명하는 도면이다.3 and 4 are diagrams for explaining a method of determining the type of a cell by comparison with four or eight adjacent cells.

4 방향 혹은 8 방향의 종류가 서로 다른 셀로 둘러싸인 고립 셀은, 광학 해 상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우에, 인접 셀의 영향에 의해 계조치가 끌려가서, 임계치를 이용한 2치화의 방법만으로는, 셀의 값을 정확하게 변환할 수 없다. 예를 들면, 주변이 흑셀로 둘러싸인 백셀은, 주변의 흑셀의 영향에 의해 계조치가 낮아지고, 임계치의 값에 따라서는, 흑셀로 오판별하는 경우가 있다. 이에 따라 도 3에 도시하는 바와 같이, 주목 셀과 인접하는 셀의 계조치와의 비교를 취하고, 계조치의 차가 어느 일정 이상이면 인접 셀과 서로 다른 값으로 변환한다.In an isolated cell surrounded by cells having different kinds of four or eight directions, the gray scale value is attracted by the influence of an adjacent cell when the optical resolution is low or when the focus shift occurs. The method alone cannot accurately convert the value of a cell. For example, a back cell surrounded by black cells may have a low gray level due to the influence of surrounding black cells, and may be misidentified as black cells depending on the threshold value. As a result, as shown in Fig. 3, a comparison is made between the gradation value of the cell of interest and the adjacent cell, and if the difference of the gradation value is more than a certain level, it is converted into a different value from the adjacent cell.

인접 셀이 흑백 양쪽의 값을 가질 때에는(고립점이 아님), 인접 셀의 영향은 적다. 인접 셀이 모두 동일한 값일 때에만, 고립점으로 간주하여 변환 처리를 행한다. When adjacent cells have values in both black and white (not isolated), the influence of adjacent cells is small. Only when all neighboring cells have the same value, the conversion is regarded as an isolated point.

8점 근방의 인접 셀의 영향은, 수평 수직 방향의 영향이 크고, 경사 방향의 영향은 작다. 그러나, 도 4에 도시하는 바와 같이, 좌측의 인접 셀만 백이고, 그 외에는 모두 흑인 경우에는, 주목 셀의 계조치는 흑 방향으로 낮아진다. 이에 따라 8점 근방을 이용하는 경우에는, 인접 셀 모두가 동일한 값이 아니어도, 예를 들면, 8개의 근방 인접 셀 중, 7개가 동일한 종류인 경우에는, 고립점과 마찬가지의 처리를 행한다.The influence of the adjacent cells near eight points is large in the horizontal and vertical directions, and small in the inclined direction. However, as shown in Fig. 4, when only the adjacent cells on the left side are white, and all other colors are black, the gradation value of the cell of interest decreases in the black direction. Accordingly, in the case where eight points of proximity are used, even if all of the adjacent cells are not the same value, for example, when seven of the eight neighboring cells are the same type, the same processing as that of the isolated point is performed.

즉, 도 3 좌측에서는, 중심 셀의 주위의 4개의 인접 셀의 계조치가 각각 31, 40, 31, 28이기 때문에, 임계치를 128로 한 경우, 이들은 흑으로 판단된다. 이 때, 중심 셀의 계조치가 임계치 이하이더라도, 인접 셀이 모두 흑이고, 중심 셀과 인접 셀의 계조치의 차가 어느 일정 이상인 경우에는, 중심 셀은 백으로 한다. 도 3 우측에서는, 4 근방 인접 셀의 계조치가 각각, 231, 240, 240, 228이고, 임계치를 128로 하면, 모두 백으로 판단된다. 여기서, 중심 셀의 계조치가 143으로 임계치보다 크다고 했을 때, 주위의 셀이 모두 백이고, 주위의 셀과의 계조치의 차가 일정치 이상이면, 중심 셀은 흑으로 판단한다.That is, in the left side of Fig. 3, since the gradation values of four adjacent cells around the center cell are 31, 40, 31, and 28, respectively, they are judged to be black when the threshold value is 128. At this time, even if the gradation value of the center cell is equal to or less than the threshold value, when the adjacent cells are all black and the difference between the gradation values of the center cell and the adjacent cell is more than a certain level, the center cell is set to white. In the right side of FIG. 3, when the gradation values of four neighboring adjacent cells are 231, 240, 240, and 228, and the threshold value is 128, all are judged to be white. Here, when the gradation value of the center cell is larger than the threshold value at 143, if the surrounding cells are all white and the difference between the gradation values with the surrounding cells is a certain value or more, the center cell is determined to be black.

도 4 좌측에서는, 8 근방 인접 셀이 모두 흑인 경우, 중심 셀의 계조치가 임계치 이하이더라도, 인접 셀이 모두 흑이고(임계치 이하이고), 또한, 중심 셀과 인접 셀과의 계조치의 차가 어느 일정치인 경우에는, 중심 셀은 백으로 판단한다. 도 4 우측에서는, 8 근방 인접 셀 중, 7개가 흑이고, 1개가 백으로 되어 있다. 이 경우에도, 중심 셀과 임계치 이하의 인접 셀의 계조치를 비교하고, 차가 일정치 이상이면, 중심 셀은 백으로 한다. 반대로 백으로 중심 셀이 둘러싸인 경우에도, 마찬가지로 하여, 중심 셀을 흑으로 한다.In the left side of Fig. 4, when all 8 neighboring cells are black, even if the gray level value of the center cell is below the threshold value, the adjacent cells are all black (less than the threshold value), and the difference between the gray level value between the center cell and the adjacent cell is determined. In the case of a constant value, the center cell is determined to be white. In the right side of Fig. 4, seven of the eight adjacent cells are black and one is white. Also in this case, the gradation values of the center cell and adjacent cells below the threshold are compared, and if the difference is more than a predetermined value, the center cell is made white. Conversely, even when the center cell is surrounded by white, the center cell is made black.

이상, 주위가 서로 다른 종류의 셀로 둘러싸인 경우라 하더라도, 정확하게 변환 처리를 행하는 것이 가능하다.As described above, even when the surroundings are surrounded by different kinds of cells, it is possible to accurately perform the conversion process.

도 5는, 4 근방 인접 셀 및 8 근방 인접 셀을 설명하는 도면이다.5 is a diagram for explaining four neighboring neighboring cells and eight neighboring neighboring cells.

도 5에 도시하는 바와 같이, 4 근방의 인접 셀은, 중심 셀의 수평 수직 방향에 인접하는 4개의 셀을 나타낸다. 또한, 8 근방의 인접 셀은, 4 근방에 경사 4 방향을 더한 인접 셀을 나타낸다. As shown in FIG. 5, adjacent cells near four represent four cells adjacent to the horizontal and vertical direction of the center cell. In addition, the adjacent cell of 8 vicinity shows the adjacent cell which added four inclination directions to four vicinity.

상기한 바와 같이, 8 근방의 경사 방향의 셀은 4 근방의 셀과 비교하여, 중심 셀로부터의 거리가 멀기 때문에, 중심 셀의 계조치에 주는 영향은 작다.As described above, the cell in the oblique direction near 8 is far from the center cell compared with the cell near 4, so that the influence on the gradation value of the center cell is small.

도 6은, 본 발명의 실시 형태에 따른 셀의 종류의 결정 방법을 설명하는 도 면이다.6 is a diagram illustrating a method of determining the type of cell according to the embodiment of the present invention.

도 6에 도시하는 바와 같이, 계조치의 히스토그램에서, 임계치를 중심으로 하여, 일정 범위를 설정하고, 셀의 계조치가 이 일정 범위 내에 들어가 있는지의 여부를 판단함으로써, 셀의 종류의 결정의 방법을 바꾼다.As shown in Fig. 6, in the histogram of gradation values, a method of determining the cell type by setting a predetermined range centering on the threshold value and determining whether the gradation value of the cell falls within this predetermined range. Change.

도 6에 도시하는 바와 같이, 영역 범위 내로 되는 셀은, 상기한 바와 같이, 인접 셀의 값과 비교하여 셀의 값을 결정한다. 일정한 영역 밖에 있는 셀은, 임계치와의 비교에 의해 백과 흑으로 분별한다. 임계치로부터 어느 일정 범위의 그레이존을 설정함으로써, 인접 셀의 영향을 받고 있다고 생각되는 셀과, 영향을 받고 있지 않다고 생각되는 셀로 분별할 수 있다.As shown in FIG. 6, the cell falling within the region range determines the value of the cell compared with the value of the adjacent cell as described above. Cells outside a certain region are classified into white and black by comparison with a threshold. By setting a certain range of gray zones from the threshold, it is possible to distinguish between cells that are considered to be affected by adjacent cells and cells that are not affected.

도 6에서는, 임계치를 중심으로 하여, 어느 일정 범위의 영역을 설정하고 있지만, 이것에 의해, 고립 셀, 혹은 인접 셀의 대부분이 주목 셀과 서로 다른 값인 경우, 주목 셀의 계조치는 서로 다른 방향으로 끌려가기 때문에, 임계치 주변의 값으로 된다. 임계치로부터 어느 일정 범위의 영역을 설정함으로써, 인접 셀의 영향을 받는 셀과, 영향을 받지 않는 셀로 분별할 수 있다.In Fig. 6, although a certain range of area is set around the threshold, by this, when most of the isolated cells or adjacent cells have different values from the cells of interest, the gradation values of the cells of interest are in different directions. As it is dragged, it becomes a value around the threshold. By setting a certain range of regions from the threshold, it is possible to distinguish between cells affected by neighboring cells and cells not affected.

그리고, 영역 범위의 밖에 있는 셀은, 임계치와 비교하여 셀의 값을 결정한다. 인접 셀의 영향을 받는 셀과 받지 않는 셀로 분별하여 처리를 행함으로써, 오류가 없는 정확한 셀의 값을 구하는 것이 가능하다.Cells outside the area range determine the cell value compared to the threshold. By discriminating between cells affected by neighboring cells and cells not affected, it is possible to obtain an accurate cell value without errors.

이상을 정리한다. Summarize the above.

2차원 매트릭스 상에 패턴으로 하여 배치된 셀의 값을 구하기 위해서, 먼저 화상 메모리 공간 상의 셀의 좌표치를 검출한다. 다음으로, 검출한 좌표 상의 셀 의 계조치를 구한다. 다음으로, 셀의 계조 성분의 히스토그램를 작성하고, 임계치를 결정한다. 임계치를 중심으로 하여 어느 일정 폭의 영역을 설치하고, 인접 셀의 영향을 받는 셀과, 영향을 받지 않는 셀로 분별한다. 그리고, 영역 내의 셀은, 인접 셀과 비교하여 셀의 값을 결정한다. 영역 외의 셀은, 임계치와 비교하여 셀의 값을 결정한다.In order to obtain the value of the cell arranged as a pattern on the two-dimensional matrix, first, the coordinate value of the cell in the image memory space is detected. Next, the gradation value of the cell on the detected coordinate is calculated. Next, a histogram of the gradation components of the cell is created, and the threshold value is determined. An area of a certain width is provided around the threshold, and the cell is divided into cells affected by adjacent cells and cells not affected. The cell in the area then determines the value of the cell compared to the adjacent cell. Cells outside the region determine the value of the cell compared to the threshold.

이상의 처리를 행함으로써, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우라 하더라도, 셀의 값을 정확하게 변환 처리하고, 인식 정밀도를 떨어뜨리지 않고 2차원 코드의 판독이 가능하게 된다. By performing the above process, even when the optical resolution is low or when the deviation of the focus occurs, the cell value can be converted accurately and the two-dimensional code can be read without degrading the recognition accuracy.

또한, 본 발명의 실시 형태에서는, 이하와 같은 수단을 실시한다. Moreover, in embodiment of this invention, the following means are implemented.

인식 대상의 코드에 대하여, 카메라가 부착된 인식 장치를 이동시키면서, 화상을 촬영하고 인식을 행하는 경우, 일반적으로 화상 1매의 촬영 시간에 비교하여, 인식 처리에 필요로 하는 시간이 길고, 그 결과, 단위 시간 당 표시할 수 있는 화상의 매수가 저하되고, 사용자 인터페이스의 기능이 저하했다는 문제점에 대하여, 이하와 같이 한다.When photographing and recognizing an image while moving a recognition device with a camera with respect to a code to be recognized, in general, the time required for the recognition process is longer as compared with the shooting time of one image, and as a result, The problem that the number of images which can be displayed per unit time is lowered and the function of the user interface is lowered is as follows.

대상 화상에 코드가 포함되는지 인식의 가능성을 평가하는 전처리 수단을 마련하고, 전처리 수단의 판정 결과로 대상이 코드라고 판정할 수 있는 경우에만, 실제의 인식 처리를 실시한다. 이 결과, 단위 시간 당의 인식 시행 횟수를 증가시키고, 단위 시간 당의 인식 처리 속도가 외관상 향상되고, 또한, 표시할 수 있는 화상의 매수가 향상됨으로써 사용자 인터페이스의 기능을 향상한다.Preprocessing means for evaluating the possibility of recognizing whether or not a code is included in the target image is provided, and the actual recognition process is performed only when it is possible to determine that the object is a code by the determination result of the preprocessing means. As a result, the number of recognition trials per unit time is increased, the recognition processing speed per unit time is improved in appearance, and the number of images that can be displayed is improved, thereby improving the function of the user interface.

또한, 종래에는, 1차원 코드와 2차원 코드를 대상으로 하는 인식의 경우에 는, 대상의 코드를 사용자가 판단하고, 사용자가 인식 처리 자체를 전환하여 실시했다. 상기 전처리 수단에서 1차원과 2차원 코드 영역의 화상 특징을 판정하고, 판정 결과에 의해 1차원과 2차원 코드의 인식 처리를 실행함으로써, 인식 처리의 자동 전환을 행한다.In addition, conventionally, in the case of recognition which targets one-dimensional code and two-dimensional code, the user judges the target code and the user switches the recognition process itself. The preprocessing means determines the image characteristics of the one-dimensional and two-dimensional code regions, and performs the recognition processing of the one-dimensional and two-dimensional code based on the determination result, thereby automatically switching the recognition processing.

2차원 코드는 흑백 도트가 50% 전후의 비율이고, 또한, 2차원으로 분포하는 특징이 있다. 이에 따라, 화상의 소영역(X, Y)에 대하여, 화소 계조치 분산, 화소흑 화소율, 흑백 엣지 수(종횡)의 1이상의 특징으로부터 2차원 코드 영역인 평가를 행하는 전처리가 가능하게 된다. The two-dimensional code has a ratio of around 50% of the black and white dots, and has a characteristic that it is distributed in two dimensions. As a result, preprocessing for evaluating the small region X, Y of the image, which is a two-dimensional code region, can be performed from one or more features of pixel gradation value dispersion, pixel black pixel rate, and monochrome edge number (vertical and horizontal).

1차원 코드는 어떤 길이를 갖는 세로선이 복수의 개수 조합되어 구성되는 특징이 있다. 이에 따라, 화상의 소영역(X, Y)에 대하여, 화소 계조치 분산, 흑백 엣지 수(가로), 라인 상관의 1개 이상의 특징으로부터 1차원 코드 영역인 평가를 행하는 전처리가 가능하게 된다.The one-dimensional code has a feature in which a plurality of vertical lines having a certain length are combined. This enables preprocessing to evaluate the small area (X, Y) of the image, which is a one-dimensional code area, from one or more features of pixel gray scale value dispersion, number of black and white edges (horizontal), and line correlation.

인식 대상의 코드에 대하여, 카메라가 부착된 인식 장치를 이동시키면서, 화상을 촬영하고, 인식을 행하는 경우, 화상의 촬영은 정지 화상의 촬영 제어 방법을 이용하고, 특히, 어두운 장소에서는 센서 감도를 유사적으로 향상시키기 위해서, 센서의 1 프레임의 화상 데이터의 판독 시간을 초과하여, 복수 프레임의 화상을 다중 노광(일반적으로 롱셔터라 함)함으로써 계조성을 확보한 화상의 촬영을 행했다. 한편, 복수 프레임을 다중 노광함으로써, 움직임에 대해서는 망가진 화상이 촬영되고, 그 결과, 코드의 인식 성능이 저하되었다. 이 문제에 대해서는, 이하와 같다.When photographing and recognizing the image while moving the recognition device with a camera with respect to the code to be recognized, the image capturing uses a still image capturing control method. In order to improve, the image | capture | photographing of the image which ensured the gradation was performed by carrying out multiple exposure (generally called a long shutter) of the image of several frames beyond the reading time of the image data of one frame of a sensor. On the other hand, by multiple exposure of a plurality of frames, a broken image is photographed with respect to movement, and as a result, the recognition performance of the code is deteriorated. This problem is as follows.

카메라의 촬영 시간을 카메라의 데이터 판독 시간 이내로 한정함으로써, 어 두운 장소에서도 인식에 적합한 화상 데이터를 촬영함으로써, 인식 성능이 향상된 인식 장치를 제공한다.By limiting the shooting time of the camera to within the data reading time of the camera, it is possible to provide a recognition device with improved recognition performance by capturing image data suitable for recognition in a dark place.

2차원 코드는 백과 흑의 셀과, 2차원 코드의 경계를 나타내는 N셀분의 백셀을 가지고 구성되었다. 2차원 코드의 영역을 추출하기 위해서는, 흑셀에 계속되는 N셀분의 백셀을 검출하고, 검출한 경계를 연결한 직사각형 부분을 2차원 코드 영역으로서 추출할 수 있도록 구성되었다. The two-dimensional code was composed of white and black cells and back cells for N cells representing the boundary of the two-dimensional code. In order to extract the two-dimensional code region, the N-cell backcell following the black cell was detected, and the rectangular portion connecting the detected boundary was extracted as the two-dimensional code region.

한편, 2차원 코드는 사용자에게는 의미가 없는 흑백의 셀의 집합이기 때문에, 디자인 상의 관점으로부터 경계 영역의 주위를 색으로 둘러싸는 등의 인쇄를 행하여 사용되었다. 단순 고정 임계치나 히스토그램에 의해 쌍방의 산의 피크를 구하고, 결정한 임계치로 셀의 흑백셀을 결정하면, 색이 있는 경계 영역의 외측의 부분도 흑셀로 되고, 경계의 판정 시에 2차원 코드의 영역을 추출할 수 없는 경우가 있었다. 이 문제에 대해서는, 이하와 같다. On the other hand, since the two-dimensional code is a set of black and white cells which are meaningless to the user, the two-dimensional code has been used for printing such as surrounding the boundary area with colors from the viewpoint of design. If the peaks of both mountains are obtained by a simple fixed threshold or histogram, and the black and white cells of the cell are determined by the determined threshold, the portion outside the colored boundary area is also a black cell, and the area of the two-dimensional code is determined at the time of determining the boundary. Could not be extracted. This problem is as follows.

입력 화상의 히스토그램로 암 영역, 명 영역, 배경의 중간 영역과 3개의 산이 생긴다. 그 산의 암측의 레벨 범위 영역을 결정하는 흑셀 레벨 결정 과정에 의해 임계치를 결정한다. 결정한 임계치로 셀치를 구하고, 흑셀과 비흑셀의 연속 길이를 이용하여, 코드 경계를 검출함으로써, 2차원 코드의 추출을 올바르게 행할 수 있다.The histogram of the input image produces a dark region, a bright region, a middle region of the background, and three mountains. The threshold value is determined by the black cell level determination process of determining the level range region on the dark side of the mountain. The cell value is determined at the determined threshold value, and the two-dimensional code can be correctly extracted by detecting the code boundary using the continuous lengths of the black and non-black cells.

이하, 보다 구체적으로 설명한다. Hereinafter, it demonstrates more concretely.

여기서는, 2차원 코드의 예로서 QR 코드를 예로 들어 설명한다. 다른 2차원 코드에 관해서도, 마찬가지의 처리를 행할 수 있다. QR 코드 인식의 상세 내용은, JIS 규격 "JIS X 0510:2차원 코드 심볼-QR 코드 기본 사양 해설"을 참조한다.Here, the QR code will be described as an example of the two-dimensional code. Similar processing can be performed with respect to other two-dimensional codes. For details of QR code recognition, refer to JIS standard "JIS X 0510: Two-dimensional code symbol-QR code basic specification explanation".

도 7은, QR 코드의 인식 처리 플로우이다.7 is a flow of recognition processing of a QR code.

단계 S101에서, 흑/백셀의 인식을 행한다. 본 발명의 처리의 대부분은, 이 단계 S101의 상세에 관한 것이다. 단계 S102에서는, QR 코드에 포함되어 있는 형식 정보의 복호를 행한다. 형식 정보는, QR 코드가 결정된 위치에 부호화되어 기술되어 있는 QR 코드의 모델 번호 및 마스크의 종류이다. 이것을 단계 S102에서는, 복호한다. 단계 S103에서는, 판독한 형식 정보로부터 모델 번호를 결정하고, 단계 S104에서는, 마스크 처리의 해제를 행한다. 마스크 처리란, 2차원 코드인 QR 코드를 생성하는 경우, 정보를 단순히 부호화한 것 만으로는, 2차원 코드로 한 경우, 2차원 면에 배치되는 흑셀과 백셀의 배분이 백측 혹은 흑측으로 치우치게 된다. 이 때, 미리 정해진 몇개의 마스크의 중의 1개를 2차원 코드로 중첩해 주고, 흑셀과 백셀의 분포가 균일하게 되도록 하는 것이다.In step S101, black / white cells are recognized. Most of the processing of the present invention relates to the details of this step S101. In step S102, the format information included in the QR code is decoded. The format information is a model number of a QR code and a kind of mask which are encoded and described at a position where a QR code is determined. This is decoded in step S102. In step S103, the model number is determined from the read format information, and in step S104, the mask process is released. In the case of generating a QR code, which is a two-dimensional code, by simply encoding the information, when the two-dimensional code is used, the distribution of the black cells and the back cells arranged on the two-dimensional surface is biased toward the white side or the black side. At this time, one of several predetermined masks is superimposed in a two-dimensional code so that the distribution of a black cell and a back cell becomes uniform.

단계 S105에서는, 마스크 처리를 해제하여 얻어진 2차원 코드로부터 데이터 및 오류 정정 코드어의 복원을 행한다. 단계 S106에서는, 오류 정정 코드어를 사용함으로써, 복원된 데이터에 오류가 있는지의 여부를 판단한다. 단계 S106에서, 오류가 있다고 판단된 경우에는, 단계 S107에서, 오류 정정을 행하고, 오류가 없다고 판단된 경우에는 그대로 버리고 S108로 진행한다. 단계 S108에서는, 데이터 코드어의 복호를 행하고, 단계 S109에서, 복호된 데이터 코드어를 출력하여, 처리를 종료한다.In step S105, data and error correction codewords are restored from the two-dimensional code obtained by canceling the mask process. In step S106, it is determined whether or not there is an error in the restored data by using an error correction codeword. If it is determined in step S106 that there is an error, error correction is made in step S107. If it is determined that there is no error, the process proceeds to S108. In step S108, the data codeword is decoded. In step S109, the decoded data codeword is output, and the processing ends.

도 8은, 본 발명의 실시 형태에 따른 2차원 코드 인식 방법의 플로우를 도시 하는 도면이다.8 is a diagram illustrating a flow of a two-dimensional code recognition method according to an embodiment of the present invention.

단계 S201에서, 광학 기기로부터 입력된 화상으로부터, 2차원의 매트릭스 상에 패턴으로 하여 배치된 셀의 값을 구하기 위해서, 먼저 화상 메모리 공간 상의 셀의 좌표치를 검출한다. 셀의 좌표치의 계산 방법에 관해서는, "JIS X 0510:2차원 코드 심볼-QR 코드 기본 사양 해설"에 기재된 방법을 이용하는 것으로 한다.In step S201, in order to obtain the value of the cell arranged as a pattern on the two-dimensional matrix, from the image input from the optical device, the coordinate value of the cell in the image memory space is first detected. Regarding the calculation method of the cell coordinate value, the method described in "JIS X 0510: Two-dimensional code symbol-QR code basic specification commentary" is used.

단계 S202에서, 검출한 좌표 상의 셀의 계조치를 구한다. In step S202, the gradation value of the cell on the detected coordinate is obtained.

단계 S203에서, 셀의 값을 결정한다.In step S203, the value of the cell is determined.

도 9는, 도 8의 단계 S203의 상세한 플로우를 도시하는 도면이다.9 is a diagram illustrating a detailed flow of step S203 of FIG. 8.

단계 S301에서, 셀의 계조 성분의 빈도를 구하고, 히스토그램를 작성한다. 코드 영역에 포함되는 화소의 계조 성분으로부터 히스토그램를 작성해도 된다. In step S301, the frequency of the gradation components of the cell is obtained, and a histogram is created. A histogram may be created from the gradation components of the pixels included in the code area.

단계 S302에서, 임계치를 결정한다. 히스토그램의 좌측(암)으로부터 주사해 가고, 빈도가 어느 일정치 이상으로 되는 계조 성분을 검출하고, 계조 성분이 낮은 영역의 피크 위치를 구한다. 마찬가지로 우측(명)으로부터 주사해 가고, 빈도가 어느 일정치 이상으로 되는 계조 성분을 검출하고, 계조 성분이 높은 영역의 피크 위치를 구한다. 그리고, 2개의 피크 위치의 중간을 구하고, 임계치로 한다(도 2 참조). In step S302, a threshold is determined. It scans from the left (arm) of the histogram, detects the gradation component whose frequency becomes more than a certain value, and finds the peak position of the region where the gradation component is low. Similarly, scanning is performed from the right side (light), the gradation component whose frequency is above a certain value is detected, and the peak position of the region where the gradation component is high is obtained. Then, the middle of the two peak positions is found, and it is set as the threshold (see Fig. 2).

단계 S303에서, 영역 범위를 설정한다. In step S303, an area range is set.

예를 들면, 도 2의 히스토그램에서 x축에 주목하고, 계조치가 낮은 영역에 생긴 피크와 임계치 사이를 m 분할하고, 임계치로부터 n/m 떨어진 위치를 구하는 범위로 한다. 마찬가지로 하여, 계조치가 높은 영역에서도, 임계치로부터 n/m 떨 어진 위치를 구하는 범위로 한다. 또한, n은 m을 초과하지 않는 값으로 한다.For example, in the histogram of FIG. 2, attention is paid to the x-axis, m is divided between the peak and the threshold generated in the region having a low gradation value, and the range of n / m away from the threshold is determined. Similarly, even in a region having a high gradation value, the range of n / m away from the threshold is determined. In addition, n is taken as the value which does not exceed m.

단계 S304에서, 영역 범위 내에 있는 셀과, 영역 범위 밖에 있는 셀로 분별한다. In step S304, the cells are classified into cells within the area range and cells outside the area range.

다음으로, 단계 S305~S309에서, 2차원 코드에 저장된 셀의 변환 처리를 행한다. 이하에 파라미터의 설정을 행한다. Next, in steps S305 to S309, conversion processing of the cell stored in the two-dimensional code is performed. The parameter is set below.

a) data[i]:셀의 계조치 a) data [i]: gradation value of the cell

b) i: 셀 번호 b) i: cell number

c) n: 셀의 총 개수 c) n: total number of cells

d) flag[i]:영역 내인지 영역 밖인지의 판별 1: 영역 외 0: 영역 내 d) flag [i]: discriminate whether it is in or out of region 1: out of region 0: in region

d)의 파라미터는, 단계 S304에서 구한다.The parameter of d) is obtained in step S304.

단계 S305에서, 셀 모두에 대하여 변환 처리를 행했는지를 판별한다. In step S305, it is determined whether or not conversion processing has been performed for all the cells.

단계 S306에서, flag[i]의 값에 의해, 2개의 처리로 분별한다. flag[i]가 1이면, 단계 S307의 셀의 결정 방법1로 진행한다. flag[i]가 0이면, 단계 S308의 셀의 결정 방법2로 진행한다.In step S306, two processes are classified according to the value of flag [i]. If flag [i] is 1, the flow advances to cell determination method 1 in step S307. If flag [i] is 0, the flow advances to cell determination method 2 in step S308.

단계 S307로 진행한 셀은, 히스토그램 상의 영역 범위 밖에 있는 셀에서, 임계치와 비교하여 셀의 값을 결정한다. 단계 S308로 진행한 셀은, 히스토그램 상의 영역 범위 내에 있는 셀에서, 인접 셀과 비교하여 셀의 값을 결정한다.The cell that proceeds to step S307 determines the value of the cell in comparison to the threshold, in a cell outside the region range on the histogram. The cell that proceeds to step S308 determines the value of the cell in comparison with the adjacent cell in the cell within the region range on the histogram.

단계 S309에서, 셀 번호를 1개 진행시키고, 단계 S305로 진행한다. 모든 셀에 대하여 변환 처리를 행하면, 처리를 종료한다.In step S309, one cell number is advanced, and the flow proceeds to step S305. If the conversion process is performed for all cells, the process ends.

도 10은, 도 9의 단계 S304의 상세한 플로우를 도시하는 도면이다.FIG. 10 is a diagram illustrating a detailed flow of step S304 of FIG. 9.

도 10의 플로우에서는, 개개의 셀이, 영역 범위 내에 있는지 영역 범위 밖에 있는지를 판별한다. 모든 셀에 대하여 판별을 행하고, flag[i]의 값을 설정한다. 이하에 파라미터의 설정을 행한다. 다른 파라미터에 관해서는 a)~d)와 마찬가지이다. In the flow of FIG. 10, it is determined whether individual cells are within an area range or outside an area range. All cells are discriminated and the value of flag [i] is set. The parameter is set below. The other parameters are the same as in a) to d).

e) threshl: 영역 범위 계조치가 낮은 영역의 임계치 e) threshl: Threshold for the region with low region range gradation

f) thresh2: 영역 범위 계조치가 높은 영역의 임계치 f) thresh2: Threshold for the region with a high range of gradations

단계 S401에서, 셀 번호를 초기화한다.In step S401, the cell number is initialized.

단계 S402에서, 셀 모두에 대하여 flag[i]를 구했는지를 판별한다.In step S402, it is determined whether flag [i] is obtained for all cells.

단계 S403에서, 셀의 계조치를 비교하고, 영역 범위의 내에 있는지 밖에 있는지를 판별한다.In step S403, the gradation values of the cells are compared to determine whether they are within or outside the area range.

단계 S404에서, 영역 범위 내에 있으면 flag[i]에 0을 대입한다.In step S404, 0 is substituted into flag [i] if it is within an area range.

단계 S405에서, 영역 범위의 밖에 있으면 flag[i]에 1을 대입한다.In step S405, 1 is substituted into flag [i] if it is outside the region range.

단계 S406에서, 셀 번호를 1개 진행시키고, 다음으로 진행한다. In step S406, one cell number is advanced, and the flow proceeds to the next.

모든 셀에 대하여 flag[i]의 값을 구하면, 처리를 종료한다.When the value of flag [i] is found for all cells, the processing ends.

도 11은, 도 9의 단계 S307의 상세한 플로우를 도시하는 도면이다.FIG. 11 is a diagram illustrating a detailed flow of step S307 of FIG. 9.

도 11의 처리를 행하는 셀은, 영역 범위 밖에 있는 셀이고, 임계치와 비교하여 셀의 값을 결정한다. The cell which performs the process of FIG. 11 is a cell which is out of an area range, and determines the value of a cell compared with a threshold value.

단계 S501에서, 계조치와 임계치의 값을 비교한다.In step S501, the gradation value and the threshold value are compared.

단계 S502에서, 계조치가 임계치보다도 적으면, 셀의 값을 흑(0)으로 한다. In step S502, if the gradation value is less than the threshold value, the cell value is black (0).

단계 S503에서, 계조치가 임계치보다도 크면, 셀의 값을 백(255)으로 한다. In step S503, if the gradation value is larger than the threshold value, the cell value is set to the bag 255.

셀의 값은 흑을 0, 백을 255로 했지만, 그 밖의 값을 이용해도 상관없다. The cell value is 0 for black and 255 for white, but other values may be used.

도 12는, 도 9의 단계 S308의 상세 플로우를 도시하는 도면이다. FIG. 12 is a diagram illustrating a detailed flow of step S308 of FIG. 9.

이 처리를 행하는 셀은, 영역 범위 내에 있는 셀이고, 인접 셀과 비교하여 셀의 값을 결정한다.The cell which performs this process is a cell within an area range, and the value of a cell is determined compared with an adjacent cell.

또한, 각 파라미터는 이하와 같다. In addition, each parameter is as follows.

j:인접 셀 번호 j: adjacent cell number

k:인접 셀의 개수k: number of adjacent cells

4 근방에서는 k=4K = 4 around 4

8 근방에서는 k=8 Near 8 k = 8

count_b:인접 셀의 흑의 개수 count_b: the number of black of adjacent cells

count_w:인접 셀의 백의 개수 count_w: the number of bags of adjacent cells

ndata[i]:인접 셀의 계조치 ndata [i]: gradation value of adjacent cell

rev_thresh:인접 셀이 이 개수 이상이면, 인접 셀과 서로 다른 값으로 중심 셀의 종류를 결정한다. rev_thresh: If there are more than this number of adjacent cells, the type of the center cell is determined by a value different from the adjacent cells.

단계 S601에서, 파라미터의 초기화를 행한다.In step S601, parameter initialization is performed.

단계 S602에서, 인접 셀 모두의 값을 구했는지 판별을 행한다. In step S602, it is determined whether the values of all adjacent cells are obtained.

단계 S603에서, 인접 셀의 계조치(ndata[J])가 임계치를 초과했는지를 판별한다. In step S603, it is determined whether the gray scale value ndata [J] of the adjacent cell exceeds the threshold.

임계치 이하이면, S604에서 흑의 카운트를 1개 진행시킨다. If it is below the threshold, one black count is advanced in S604.

임계치 이상이면, S605에서 백의 카운트를 1개 진행시킨다. If it is more than the threshold, the count of the bag is advanced by one in S605.

단계 S606에서 인접 셀의 참조 개소를 1개 진행시키고, 모든 인접 셀을 결정하면 다음의 처리로 진행한다. In step S606, one reference position of the neighboring cell is advanced, and when all neighboring cells are determined, the process proceeds to the next.

단계 S607에서, 인접 셀이 임계치 이상 개수 흑인지를 판별한다.In step S607, it is determined whether neighboring cells are equal to or greater than the threshold number of blacks.

단계 S608에서, 임계치 이상 개수 흑이면, 주목 셀을 백의 값으로 결정하고, 처리를 종료한다. In step S608, if the threshold number is more than black, the cell of interest is determined to be the value of white, and the processing ends.

단계 S609에서, 인접 셀이 임계치 이상 개수 백이면 주목 셀을 흑의 값으로 결정하고, 처리를 종료한다. 단계 S611에서, 어느 쪽에도 속하지 않으면, 주목 셀을 임계치와 비교하여, 셀의 값을 결정한다. 임계치 이하이면 흑으로 하고, 임계치 이상이면 백으로 한다. In step S609, if the neighboring cell is equal to or greater than the threshold number, the cell of interest is determined to be a black value, and the processing is terminated. In step S611, if it does not belong to either, the cell of interest is compared with the threshold to determine the value of the cell. If it is below the threshold, it is black. If it is above the threshold, it is white.

이상의 처리를 행함으로써, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우라 하더라도, 셀의 값을 정확하게 변환 처리하고, 인식 정밀도를 떨어뜨리지 않고 2차원 코드의 판독이 가능하게 된다.By performing the above process, even when the optical resolution is low or when the deviation of the focus occurs, the cell value can be converted accurately and the two-dimensional code can be read without degrading the recognition accuracy.

도 13은, 본 발명의 실시 형태에 따른 전처리에 대해 설명하는 도면이다. It is a figure explaining the pretreatment which concerns on embodiment of this invention.

인식 대상의 2차원 코드에 대하여, 카메라가 부착된 인식 장치를 이동시키면서, 화상을 촬영하고, 인식을 행하는 경우, 일반적으로, 화상 1매의 촬영 시간에 비교하여 인식 처리에 필요로 하는 시간이 길고, 그 결과, 단위 시간 당 표시할 수 있는 화상의 매수가 저하함으로써 사용자 인터페이스의 기능이 저하했다.When photographing and recognizing an image while moving a recognition device with a camera with respect to a two-dimensional code to be recognized, in general, the time required for the recognition process is long compared with the photographing time of one image. As a result, the number of images that can be displayed per unit time is reduced, so that the function of the user interface is reduced.

대상 화상에 2차원 코드가 포함되는지의 여부를 평가하는 전처리 수단을 마련하고, 전처리 수단의 판정 결과로 대상이 2차원 코드라고 판정할 수 있는 경우에만, 실제의 인식 처리를 실시함으로써, 단위 시간 당의 인식 시행 횟수를 증가시키 고 단위 시간 당의 인식 처리 속도가 외관상 향상되고, 표시할 수 있는 화상의 매수도 향상되고, 사용자 인터페이스의 기능을 향상할 수 있다.By providing preprocessing means for evaluating whether or not the target image includes the two-dimensional code, and performing the actual recognition process only when the object can be determined to be the two-dimensional code as a result of the determination of the preprocessing means, It is possible to increase the number of times of recognition, to improve the recognition processing speed per unit time, to improve the number of images that can be displayed, and to improve the function of the user interface.

도 13에서는, 코드 인식을 개시하면, 인식용 화상을 단계 S700에서 취득한다. 단계 S701에서는, 프리뷰 화상을 작성하고, 프리뷰를 사용자에게 제시한다. 취득된 화상은, 단계 S702에서, 전처리되고, 단계 S703에서, 화상에 코드가 포함되어 있는지의 여부를 판단한다. 코드가 포함되어 있지 않다고 판단된 경우에는, 다시, 인식용 화상의 취득을 행한다. 단계 S703에서 코드가 포함되어 있다고 판단된 경우에는, 단계 S704에서, 2차원 코드 인식 처리를 행한다. 단계 S705에서는, 디코드에 성공했는지의 여부를 판단한다. 실패한 경우에는, 다시, 인식용 화상의 취득을 행한다. 디코드에 성공한 경우에는, 단계 S706에서, 디코드 결과를 출력하여, 코드 인식을 종료한다.In Fig. 13, when code recognition is started, the recognition image is acquired in step S700. In step S701, a preview image is created and the preview is presented to the user. The acquired image is preprocessed in step S702, and it is determined in step S703 whether a code is included in the image. If it is determined that no code is included, the recognition image is acquired again. If it is determined in step S703 that a code is included, a two-dimensional code recognition process is performed in step S704. In step S705, it is determined whether or not the decoding was successful. If it fails, the recognition image is acquired again. If the decoding succeeds, in step S706, the decoding result is output, and code recognition is terminated.

촬영한 화상에 대하여, 전처리로서 이하의 처리를 행하고, 이들의 조건을 만족한 경우에만, 대상의 화상에 2차원 코드가 존재하는 것으로 판단하고, 인식 처리를 실시한다. The following processing is performed as a preprocess on the picked-up image, and only when these conditions are satisfied, it is determined that the two-dimensional code exists in the target image, and the recognition processing is performed.

전처리:촬영 화상의 소영역(X×Y 화소)에 대하여, Preprocessing: For a small area (X × Y pixel) of the captured image,

·화소의 계조치 분산(콘트라스트)>αPixel variance (contrast)> α

·β1<화소의 흑 화소율<β2Β1 <black pixel rate of pixels <β2

·흑백 엣지 수(종횡 방향)>γNumber of monochrome edges (vertical and horizontal)> γ

의 조건을 만족하는 경우에 2차원 코드 영역으로 판정한다. 또한, α, β1, β2,γ는, 미리 실험적으로 구해 놓는다. If the condition is satisfied, the two-dimensional code area is determined. In addition, (alpha), (beta) 1, (beta) 2, (gamma) are previously experimentally calculated | required.

도 14는, 본 발명의 실시 형태에 따른 전처리의 다른 형태의 설명도이다.14 is an explanatory diagram of another embodiment of the pretreatment according to the embodiment of the present invention.

또한, 도 14에서, 도 13과 동일한 단계에는 동일한 부호를 붙이고, 설명을 생략한다.In FIG. 14, the same steps as in FIG. 13 are denoted by the same reference numerals, and description thereof is omitted.

또한, 종래에는, 1차원 코드와 2차원 코드를 대상으로 하는 경우에는, 대상의 코드를 사용자가 판단하고, 사용자가 인식 처리를 전환하여 실시했다. 대상 화상에 1차원과 2차원 코드가 포함되는지의 여부를 평가하는 전처리 수단을 마련하고, 전처리 수단의 판정 결과로 대상이 1차원, 2차원 코드로 판정할 수 있는 경우에만, 실제의 인식 처리를 실시함으로써, 단위 시간 당의 인식 시행 횟수를 증가시키고, 단위 시간 당의 인식 처리 속도가 외관상 향상되고, 표시할 수 있는 화상의 매수도 향상되고, 사용자 인터페이스의 기능을 향상할 수 있을 뿐만 아니라, 1차원과 2차원 코드에 대하여 자동의 인식 처리를 실현할 수 있다.In the related art, in the case where the one-dimensional code and the two-dimensional code are targeted, the user determines the target code, and the user switches the recognition process. Preprocessing means for evaluating whether the one-dimensional and two-dimensional codes are included in the target image is provided, and the actual recognition process is performed only when the object can be determined as the one-dimensional or two-dimensional code as a result of the determination of the preprocessing means. This increases the number of times the recognition is performed per unit time, improves the recognition processing speed per unit time, improves the number of images that can be displayed, and improves the function of the user interface. Automatic recognition processing can be realized for two-dimensional codes.

촬영한 화상에 대하여, 전처리로서 이하의 처리를 행하고, 이들의 조건을 만족한 경우에만, 대상의 화상에 코드가 존재하는 것으로 판단하고, 인식 처리를 실시한다. The following processing is performed as a preprocess on the picked-up image, and only when these conditions are satisfied, it is determined that a code exists in the target image, and a recognition process is performed.

전처리:Pretreatment:

촬영 화상의 소영역(X×Y 화소)에 대하여, For a small area (X × Y pixel) of the captured image,

2차원 코드Two-dimensional code

·화소의 계조치 분산(콘트라스트)>αPixel variance (contrast)> α

·β1<화소의 흑 화소율<β2Β1 <black pixel rate of pixels <β2

·흑백 엣지 수(종횡 모두)>γ Number of monochrome edges (both vertical and horizontal)> γ

1차원 코드 One-dimensional code

·화소의 계조치 분산(콘트라스트)>αPixel variance (contrast)> α

·흑백 엣지 수(가로)>θ Monochrome edge number (horizontal)> θ

·라인 상관=상관 피크 위치가 라인 간에 동일Line correlation = correlation peak position is the same between lines

한 경우에 2차원, 1차원 코드 영역으로 판정In one case, two-dimensional or one-dimensional code region

도 13의 경우와 마찬가지로, α, β1, β2, γ, θ 등은, 실험적으로 최적의 값을 설정해 둔다.As in the case of FIG. 13, α, β1, β2, γ, θ, and the like are experimentally set to optimal values.

도 15는, 전처리의 흐름을 도시하는 플로우차트이다. 15 is a flowchart showing the flow of preprocessing.

먼저, 단계 S800에서, 화소치의 계조치 분산이 범위 밖인지의 여부를 판단하고, 범위 밖인 경우에는, 단계 S807에서 코드 없음 결과 출력을 행하고 전처리를 종료한다. 단계 S801에서는, 가로 엣지 수를 계산하고, 범위 밖일 때에는, 단계 S807로, 범위 내일 때에는, 단계 S802에서 세로 엣지 수를 검출한다. 단계 S802에 서, 세로 엣지 수가 범위 밖인 경우에는, 단계 S804로 진행한다. 세로 엣지 수가 범위 내일 때에는, 단계 S803에서, 흑 화소율을 검출하고, 범위 밖일 때에는, 단계 S807로 진행하고, 범위 내일 때에는, 단계 S804로 진행한다. 단계 S804에서는, 라인간 상관을 취하고, 단계 S805에서, 코드가 있는지의 여부를 판단한다. 단계 S805에서, 코드 없음으로 판단된 경우에는, 단계 S807로 진행한다. 단계 S805에서, 코드 있음으로 판단된 경우에는, 단계 S806에서, 1차원 코드인지 2차원 코드인지의 판정 결과를 출력하고, 처리를 종료한다. First, in step S800, it is judged whether or not the gradation value dispersion of pixel values is out of a range. If it is out of a range, a codeless result is output in step S807 and the preprocessing ends. In step S801, the number of horizontal edges is calculated, and when out of range, the number of vertical edges is detected in step S807, and in range, in step S802. In step S802, if the number of vertical edges is out of range, the flow advances to step S804. When the number of vertical edges is within the range, the black pixel rate is detected in step S803. When the number of vertical edges is out of the range, the flow advances to step S807, and when within the range, the flow proceeds to step S804. In step S804, inter-line correlation is taken, and in step S805, it is determined whether there is a code. If it is determined in step S805 that there is no code, the flow proceeds to step S807. If it is determined in step S805 that there is a code, then in step S806, a determination result of whether it is a one-dimensional code or a two-dimensional code is output, and the process ends.

도 16은, 본 발명의 실시 형태에 따른 화상 촬영 시의 노광 시간 제어 방법 을 설명하는 도면이다.FIG. 16 is a view for explaining an exposure time control method at the time of image capturing according to the embodiment of the present invention. FIG.

종래의 경우, 인식 대상의 2차원 코드에 대하여, 카메라가 부착된 인식 장치를 이동시키면서, 화상을 촬영하고, 인식을 행하는 경우, 화상의 촬영은 정지 화상의 촬영 제어 방법을 이용하고, 특히, 어두운 장소에서는, 센서 감도를 유사적으로 향상시키기 위해서, 센서의 1매의 화상 데이터의 판독 시간을 초과하여, 복수 프레임의 화상을 다중 노광(롱셔터)함으로써, 계조를 확보한 화상의 촬영을 행했다. 한편, 복수 프레임을 다중 노광함으로써, 움직임에 의해서 흐려진 화상이 촬영되고, 그 결과, 인식 성능이 저하되었다(도 16 참조:종래의 노광 시간 제어).Conventionally, in the case of photographing an image and performing recognition while moving a recognition device with a camera with respect to a two-dimensional code to be recognized, the photographing of the image uses a still image shooting control method, and in particular, In the place, in order to similarly improve the sensor sensitivity, an image having a gradation secured by taking multiple exposures (long shutter) of images of a plurality of frames beyond the reading time of one image data of the sensor. On the other hand, by multiple exposure of a plurality of frames, an image blurred by motion is captured, and as a result, the recognition performance is reduced (see Fig. 16: conventional exposure time control).

본 발명의 실시 형태에서는, 카메라의 노광 시간을 카메라의 1 프레임의 구동 시간 이내로 한정함으로써(도 16 참조: 본 발명의 노광 시간 제어), 어두운 장소에서도 인식에 적합한 움직임에 추종할 수 있는 흐려짐이 없는 화상 데이터를 촬영함으로써, 인식 성능이 향상된 인식 장치를 제공한다.In the embodiment of the present invention, by limiting the exposure time of the camera to the driving time of one frame of the camera (see FIG. 16: exposure time control of the present invention), there is no blur that can follow the movement suitable for recognition even in a dark place. By photographing image data, a recognition device having improved recognition performance is provided.

도 17 및 도 18은, 본 발명의 실시 형태에 따른 2차원 코드와 배경색의 분리 방법을 설명하는 도면이다.17 and 18 are diagrams illustrating a method of separating the two-dimensional code and the background color according to the embodiment of the present invention.

2차원 코드는 백과 흑의 셀과, 2차원 코드의 경계를 나타내는 N셀분의 백셀을 가지고 구성되었다. 2차원 코드의 영역을 추출하기 위해서는, 흑셀에 계속되는 N셀분의 백셀을 검출하고, 검출한 경계를 연결한 직사각형 부분을 2차원 코드 영역으로서 추출할 수 있도록 구성되었다.The two-dimensional code was composed of white and black cells and back cells for N cells representing the boundary of the two-dimensional code. In order to extract the two-dimensional code region, the N-cell backcell following the black cell was detected, and the rectangular portion connecting the detected boundary was extracted as the two-dimensional code region.

한편, 2차원 코드는 사용자에게는 의미가 없는 흑백의 셀의 집합이기 때문에, 디자인 상의 관점으로부터 경계 영역의 주위를 색으로 둘러싸는 등의 인쇄를 행하여 사용되었다. 단순 고정 임계치나 히스토그램에 의해 계조치의 쌍봉 형상의 산의 피크를 구하고, 결정한 임계치로 셀의 흑백셀을 결정하면, 색이 있는 경계 영역의 외측의 부분도 흑셀로 되어, 경계의 판정 시에 2차원 코드의 영역을 추출할 수 없는 경우가 있었다.On the other hand, since the two-dimensional code is a set of black and white cells which are meaningless to the user, the two-dimensional code has been used for printing such as surrounding the boundary area with colors from the viewpoint of design. When the peak of the bimodal peak of the gradation value is determined by a simple fixed threshold or histogram, and the black and white cell of the cell is determined by the determined threshold, the part outside the colored boundary area also becomes a black cell. In some cases, the area of the dimension code could not be extracted.

도 17에 도시하는 바와 같이, 입력 화상의 히스토그램로 암 영역, 명 영역, 배경의 중간 영역과 3개의 산이 생긴다. 이에 따라, 그 산의 암측의 레벨 범위 영역을 결정하는, 상기한 바와 같은 흑셀 레벨의 결정 방법(도 2에서, 임계치를 흑셀 레벨로 설정한다)에 의해 임계치를 결정한다. 결정한 임계치로 셀치를 구하고, 흑셀과 비흑셀의 연속 길이를 이용하여 코드 경계를 검출함으로써, 2차원 코드의 추출을 올바르게 행할 수 있다.As shown in Fig. 17, the histogram of the input image generates a dark region, a bright region, a middle region of the background, and three mountains. Thereby, the threshold value is determined by the above-described determination method of the black cell level (the threshold value is set to the black cell level in FIG. 2) which determines the level range region on the dark side of the mountain. The cell value is determined by the determined threshold value, and the two-dimensional code can be extracted correctly by detecting the code boundary using the continuous lengths of the black and non-black cells.

도 18에서는, 2차원 코드의 경계 부분의 계조치와 인식된 셀의 관계를 도시하고 있다. 종래예에서는 경계로 판정되지 않는 경우라 하더라도, 본 발명에 의해, 경계의 판정을 올바르게 행할 수 있다. 검출된 경계를 연결하고, 직사각형 영역을 잘라냄으로써, 2차원 영역의 추출을 올바르게 행할 수 있다. In Fig. 18, the relationship between the gradation value of the boundary portion of the two-dimensional code and the recognized cell is shown. In the conventional example, even if it is not determined as the boundary, the boundary can be correctly judged by the present invention. By connecting the detected boundaries and cutting out the rectangular region, it is possible to correctly extract the two-dimensional region.

본 발명에 의해, 광학 해상도가 낮은 경우나 핀트의 어긋남 등이 발생한 경우에도, 셀의 값을 정확하게 변환하는 것이 가능하고, 인식 정밀도를 떨어뜨리지 않고, 2차원 코드의 판독이 가능하게 된다.According to the present invention, even when the optical resolution is low or when a misalignment of the focus occurs, the cell value can be converted accurately, and the two-dimensional code can be read without degrading the recognition accuracy.

본 발명의 인식 방법을 이용함으로써, 인식 정밀도가 높은 2차원 코드 판독 장치를 제공하는 것이 가능하다. By using the recognition method of the present invention, it is possible to provide a two-dimensional code reading device with high recognition accuracy.

또한, 단위 시간 당의 인식 처리 속도를 전처리의 판정에 의해 향상함으로써, 표시할 수 있는 화상의 매수가 향상되고, 사용자 인터페이스의 기능을 향상한다. 또한, 어두운 장소에서도 인식에 적합한 화상 데이터를 촬영함으로써, 인식 성능이 향상된 인식 장치를 제공하는 것이 가능하다. In addition, by improving the recognition processing speed per unit time by the determination of preprocessing, the number of images that can be displayed is improved, and the function of the user interface is improved. In addition, it is possible to provide a recognition device with improved recognition performance by photographing image data suitable for recognition even in a dark place.

Claims (16)

삭제delete 삭제delete 삭제delete 주목 셀과 인접 셀의 계조치를 비교하는 계조치 비교 과정과,A gradation value comparison process for comparing gradation values of a cell of interest and an adjacent cell, 인접 셀과 임계치를 비교하는 인접 셀 임계치 비교 과정과,A neighbor cell threshold comparison process for comparing a neighbor cell with a threshold; 계조치 비교 과정 또는 인접 셀 임계치 비교 과정에 의해, 인접 셀의 종류를 결정하는 인접 셀 결정 과정과,An adjacent cell determination step of determining a type of an adjacent cell by a gray level comparison process or a neighbor cell threshold comparison process; 인접하는 셀이 모두 동일한 종류, 또는, 어떤 일정 개수 이상 동일한 종류이면, 주목 셀을 인접 셀과 서로 다른 종류로 결정하는 셀치 결정 과정Cell value determination process of determining the cell of interest as a different type from the adjacent cell if all adjacent cells are the same kind or a certain number or more of the same kind 을 포함하는 것을 특징으로 하는 2차원 코드 인식 방법.Two-dimensional code recognition method comprising a. 제4항에 있어서,The method of claim 4, wherein 상기 인접 셀은,The adjacent cell, x 방향 및 y 방향으로 4개의 셀을 선택하는 것을 특징으로 하는 2차원 코드 인식 방법.A two-dimensional code recognition method characterized by selecting four cells in the x direction and the y direction. 제4항에 있어서,The method of claim 4, wherein 상기 인접 셀은, The adjacent cell, x 방향 및 y 방향으로 8개의 셀을 선택하는 것을 특징으로 하는 2차원 코드 인식 방법.A two-dimensional code recognition method characterized by selecting eight cells in the x direction and the y direction. 제4항에 있어서,The method of claim 4, wherein 셀치 결정 과정은, Self-determination process, 인식 대상의 부분 영역에 대하여 계조치가 범위 내에 있는 셀에만 작용시키는 것을 특징으로 하는 2차원 코드 인식 방법.A method for recognizing a two-dimensional code, wherein a gradation value is applied only to a cell within a range for a partial region to be recognized. 삭제delete 제7항에 있어서, The method of claim 7, wherein 셀치 결정 과정은,Self-determination process, 상기 인식 대상의 부분 영역에 대하여 계조치가 범위 밖에 있는 셀을 선택하고,Selecting a cell whose gradation value is out of a range of the partial region to be recognized; 선택한 셀을 임계치와 비교하여 셀치를 결정하는 것을 특징으로 하는 2차원 코드 인식 방법. And determining a cell value by comparing the selected cell with a threshold value. 데이터를 셀화하여 2차원으로 배치한 2차원 코드의 인식 방법에 있어서,In the two-dimensional code recognition method in which the data is cellized and arranged in two dimensions, 셀의 좌표치를 검출하는 좌표치 검출 과정과,A coordinate value detection process for detecting the coordinate values of the cell, 검출한 좌표 상의 계조치를 구하는 계조치 검출 과정과,A gradation value detection process of obtaining a gradation value on the detected coordinates, 화상의 계조치의 빈도를 구하여 히스토그램을 작성하는 히스토그램 작성 과정과,A histogram making process of obtaining a frequency of grayscale values of an image to create a histogram, 히스토그램으로부터 임계치를 구하는 임계치 검출 과정과,A threshold detection process of obtaining a threshold value from a histogram, 임계치로부터 어느 일정한 거리를 구하고, 임계치로부터 일정한 거리까지를 지정 영역으로 하는 영역 범위 결정 과정과,An area range determination process of obtaining a certain distance from the threshold value and setting the distance from the threshold value to a predetermined distance as a designated area; 계조치가 영역 범위의 내에 있는 셀을 선택하는 영역내 셀 선택 과정과, An intra-cell selection process for selecting cells whose gradation values are within the range of the region, 계조치가 영역 범위의 밖에 있는 셀을 선택하는 영역외 셀 선택 과정과, An out-of-area cell selection process for selecting cells whose gradation values are outside of the area range, 상기 영역외 셀 선택 과정에서 선택한 셀을, 계조치와 임계치를 비교한 결과로부터, 셀의 종류를 결정하는 셀치 결정 과정과,A cell value determination step of determining a cell type from a result of comparing the gray level value with a threshold value selected in the cell selection process outside the area; 상기 영역내 셀 선택 과정에서 선택한 셀을, 주목 셀에 인접하는 셀의 계조치를 검출하는 인접 셀 계조치 검출 과정과, A neighboring cell gradation value detecting step of detecting a gradation value of a cell adjacent to the cell of interest, the cell selected in the cell selection process in the region; 인접하는 셀이 모두 동일한 종류이면, 주목 셀을 인접 셀과 서로 다른 종류로 결정하는 제1 셀치 결정 과정과, A first cell value determination process of determining a cell of interest as a different type from an adjacent cell if all adjacent cells are the same kind; 인접하는 셀이 모두 동일한 종류가 아니면, 주목 셀을 임계치와 비교하여 셀의 종류를 결정하는 제2 셀치 결정 과정A second cell value determination process of determining a cell type by comparing a cell of interest with a threshold value if all adjacent cells are not the same type; 을 포함하는 것을 특징으로 하는 2차원 코드 인식 방법.Two-dimensional code recognition method comprising a. 카메라에 의해 취득된 화상에 포함되는 코드의 인식을 행하는 인식 장치에 있어서,In a recognition device for recognizing a code included in an image acquired by a camera, 취득된 화상의 특징을 판정하고, 그 화상에 1차원 혹은 2차원 코드가 포함되어 있는지의 여부를 판정하는 전처리 수단을 마련하고,Provide preprocessing means for determining the characteristics of the acquired image and for determining whether the image contains one-dimensional or two-dimensional code, 상기 전처리 수단의 판정의 결과, 1차원 코드 및 2차원 코드의 어느 것도 포함되어 있지 않은 경우에 입력 화상의 갱신 처리를 실행하는 것을 특징으로 하는 코드 인식 장치.And a process of updating the input image when none of the one-dimensional code and the two-dimensional code is included as a result of the determination of the preprocessing means. 삭제delete 제11항에 있어서, The method of claim 11, 상기 전처리 수단은,The pretreatment means, 화상의 소영역에 대하여, 화소 계조치 분산, 화소 흑화소율, 흑백 엣지 수의 1개 이상의 판정에 기초하여 2차원 코드인지의 여부를 판정하는 것을 특징으로 하는 코드 인식 장치. A code recognizing apparatus, characterized in that it is determined whether or not a small area of an image is a two-dimensional code based on one or more determinations of pixel gradation value dispersion, pixel black pixel ratio, and monochrome edge number. 제11항에 있어서, The method of claim 11, 상기 전처리 수단은,The pretreatment means, 화상의 소영역에 대하여, 화소 계조치 분산, 흑백 엣지 수, 라인 상관의 1개 이상의 판정에 기초하여 1차원 코드인지의 여부를 판정하는 것을 특징으로 하는 코드 인식 장치. A code recognizing apparatus, characterized in that it is determined whether or not it is a one-dimensional code for a small area of an image based on one or more determinations of pixel gradation value dispersion, black-and-white edge number, and line correlation. 제11항에 있어서, The method of claim 11, 상기 카메라의 노출 시간이 상기 카메라의 1 프레임의 주기를 초과하지 않는 것을 특징으로 하는 코드 인식 장치. And the exposure time of the camera does not exceed a period of one frame of the camera. 삭제delete
KR1020057006867A 2005-04-21 2003-04-15 Code recognition method and device Expired - Lifetime KR100716692B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020057006867A KR100716692B1 (en) 2005-04-21 2003-04-15 Code recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020057006867A KR100716692B1 (en) 2005-04-21 2003-04-15 Code recognition method and device

Publications (2)

Publication Number Publication Date
KR20050084864A KR20050084864A (en) 2005-08-29
KR100716692B1 true KR100716692B1 (en) 2007-05-09

Family

ID=37269913

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020057006867A Expired - Lifetime KR100716692B1 (en) 2005-04-21 2003-04-15 Code recognition method and device

Country Status (1)

Country Link
KR (1) KR100716692B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5020119A (en) * 1989-06-26 1991-05-28 Eastman Kodak Company System for producing serrated, alternating pixel pattern on character boundaries
US5111194A (en) * 1989-02-16 1992-05-05 Ricoh Company, Ltd. Artificial halftone processing apparatus
JP2001245139A (en) * 2000-02-28 2001-09-07 Sony Corp Digital image recording apparatus and method, and transmission method
JP2001312721A (en) * 2000-04-26 2001-11-09 Internatl Business Mach Corp <Ibm> Image processing method, detecting method for relative density, and image processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5111194A (en) * 1989-02-16 1992-05-05 Ricoh Company, Ltd. Artificial halftone processing apparatus
US5020119A (en) * 1989-06-26 1991-05-28 Eastman Kodak Company System for producing serrated, alternating pixel pattern on character boundaries
JP2001245139A (en) * 2000-02-28 2001-09-07 Sony Corp Digital image recording apparatus and method, and transmission method
JP2001312721A (en) * 2000-04-26 2001-11-09 Internatl Business Mach Corp <Ibm> Image processing method, detecting method for relative density, and image processor

Also Published As

Publication number Publication date
KR20050084864A (en) 2005-08-29

Similar Documents

Publication Publication Date Title
JP4327101B2 (en) Code recognition method and apparatus
JP4180497B2 (en) Code type discrimination method and code boundary detection method
JP4137890B2 (en) Image processing apparatus, image forming apparatus, image reading processing apparatus, image processing method, image processing program, and computer-readable recording medium
CN107566684B (en) Image processing apparatus, image processing method, and storage medium
EP3422690B1 (en) Information processing apparatus, control method thereof, and program
JP4115999B2 (en) Image processing apparatus, image forming apparatus, image reading processing apparatus, image processing method, image processing program, and computer-readable recording medium
EP0949801A2 (en) Image process apparatus, image process method and storage medium
KR100716692B1 (en) Code recognition method and device
EP1492327A1 (en) Image processing device
JP4398498B2 (en) Code boundary detection method
JP3118469B2 (en) Image area separation device
EP1202553B1 (en) Image processing apparatus
JP4454297B2 (en) Binarization processing apparatus and binarization processing method
US7545535B2 (en) Robust automatic page size detection algorithm for scan application
JP3426747B2 (en) Color halftone area determination device
JP5127687B2 (en) Bar code reading apparatus, bar code reading program, and bar code reading method
JP2874592B2 (en) Image processing device for distinguishing text / photo / dot area
JP3426746B2 (en) Halftone area search device
KR19990011500A (en) Local binarization method of the imaging system
JP4059600B2 (en) Image processing apparatus and image processing method
JP3115301B2 (en) Halftone dot area separation method and apparatus
JP4444545B2 (en) Image combiner
JP3999420B2 (en) Image processing apparatus and image processing method
JP2016091341A (en) Image processing device
JPH05344329A (en) Picture area discriminating device

Legal Events

Date Code Title Description
PA0105 International application

Patent event date: 20050421

Patent event code: PA01051R01D

Comment text: International Patent Application

A201 Request for examination
PA0201 Request for examination

Patent event code: PA02012R01D

Patent event date: 20050510

Comment text: Request for Examination of Application

PG1501 Laying open of application
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20060830

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20070313

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20070503

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20070504

End annual number: 3

Start annual number: 1

PG1601 Publication of registration
PR1001 Payment of annual fee

Payment date: 20100427

Start annual number: 4

End annual number: 4

PR1001 Payment of annual fee

Payment date: 20110421

Start annual number: 5

End annual number: 5

PR1001 Payment of annual fee

Payment date: 20120423

Start annual number: 6

End annual number: 6

FPAY Annual fee payment

Payment date: 20130502

Year of fee payment: 7

PR1001 Payment of annual fee

Payment date: 20130502

Start annual number: 7

End annual number: 7

FPAY Annual fee payment

Payment date: 20140418

Year of fee payment: 8

PR1001 Payment of annual fee

Payment date: 20140418

Start annual number: 8

End annual number: 8

FPAY Annual fee payment

Payment date: 20150416

Year of fee payment: 9

PR1001 Payment of annual fee

Payment date: 20150416

Start annual number: 9

End annual number: 9

FPAY Annual fee payment

Payment date: 20160419

Year of fee payment: 10

PR1001 Payment of annual fee

Payment date: 20160419

Start annual number: 10

End annual number: 10

FPAY Annual fee payment

Payment date: 20170330

Year of fee payment: 11

PR1001 Payment of annual fee

Payment date: 20170330

Start annual number: 11

End annual number: 11

FPAY Annual fee payment

Payment date: 20180417

Year of fee payment: 12

PR1001 Payment of annual fee

Payment date: 20180417

Start annual number: 12

End annual number: 12

FPAY Annual fee payment

Payment date: 20190417

Year of fee payment: 13

PR1001 Payment of annual fee

Payment date: 20190417

Start annual number: 13

End annual number: 13

PR1001 Payment of annual fee

Payment date: 20200417

Start annual number: 14

End annual number: 14

PR1001 Payment of annual fee

Payment date: 20210415

Start annual number: 15

End annual number: 15

PC1801 Expiration of term

Termination date: 20231015

Termination category: Expiration of duration