WO2004055713A1 - バーコード認識装置 - Google Patents

バーコード認識装置 Download PDF

Info

Publication number
WO2004055713A1
WO2004055713A1 PCT/JP2002/013194 JP0213194W WO2004055713A1 WO 2004055713 A1 WO2004055713 A1 WO 2004055713A1 JP 0213194 W JP0213194 W JP 0213194W WO 2004055713 A1 WO2004055713 A1 WO 2004055713A1
Authority
WO
WIPO (PCT)
Prior art keywords
bar
barcode
width
area
input image
Prior art date
Application number
PCT/JP2002/013194
Other languages
English (en)
French (fr)
Inventor
Takeharu Muramatsu
Original Assignee
Sharp Kabushiki Kaisha
Takeharu Muramatsu
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 Sharp Kabushiki Kaisha, Takeharu Muramatsu filed Critical Sharp Kabushiki Kaisha
Priority to EP02786131A priority Critical patent/EP1580683B1/en
Priority to PCT/JP2002/013194 priority patent/WO2004055713A1/ja
Priority to CNB028301994A priority patent/CN100458827C/zh
Priority to JP2004560576A priority patent/JPWO2004055713A1/ja
Priority to DE60228894T priority patent/DE60228894D1/de
Priority to US10/539,236 priority patent/US7562820B2/en
Priority to AU2002354210A priority patent/AU2002354210A1/en
Publication of WO2004055713A1 publication Critical patent/WO2004055713A1/ja

Links

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/1486Setting the threshold-width for bar codes to be decoded
    • 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

Definitions

  • the present invention relates to a bad recognizing device, a recognizing method, a program, and the like for recognizing bads by extracting bad regions from input image data.
  • the resolution of the current built-in force camera is lower than that of the image sensor used for the bar code reader, and it is difficult to recognize the bar code with high accuracy.
  • the width of the bar is not constant. This is because the distance between the barcode and the camera changes each time it is entered. With a close-up type scanner, the bar code can always be input in a fixed size, so the width of the par can be determined in advance.However, capture the bar code with a camera held in hand. In such a case, it is not possible to determine a certain bar width in advance.
  • FIG. 19 is a diagram showing the relationship between detection frequency and width. As shown in Fig. 19, the width detection frequency is extracted for the scanning line. As a result, a region having a frequency equal to or higher than a certain threshold value is detected as an effective width. In the example of Fig. 19, intervals 1, 2, and 3 are effective widths. In addition, two of the longest sections of this effective width are selected and used as the bar width.
  • This method can detect two types of widths, “thin” and “thick”, from the two most frequent widths.However, in low-resolution images, the interval between frequency peaks becomes shorter. However, there is a problem that detection is unstable. Also, it cannot handle barcodes with multiple widths. In addition, when a barcode is photographed by a camera, an area other than the barcode, such as a character or a pattern, around the barcode is also included in the input image. Therefore, it is necessary to extract the barcode area from the input image. In JP-A-9-16701 (Fig. 19), a per-code area is extracted on the condition that the bar interval is within a certain threshold. This is effective for systems that can obtain input images relatively stably, such as scanners. However, since the bar code is input while holding the camera by hand, the width of the bar varies widely depending on the distance between the subject and the camera, and it may not be possible to extract the data properly with a fixed threshold. It was.
  • Japanese Patent Application Laid-Open No. 9-224347 discloses a technique for improving the extraction accuracy by examining a barcode-specific pattern when extracting a barcode region. Trying to do so.
  • FIG. 18 is an explanatory diagram of the configuration of a bar code.
  • bar code 1 has bar code specific left guarder 2 (or start tongue). 1), center bar 3 and light guard bar 4 (or end bar).
  • the left guard par 2 is provided on the starting point side (left side) of bar code 1 and is composed of a pattern in which black bars and white bars are alternately arranged. This is a pattern in which the information (module representation) of “101” is set.
  • the center bar 3 is provided at the center position of the bar code 1 and is composed of a pattern in which black pars and white bars are alternately arranged. (Module expression).
  • the light guard bar 4 is provided on the end point side of the bar code 1 and is composed of a pattern in which black bars and white bars are alternately arranged.
  • FIG. 20 is a flowchart showing the flow of a conventional barcode extraction process. First, as described above, a region where the bar interval is within a certain threshold is extracted as a complex region (step 401). The complex area can be called the area where the bar code is supposed to exist.
  • the presence / absence of the center par, light guard pad, and left guard bar is determined from the extracted complex area, and it is determined whether the extracted complex area is a bar code (step 402). ⁇ Step 4 0 4). Then, each character of the bar code is recognized for the area determined to be a bar code (step 405).
  • the pattern of the par-structured module expression is checked based on the extracted bar width and the predetermined bar module width. are doing.
  • the module width is determined in advance depending on the resolution of the scanner.
  • the module width is defined as 4 pixels.
  • the module width is specified in advance. There was a problem that this was not possible.
  • an image input with a low-resolution camera has a bar width of about 2 pixels, and a bar width that uses four types of widths requires a module depending on noise at the time of input. There is no bar whose width is exactly equal to the width, and a strict comparison of the widths sometimes mistakenly recognizes a thick bar as thin, and there was also a problem that it could not be matched correctly.
  • Japanese Patent Application Laid-Open No. Hei 4-263381 discloses a method of comparing the width of a bar at a specified level with the width of an input bar. Judgments that are equal are considered equal if they have a certain width and are within the range. For example, the condition that the width a and the width b are equal is
  • the width of the largest / J / in the image is only about 2 pixels.
  • the 2-pixel width is 2 pixels wide due to an error in input processing, etc.
  • the fluctuation of the width is 50% of the actual width, and the fluctuation is large.
  • the width n is large, four pixels often become five or three pixels.
  • the range of fluctuation is 25% of the actual range. If the widths of all the bars are determined to be the same when comparing the widths of all the bars as described above, it will not be possible to make a correct determination in the case of large fluctuations in the bar width, etc. There was a problem.
  • the problem to be solved by the present invention is to recognize a barcode with higher accuracy than a barcode image captured using a low-resolution image sensor. For this purpose, it is necessary to extract the barcode region with high accuracy from the input image. Also, even if the width of the bar in the input image fluctuates, It is necessary to extract the bar width from the input image without specifying the bar width in advance so that it can be recognized correctly. In addition, by using a low-resolution image sensor, the width of the narrowest bar is about 2 pixels, but even in this case, multiple bars can be accurately displayed without being affected by noise or the like. It is necessary to judge and recognize the width of the image. It is also necessary to be able to handle bar codes with multiple widths.
  • the present invention has been made in view of such a problem, and has provided a barcode recognition device capable of accurately recognizing a barcode even in a low-resolution image captured by a small image sensor built in a mobile terminal. It is intended to provide.
  • the barcode recognition device of the present invention includes: a preprocessing unit that performs preprocessing on an input image; a binarization processing unit that binarizes an input image after preprocessing;
  • the preprocessing means perform histogram conversion.
  • the binarization processing means uses a discriminant analysis method as a method of determining a threshold value in binarization of an image.
  • the labeling means performs labeling by assigning individual numerical names to the input images for each connected pattern.
  • the width of the pixel from the input image labeled by the labeling means is defined by the number of black pixels of the labenole pertaining to the par divided by the height in the vertical direction.
  • the no-code region extracting means extracts the adjacency of the bar, and from the adjacency, the left end of the bar and the right end of the bar. And that there is a number of pars between the left edge of the bar and the right edge of the bar It is desirable to extract the barcode region by matching the value.
  • the adjacency between the bars is that there is a scan line shared by the two bars, that the height difference between the two bars is within a range, and that the distance between the two bars is within a range. When all of and are satisfied, it is determined that they are adjacent to each other, and the range of the difference between the bar heights and the range of the interval between the bars can be adaptively obtained from the reference bar height and width. Desirable.
  • the barcode recognition is performed by using a minimum width of a bar in the barcode region extracted by the barcode region extracting means as a unit width, and By comparing the arrangement of the bar and space width patterns that are an integral multiple of the unit width in the bar code area with the arrangement of the predetermined bar and space width patterns. This is desirable.
  • barcode recognition be repeatedly performed while changing the unit width.
  • the parcode is recognized more accurately than the captured barcode image by the camera used by the small image sensor built into the portable terminal. can do. Further, according to the present invention, the barcode can be recognized even when a low-resolution camera is used, so that the barcode can be read without adding a special barcode reader. it can.
  • a mobile phone includes the barcode recognition device according to the present invention.
  • barcode recognition can be easily performed anywhere, and the barcode recognized by the barcode recognition device can be transmitted immediately. It is possible.
  • the barcode recognition method includes a step of performing preprocessing on an input image, a step of performing binarization on the input image after preprocessing, and a step of performing binarization on the input image after binarization processing. Labeling the barcode, extracting a barcode region from the input image after labeling, and recognizing the barcode from the extracted barcode region. I do.
  • the present invention provides a program that causes a computer to function as a percode recognition device, and a recording medium that records the program. Can also be realized.
  • FIG. 1 is a flowchart showing the flow of barcode recognition processing.
  • FIG. 2 is a diagram illustrating an example of a labeling process.
  • Fig. 3 is a flowchart (first half) showing the flow of the search process for adjacent bars.
  • Fig. 4 is a flowchart (second half) showing the flow of the search process for adjacent bars.
  • FIG. 5 is a flowchart showing the flow of the barcode recognition process.
  • FIG. 6 is a diagram for explaining the space width.
  • FIG. 7 is a diagram for explaining an allowable error rate.
  • FIG. 8 is a diagram for explaining a pattern in which left guard widths are arranged.
  • Fig. 9 is a diagram for explaining the pattern of the left guard and the parallel pattern of the space.
  • Fig. 10 shows the average width of a numerical value. Diagram showing the turn
  • FIG. 11 is a diagram showing a combination of the first force to the fourth force shown in FIG. 10, four times, and a space width.
  • Fig. 12 is a flowchart showing the flow of the process of recognizing numerical values.
  • FIG. 13 is a diagram showing a combination result (prefix unt) of an odd number parity and an even number parity.
  • FIG. 14 is a view showing a parallel pattern of a center width.
  • Fig. 15 is a diagram showing the center pattern of the center
  • Fig. 16 is an illustration of the configuration of a camera-equipped mobile phone.
  • FIG. 17 is a diagram showing connection of the mobile phone terminal to the Internet.
  • FIG. 18 is an explanatory diagram of the configuration of the Norcode.
  • FIG. 19 is a diagram showing the relationship between detection frequency and width.
  • Figure 20 is a flowchart showing the flow of the conventional barcode extraction process.
  • FIG. 21 is a diagram for explaining the condition (1) of the adjacent bar.
  • FIG. 22 is a diagram for explaining the condition (2) of the adjacent bar.
  • FIG. 23 is a diagram for explaining the condition (3) of the adjacent bar. BEST MODE FOR CARRYING OUT THE INVENTION
  • the bar adjacency is calculated based on the features of the barcode structure.
  • the connected area of the criterion that satisfies the following conditions is regarded as the adjacent bar, and all connected areas of the image are examined.
  • the number of bars sandwiched between the left end and the right end is counted. If the force point value is a specified number, it is extracted as a bar code area.
  • the unit width that determines the size of the pixel from the pixel connection area is determined.
  • a bar that is an integral multiple of the unit width and a space width notation, and matches the specified barcode pattern with the pattern in the extracted area. Recognize the code
  • a barcode can be recognized with high accuracy even in a low-resolution image captured by a small image sensor built in a portable terminal.
  • FIG. 1 is a flowchart showing a flow of a barcode recognition process.
  • step 2 the image processed in step 1 is binarized.
  • the binarization process stabilizes the differential value calculation of luminance, and improves the contrast for images with low contrast.
  • the binarization threshold is determined from the histogram obtained above, and the image is binarized.
  • a discriminant analysis method may be used as a method of determining the threshold. The discriminant analysis is performed as follows.
  • step 3 a labeling process is performed.
  • a unique label is assigned to all connected black pixels for black pixels (assuming that the pixel value is 1) of the binarized image. It is.
  • the area occupied by connected black pixels is called a connected area.
  • step 4 based on the labeling result, based on the pattern information composed of the height and width of the connected black pixels, the bar code, the connected area (bar) of black pixels, is arranged under predetermined conditions.
  • the area is extracted as a barcode area.
  • step 5 the bar code is recognized by examining the parallel width of the bar and space in the extracted bar code area.
  • the extraction of the barcode region in step 4 is performed by examining the adjacency of each labeled connected region.
  • the connected area that is labeled is called a bar.
  • FIG. 3 and FIG. 4 are flowcharts showing the flow of the search processing of the adjacent bar.
  • Adjacency is determined using information on bar width, height and position. Obtain 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 coordinates of the rectangle surrounding the connection area are set as the position coordinates of the bar.
  • the conditions for adjacency are defined as follows.
  • a bar that satisfies the above conditions and has a position coordinate closest to the position coordinate of the target bar is defined as a bar adjacent to the bar. Adjacent bars may be on the left and right, respectively.
  • Bar width (L) Bar width with label L (bar width)
  • Bar distance (L, L2) Horizontal distance between the bar labeled L and the bar labeled L2
  • Bar height difference (L, L2) Difference between the height of the bar labeled L and the height of the bar labeled L2
  • step 101 first, a label indicating a target bar serving as a search reference is substituted into a variable L. Labels increase in order from the minimum value of the label (LABEL-MIN) to the maximum value of the label (LABEL-MAX).
  • step 102 a label indicating a bar serving as an adjacent trap for the target bar is substituted for a variable L2. Labels increase in order from the minimum label value (LABEL— MIN) to the maximum label value (LABEL _MAX).
  • step 103 when the value of the variable L and the value of the variable L2 are the same, that is, when they indicate the same bar, go to step 116. If not, go to step 104.
  • step 104 the condition shown in the above condition (1) is tested. If condition (1) is satisfied, proceed to step 105. If not, go to steps 1-16.
  • 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.
  • step 106 the condition shown in the condition (2) is tested. If the condition (2) is satisfied, go to step 107. If not, go to steps 1-16.
  • step 107 the horizontal distance between the bar position of the bar indicated by the variable L and the bar position of the bar indicated by the variable L2 is calculated.
  • step 108 the condition shown in the condition (3) is tested. If the condition (2) is satisfied, go to step 109. If not, go to steps 1-16.
  • the condition (3) since the threshold value is a relative value with respect to the bar width, correct judgment can be made even if the bar width of the input image is not constant.
  • step 109 for the bar labeled with the variable L, the force of the bar labeled with the variable 2 is on the right, and whether it is on the left is based on the bar position coordinates. judge. If it is determined to be on the right side, the process proceeds to step 110. If it is determined to be on the left side, the process proceeds to step 113.
  • step 110 the distance between the variable "Right Distance", which stores the minimum distance to the right bar found so far, and the current right bar, is compared. Proceed to step 1 1 1. Otherwise, the bar is not to the right and go to step 116.
  • step 1 1 the value of the variable L 2 is stored, assuming that the bar labeled with the variable L 2 is on the right.
  • step 1 1 and 2 the variable “right distance” is updated.
  • steps 1 and 3 the left Compare the distance between the variable “Left distance”, which stores the minimum distance to one, and the current bar on the left. If the distance is closer, go to step 1 14. If not, the par is not on the left and the player proceeds to step 1 16.
  • step 114 the bar with the label indicated by the variable L2 is assumed to be on the left side, and the value of the variable L2 is stored.
  • step 1 15 the variable “left distance” is updated.
  • step 1 16 the variable L 2 is updated to the next smaller label.
  • step 117 if there is a label that has not been searched for as an adjacent sign by the variable L2, the process proceeds to step 103 and the processing is repeated. When all labels have been searched, go to step 1 18.
  • step 1 18 the variable L is updated to a sequentially larger label.
  • the bar on the right and the bar on the left stored in steps 1 1 1 and 1 14 are determined as the bar on the right and the bar on the left of the bar indicated by the variable L, respectively.
  • step 1 19 if there is a label not searched for by the variable L, the process proceeds to step 102, and the process is repeated. When the search has been completed for all the labels, the process proceeds to step 120 and ends.
  • a par where the bar on the left does not exist is marked as the leftmost bar.
  • the bar on the right side is searched sequentially from the left end bar. Mark the bar where the bar to the right does not exist as the right end par.
  • the number of rules is determined by the bar code standard. For example, in the case of a JAN13 three-digit barcode, the number of bars is 30.
  • Barcode recognition processing is performed on the bars included in the extracted barcode area.
  • FIG. 5 is a flowchart showing the flow of the barcode recognition process.
  • step 201 first, a unit width as a reference for evaluating the width of the bar and space is determined. The minimum bar width in the bar code area is the unit width. The unit width corresponds to the module width of the bar code.
  • step 202 the two leftmost bars are checked against the left guard bar pattern to test whether the bar is a left guard. If it is determined to be a left guard, proceed to step 203. If not, go to steps 2 1 2.
  • step 203 the left 12 digits are recognized for the next 12 bars.
  • step 204 it is determined whether or not recognition of all six digits on the left has been completed normally. If successful, proceed to step 205. If not, go to steps 2-12.
  • step 205 a prefix digit is recognized from a combination of even and odd parities of the left six digits.
  • step 206 it is determined whether the pre-fit digit has been recognized without contradiction. If there is no contradiction, proceed to step 206. If not, go to steps 2 1 2.
  • step 207 the next two bars are checked against the pattern of the center bar to test whether or not the bar is the center bar. If it is determined to be the center bar, proceed to step 208. If not, go to step 2 1 2.
  • step 208 the rightmost six digits are recognized for the following 12 bars.
  • step 209 it is determined whether or not recognition of all six digits on the right has been completed normally. If so, proceed to step 210. If not, go to steps 2-12.
  • step 210 the check digit is tested. If there is no inconsistency in the check digit, go to step 211. If not, go to step 2 1 2.
  • the check digit is a numerical value calculated to check whether there is any error in the reading.
  • the last one of the six digits on the right is the check digit.
  • the check digit is calculated from the 11 digits other than the check digit by the specified calculation method. The calculated result is compared with the read check digit, and if they are equal, there is no conflict. In the example shown in Fig. 18, the check digit is the value 4 at the right end.
  • step 211 the process ends assuming that the recognition was successful.
  • the unit width is increased by one pixel.
  • steps 2 1 and 3 the unit Determine if the increase in width is 3 or less. If it is 3 or less, proceed to step 202 and perform the same recognition process again. If not, go to steps 2 1 4.
  • step 2 14 the processing is terminated assuming that the recognition has failed.
  • the bar and the space width are compared with a predetermined pattern and evaluated.
  • the procedure of the evaluation is described below.
  • FIG. 6 is a diagram for explaining a space width
  • FIG. 7 is a diagram for explaining an allowable error rate.
  • the width of the bar and space is an integral multiple of the unit width, and is evaluated for each magnification.
  • the space width 15 is the width between two adjacent bars 13 and 14, as shown in FIG.
  • the space width 15 is obtained as follows.
  • the number of pixels between the bars is determined for each horizontal scanning line.
  • the average of the number of pixels between the bars in all the scanning lines shared by the par (L) 13 and the bar (L 2) 14 is defined as a space width 15.
  • the bar code pattern is specified by a par or a space with an integer multiple of the reference module width (unit width).
  • the width magnification is 1, 2, 3, -4.
  • the narrowest width is 1 and the widest width is 4.
  • the minimum magnification that satisfies the following conditions is the magnification of the bar (space) width.
  • the condition is that the bar (space) width is within the allowable range of the magnification X unit width error.
  • the allowable error rate is specified for each magnification as shown in Fig. 7.
  • the allowance is given to allow for the effect of missing pixels due to binarization.
  • the unit width of the image is only about 2 pixels.
  • the image of the pixel has chipping of about one pixel or noise of dilation.
  • one-pixel width and three-pixel width are recognized as different widths.
  • the two-pixel width may become one pixel width or three-pixel width due to binarization noise.
  • Fig. 8 is a diagram for clarifying the parallel pattern of the width of the left gauge K.
  • Fig. 9 is a diagram showing the horizontal pattern of the left and right rows of the left gauge. It is a diagram for explaining.
  • the width of the space width notation and the bar of the width of the left guard determined based on the evaluation of the width in the extracted nodal area, and the space width notation Are matched, and if the patterns match, it is assumed that the bar is a bar constituting a valid left guide.
  • FIG. 10 is a diagram showing the definition of the pattern of the average and the width of the space for the numerical values.
  • Fig. 11 is a diagram showing a combination of whether width 1 force to width 4 shown in Fig. 10 is equal to width width and space width, and
  • Fig. 12 is a numerical value recognition process. The flow chart shows the flow of the process.
  • Figure 10 shows the width of the six digits on the left. Turns have odd and even parity.
  • the order of the width shown in FIG. 10 corresponds to the odd number of noises.
  • even parity read the same table from the opposite direction, that is, width 4, width 3, width 2, and width 1.
  • the numerical value 9 is represented by a parallel pattern of three times the width from the left, a unit of space, a unit of space, and a double of space
  • even parity is a number of 1.
  • the pattern of the arrangement of bars and spaces is different between the six digits on the left side and the six digits on the right side of the center bar, so two types of patterns are defined in Fig. 11. ing.
  • the odd parity with the number 6 is represented from left to right by the unit width bar, unit width space, unit width bar, and quadruple space regular pattern (No. 1) 8 Refer to the data character No. 1 on the right side of the figure).
  • step 301 the left 6
  • step 302 the width is evaluated by using the collation patterns specified in FIGS. 10 and 11, and it is checked in order whether or not the patterns in the bar and space arrangements match. In the 6 digits on the left side, the width pattern of odd parity or the width pattern of even parity is also examined sequentially.
  • step 303 when it is determined that the patterns match, the process proceeds to step 304. If not, go to step 307.
  • step 304 the width difference between the actual width obtained from the input image and the specified width pattern is determined. The width difference is the sum of the differences between the corresponding four widths.
  • step 3 05 if the width difference has been found and has been smaller than before, go to step 3 06. Otherwise, go to step 307.
  • step 303 the numerical value corresponding to the pattern is stored as the numerical value of the candidate. At the same time, note the type of odd or even patties.
  • the initial value of the width difference is set to the maximum value.
  • step 307 all the matching patterns shown in FIG.
  • step 308 If the processing has been completed for steps (9) to (9), the process proceeds to step 308. Otherwise, go to step 302 and repeat the process for the next matching pattern.
  • step 308 when the pattern matches the prescribed numerical pattern, the numerical value is regarded as a recognition result, the flow proceeds to step 309, and the processing is ended as success. Otherwise, the recognition is unsuccessful, the process proceeds to step 310, and the process ends.
  • step 205 The recognition of the prefix digit in step 205 is performed as follows.
  • FIG. 13 is a diagram showing a combination result (prefix digits) of the odd parity and the even parity
  • FIG. 14 is a diagram showing an arrangement pattern of the width of the center bar
  • FIG. 15 is a diagram showing an arrangement pattern of bars and spaces of the center bar.
  • step 205 the oddness when all six digits on the left were successfully recognized Recognize prefix digits from records of even parity and even parity.
  • the result of the combination of odd parity and even parity is as shown in Fig. 13 and is searched from the table, and a match is recognized as a prefix digit. If no matching combination is found, the recognition of the prefix digit ends as a failure.
  • the leftmost 6-digit data character 5 is 9 for odd parity, 1 for even parity, 2 for odd parity, 3 for odd parity, and 3 for even parity. 4.
  • Even parity is 5. Since the combination of the liability is 101100, the prefix digit 8 is 4 (shown at the left end of Fig. 18) from Fig. 13.
  • the test for the center bar in step 207 is the same as the test for the left guard. Match turns.
  • the arrangement patterns of the bars and the space width used for the test of the center bar are as shown in FIGS. 14 and 15. .
  • the barcode recognition device of the present invention can be incorporated in a mobile phone.
  • barcode recognition can be easily performed anywhere, and the barcode recognized by the barcode recognition device can be transmitted immediately. It is possible.
  • FIG. 16 is a block diagram when the barcode recognition device of the present invention is incorporated in a camera-equipped mobile phone.
  • the mobile phone with a built-in camera has an antenna 21 for transmitting and receiving radio waves.
  • Radio section 22 for controlling the transmission and reception of wireless communication, key input section 23 for inputting and generating key operation information from the user, display section 24 for displaying text information and image information to the user, outputting audio signals Speaker 25 , microphone 26 for inputting audio signal from user, memory 27 for storing received or input character information, image information, and audio signal, inputting target image information
  • It comprises a camera 28 and a control unit 29 which has a built-in barcode recognition device and controls each unit.
  • the control unit 29 Initializes the camera 28 based on the settings from the key input section, and starts importing image information (bar code).
  • the image information (barcode) captured by the camera 28 is transferred to the storage memory 27 via the control unit 29.
  • the control unit 29 transfers the image information (barcode) stored in the storage memory 27 to the display unit 24, and displays the image information (barcode). Also, by continuously capturing and displaying image information (barcode), the user can check the camera image as a moving image.
  • the image information stored in the memory 27
  • the (bar code) is transferred to the control unit 29 having a bar code recognition device, and bar code recognition is performed in the bar code recognition processing described in the present 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.
  • the user operates the key input unit 23 to select the connection to the wireless or the Internet.
  • the control unit 29 instructs the wireless unit 22 to connect to the wireless or Internet based on the setting from the key input unit.
  • the wireless unit 22 starts connection to wireless or the Internet based on an instruction from the control unit 29.
  • the user operates the key input section 23 to select the transmission of the per-code data stored in the storage memory 27.
  • the control unit 29 transfers the bar code data stored in the storage memory 27 to the wireless unit 22 based on the setting from the key input unit 23, and instructs transmission.
  • the radio unit 22 transmits the transferred bar code data to the radio or the Internet based on the instruction from the control unit 29.
  • the bar code data transmitted from the wireless unit 22 is transmitted to the URL data server 32 via the wireless network 33.
  • the URL data server 32 controls the operation of the wireless network 33 of the mobile phone terminal 34 and the gateway of the Internet 31.
  • the URL data server 32 transmits the received barcode data and the URL database. Search the destination URL, connect to the Internet 31, and transfer the barcode data to the destination. The result of the transfer completion is transmitted to the mobile terminal 34.
  • the present invention can be realized as a program that causes a computer to function as a barcode recognition device, and also as a recording medium that records the program.
  • the e-mail communication device of the present invention is also realized by a program for causing the e-mail communication device to function. This program may be stored in a recording medium readable by a computer.
  • the recording medium may be a ROM code built-in barcode recognition itself, a S program medium, or a CD-code recognition device.
  • It may be a program medium such as a CD-ROM that can be H5C-ejected by connecting to a program-equipment device such as a ROM drive and inserting a recording medium there. Even in the case of a deviation, the stored program may be configured to be accessed and executed by the CPU, the program is output, and the program output by the SJE is not shown. The program may be downloaded to the program storage area and the program may be executed. This download program is stored in the main unit in advance.
  • the program medium is a self-recording medium which is configured to be separable from the body, and is a tape system such as a magnetic tape cassette tape, a floppy disk drive. Magnetic discs such as discs and CD-ROM / MO / MD
  • VD IC card including memory card
  • Card system such as optical card, or mask ROM, EPROM, E
  • Et al of the passage 1 word network Bok work force Lapu port grams via the transmission unit ⁇ Pi receiving portions of the charging machine comprises a node on co one ⁇ BB3 ⁇ 4 3 ⁇ 4 ia in earthenware pots by Dakunro sul, fluidly pro
  • the download program may be stored in the main unit of the apparatus in advance.
  • the content stored in the recording medium is not limited to a program, and may be data installed from another recording medium.
  • the bar code can be recognized with higher accuracy than the bar code image taken. Further, according to the present invention, even when a low-resolution camera is used, the barcode can be recognized. Therefore, the barcode can be recognized without adding a special barcode reader. Will be able to read.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Toxicology (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Character Input (AREA)
  • Image Analysis (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Image Processing (AREA)

Description

明 細 書
バ ド認識装置
技術分野
本発明は、 入力 した画像データからバ ド領域を抽出 してバ ドを認識するバ ド認識装置、認識方法、プロ グラム等に関する。
背景技術
近年、小型で、低消費電力のイ メージセンサが開発されたこ と に伴い、 携帯電話機などの携帯型装置にカメ ラを内蔵する こ とが可能と な り 、 内 蔵カメ ラによ り撮影した画像を、 電子メールで即座に送信できる こ とが 可能となっている。これらの内蔵カメ ラは、小型である こ とが優先され、 一般的なデジタル力メ ラ り も解像度が低い。
また 、 近年の携帯 i BO機は 、 ィ ンターネ ッ トに接続する機能を有して いる。 イ ンタ ネッ トに接 するには U R Lをキーから入力する必要 があ り 、 携帯 話機のキ では、 長い U R Lを打ち込むために手間がか かっていた。 そこで u R Lを一意の番号で管理し、 その番号に対応す る コー ドを印刷した のを コ ドリ ーダで読み込むこ と によ り
U R L の入力の手間を省さ ユーザの使い勝手をよ く する試みがなされ ている 。 このよ う な装置では 、 別途 コー ドリ ーダを携帯電話機に接 続する必要がある
そこで、 力メ ラを内蔵した携帯装置では、 その内蔵カメ ラによ り入力 したバ • ~コ1 ~ K画像に対してパ ' ~コ ドを認識できれば、 別途バーコ ドリ ーダを用思しなく ても このよ う なサービスを利用する こ とができ
■o
しかし、 現在の内蔵力メ ラの解像度は、 バーコー ドリ ーダに用いられ るィメージセンサよ り あ解像度が低 < 、 高精度でバーコー ドを認識する こ とが困難であつた
また 、 バ—コ ドの認識を困難にする原因 と して、 入力画像中に撮影 されるバーの幅が一定ではないとい う こ とがある。 これは、 バーコー ド とカメ ラの距離関係は、 入力するたびに変わって く る為である。 接写す るタイプのスキャナでは、 常にバーコ一 ドを一定の大き さで入力でき る ので、 パーの幅をあらかじめ決めておく こ とができるが、 手で保持した カメ ラでバーコ一 ドを撮影する場合は、 一定のバー幅をあらかじめ決め ておく こ とはできない。
バーの幅をイ メージスキャナによ り入力されたバーコ一 ド画像から決 定し、 バーコー ドを認識する手法が提案されている。 例えば、 特開平 6 - 3 2 5 1 9 7号公報では、 走査線ごと に画素の幅の度数を計数する こ と によ りバーの幅を決定している。幅を決定する原理について説明する。 第 1 9図は、 検出頻度と幅との関係を示す図である。 第 1 9 図に示す よ う に、 走査線に対して幅の検出頻度を抽出する。 これによ り 、 ある閾 値以上の頻度の領域を有効な幅と して検出する。 第 1 9 図の例では、 区 間 1 , 2 , 3 が有効な幅である。 さ らに、 この有効な幅の区間の長いも の 2つを選択し、 バーの幅と している。 この手法では、 頻度の多い上位 2つの幅から、「細い」、「太い」の 2種類の幅を検出する こ とができ るが、 低解像度の画像では、 頻度のピークの間隔が短く な り 、 検出が不安定と いう問題がある。 また、 複数の幅を持つバーコー ドには対応できない。 また、 カメ ラによ りバーコー ドを撮影した場合、 バーコー ド周辺にあ るバーコー ド以外の文字や模様などの領域も入力画像に含まれる。 した がって、 入力画像からバーコー ド領域を抽出する必要がある。 特開平 9 — 1 6 7 0 1 号公報 (第 1 9 図) では、 バーの間隔がある閾値以内であ るこ と を条件と して、 パーコー ド領域を抽出している。 スキャナのよ う に比較的安定して、 入力画像を得られるシステムについては、 有効であ る。 しかし、 カメ ラを手で保持しながらバーコー ドを入力するために、 バーの幅は、 被写体とカメ ラの距離によるばらつきが多く 、 固定の閾値 では、 う ま く 抽出できないこ とがあ り 問題となっていた。
このよ う な問題を解決するために、特開平 9 一 2 2 4 3 7号公報では、 バーコ一 ド領域を抽出する時に、 バーコ一ド特有のパターンを調べる こ とで抽出精度を改善しよ う と している。
第 1 8 図は、 バーコー ドの構成の説明図である。 図示のよ う に、 バー コー ド 1 にはバ一 コー ド特有の レフ トガー ドパー 2 (又は、 スター トノ 一)、 センターバー 3 、 ライ トガー ドバー 4 (又は、 エン ドバー) がある。 この場合、 レフ トガー ドパー 2 はバーコ一 ド 1 の開始点側 (左側) に設 けてあり 、 黒バーと 白バ一が交互に並んだパターンで構成され、 バーコ ー ド 1 の開始情報と して 「 1 0 1 」 の情報 (モジュール表現) を設定し たパターンである。 センターバー 3 はバーコー ド 1 の中央位置に設けて あ り 、 黒パーと 白バーが交互に並んだパターンで構成され、 バーコー ド 1 の中心情報と して 「 0 1 0 1 0 」 の情報 (モジュール表現) を設定し たパターンである。 ライ トガー ドバー 4 はバーコー ド 1 の終了点側に設 けてあ り 、 黒バーと 白バーが交互に並んだパターンで構成され、 バーコ ー ド 1 の終了情報と して 「 1 0 1 」 の情報 (モジュール表現) を設定し たパターンである.。
レフ トガー ドバー 2 とセンターバー 3 との間に 6桁の左側データキヤ ラク タ 5 が、 センターバー 3 と ライ トガ一 ドバー 4 と の間に 6桁の右側 データキャラク タ 6 とチェ ックデジッ ト 7が配置されている。 なお、 バ ーコー ド 1 下の左端の数値はプレフィ ックスデジッ ト 8 を表わしている。 第 2 0 図は、 従来のバーコー ド抽出の処理の流れを示すフ ローチヤ一 トである。 まず、 前記のよ う にバーの間隔がある閾値以内である と ころ を複雑領域と して抽出する (ステップ 4 0 1 )。 複雑領域は、 バーコー ド が存在するであろ う と推測される領域とい う こ とがき る。
次に、 抽出された複雑領域から前記のセンターパー、 ライ トガー ドパ 一、 レフ トガー ドバーの有無を判定し、 抽出された複雑領域がバーコ一 ドであるかどうかを判定する (ステップ 4 0 2〜ステップ 4 0 4 )。 そし て、 バーコー ドである と判定された領域に対し、 バーコー ドの各キャラ ク タ を認識する (ステップ 4 0 5 )。
こ こで、 センターバー、 ライ トガー ドバー、 レフ トガー ドバーの有無 を判定する際に、 抽出したバーの幅と あらかじめ定め られたバーのモジ ユール幅を基準にしてパー構造のモジュール表現のパターンを照合して いる。 モジュール幅は、 スキャナの解像度によ り 、 あ らかじめ定められ る。
例えば、 2 0 0 d p i の解像度を有するスキャナで帳票を読み取った 場合は、 1 モジュール当た り 4画素で表現される ので、モジュール幅は、 4画素と定められる。 しかし、 前記したよ う に、 カメ ラを手で保持しながらバー コー ドを入 力するために、 バーの幅は、 被写体と カメ ラの距離によるばらつきが多 いので、 モジュール幅をあらかじめ特定する こ とはできないとい う 問題 があった。
また、 低解像度のカメ ラで入力 した画像は、 バーの幅が 2画素程度と な り 、 4種類の幅を用いる よ う なバ一 ー ドでは、 入力時のノイ ズなど によ り 、 モジュール幅と完全に等しい幅のバーは存在せず、 厳密に幅を 比較するだけでは、 太いバーを細いと誤認識するこ とがあ り 、 正しく 照 合できないという 問題もあった。
この問題を解決するために、 特開平 4 一 2 6 3 3 8 1 号公報では、 規 定されてレヽるノ ターンにあるノ 一の幅と入力 されたバーの幅を比較する 時、 バー幅が等しいという判定は、 ある幅をもたせてその範囲内にある と きに等しいとする。 例えば、 ノ ー幅 a とバー幅 b が等しい条件は、
1 . 2 5 a ≥ b ≥ 0 . 7 5 a
となる。 しかし、 '低解像度のデジタル力メ ラで、 バーコー ドを撮影した' 場合、 その画像におけるノ 一の最 /Jヽの幅は、 2画素程度しかない。 幅 2 画素は、 実際には、 入力処理の誤差などによ り 2画素幅が、 1 画素幅や
3画素幅になるこ とがある。 この場合 、 幅の変動は、 実際の幅の 5 0 % と な り 、 変動が大きい。 幅が太い場 n は 、 4画素が、 5画素、 3画素に なる場合が多い。 この場合は、 変動の幅は、 実際の幅に対して、 2 5 % となる。 前記のよ う にすベてのノく ーの幅を比較する際に、 幅の範囲をす ベて同一に決定してしま う と、バー幅に対する変動が大きい等の場合に、 正しく判定できないとい う問題があった。
発明の開示
本発明が解決しょ う とする課題は、 低解像度のイメージセンサを用い て撮影したバー コー ド画像よ り 高精度にバーコー ドを認識する こ とであ る。 このためには、 入力 した画像よ り 、 精度よ く バーコー ド領域を抽出 する こ とが必要である。 また、 入力画像中のバーの幅が変動していても 正しく認識でき る よ う に、 あ らかじめバーの幅を指定せず、 入力画像中 からバーの幅を取り 出すこ と が必要である。 また、 低解像度のイ メ ージ センサを用いるこ と によ り 、 最も幅の狭いバーの幅は 2画素程度になる が、 この時でも、 ノイズなどの影響を受けずに正確に複数のパーの幅を 判定し認識するこ とが必要である。 また、 複数の幅を持つバーコー ドで も対応できる よ う にするこ と も必要である。
本発明はかかる問題点に鑑みてなされたも のであ り 、 携帯端末に内蔵 される小型のイメ ージセンサで撮影された低解像度の画像においても、 バーコー ドを精度よ く 認識できるバーコー ド認識装置を提供する こ と を 目的とする。
本発明のバーコ一ド認識装置は、 入力画像に対して前処理を行う前処 理手段と、前処理後の入力画像に対して 2値化を行う 2値化処理手段と、
2値化処理後の入力画像に対してフベノレ付けを行つ ラベル付け手段と、 ラベル付け後の入力画像から ノ 一コ一ド領域を抽出するノ ■ ~コ 1 ~ ド領域 抽出手段と、 抽出されたノ ' ~~コ一ド領域から ノ " ~コ · ~ ドを ρδ るノくー コ一ド認識手段と、 'を具備するこ と を特徴とする。
また、 本発明のバ • ~~コ一 r、 i ¾
n 装 において、 前処理手段は、 ヒ ス ト グラム変換を行う こ とが望ま しい
また、 2値化処理手段は 、 画像の 2値化における閾値の決定方法と し て、 判別分析法を用いる こ とが望ま しい。
本発明のバーコ一ド認識装置に いて、 ラベル付け手段は、 入力画像 に対して 1 つ 1 つの連結されたパターン毎に個別の数値名を振る こ と に よ り ラベル付けを行う こ とが望ま しい。
また、 ラベル付け手段によ り ラベル付けされた入力画像よ り 、 ノ 一の 幅を、 当該パーに係るラベノレの黒画素数 Ζ垂直方向の高さで定義するこ とが望ま しい。
また、 バ一又はスぺ · ~ス の幅を照合する と きに、 幅に じた幅の許容 範囲を設定するこ とが望ま しい。
また、 本発明のバ • ~コ ト認 α 装 iiにおレヽて、 ノ ーコ一ド領域抽出手 段は、 バーの隣接関係を抽出し、 その隣接関係からバーの左端とノ 一の 右端と を決定し、 バ一の左端とバ一の右端との間のパーの数がある規定 値と一致するこ とによ りバーコー ド領域を抽出する こ とが望ま しい。 また、 バーの隣接関係は、 2つのバーが共有する走査線がある こ と、 2つのバーの高さの差がある範囲内であるこ と、 2つのバーの間隔があ る範囲内である こ と をすベて満たす場合に隣接している と判定し、 バー の高さの差の範囲及びバーの間隔の範囲が、 基準と なるバーの高さ と幅 から適応的に求められるこ と が望ま しい。
また、 本発明のバーコー ド認識装置において、 バーコー ド認識は、 バ ーコー ド領域抽出手段によ り抽出されたバーコ一 ド領域内のバーで最小 の幅を単位幅と して用い、 前記抽出されたバ一コー ド領域における この 単位幅の整数倍のバー及ぴスペースの幅のパターンの並びと予め規定さ れたバー及びスペースの幅のパターンの並びと を照合する こ と によ り行 う こ とが望ま しい。
また、 バーコー ド認識は、 単位幅を変化させて繰り返し行う こ とが望 ま しい。
本発明のバーコー ド認識装置によれば、 携帯端末に内蔵される よ う な 小型のイメージセンサで用いたカメ ラによ り 、 撮影したバーコ一 ド画像 よ り 、 精度よ く 、 パーコー ドを認識する こ とができ る。 また、 本発明に よれば、 低解像度のカメ ラを用いた場合にもバーコ一 ドを認識するこ と ができるため、 特別にバーコー ドリ ーダを付加しなく と もバーコー ドを 読み取るこ とができ る。
また、 本発明に係る携帯電話機は、 本発明のバーコー ド認識装置を備 えたこ と を特徴とする。 携帯電話機にバーコー ド認識装置を組み込むこ と によ り 、どこでも手軽にバーコ一 ド認識ができ るよ う にな り 、さ らに、 バーコ一 ド認識装置で認識したバーコ一 ドを即座に送信可能である。 また、 本発明に係るバーコー ド認識方法は、 入力画像に対して前処理 を行う 工程と、 前処理後の入力画像に対して 2値化を行う 工程と、 2値 化処理後の入力画像に対してラベル付けを行う工程と、 ラベル付け後の 入力画像からバーコ一 ド領域を抽出する工程と、 抽出されたバーコ一 ド 領域からバーコ一 ドを認識する工程と、 を有する こ と を特徴とする。 また、 本発明は、 コ ンピュータをパーコー ド認識装置と して機能させ るプロ グラム と して、 また、 当該プロ グラムを記録した記録媒体と して も実現できる。
図面の簡単な説明
第 1 図は、 バーコ一 ド認識の処理の流れを示すフ ローチヤ一 トである。 第 2図は、 ラベル付け処理の例を示す図である。
第 3 図は、 隣接するバーの探索処理の流れを示すフローチヤ一 ト (前半) である。
第 4 図は、 隣接するバーの探索処理の流れを示すフローチヤ一 ト (後半) である。
第 5 図は、 バーコ一 ド認識の処理の流れを示すフローチヤ一 トである。 第 6 図は、 スペース幅を説明するための図である。
第 7 図は、 許容誤差率を説明するための図である。
第 8 図は、レフ トガー ドの幅の並びパターンを説明するための図である。 第 9 図は、 レフ トガー ドのパ一、 スペースの並ぴノ ターンを説明するた めの図である
第 1 0 図は、 数値に対する幅の並ぴのノヽ。ター ンを示す図でめる
第 1 1 図は、 第 1 0 図に示す Ψ畐 1 力 ら Ψ畐 4カ 、 ノ 一幅力 、 スペース幅で あるかの組み合わせを示す図である。
第 1 2図は、 数値の認識の処理の流れを示すフ ローチャー 卜
第 1 3 図は、 奇数ノ リ ティ と偶数パ リ ティ の組み合わせ結果 (プレフィ ックスアンッ ト) を示す図である。
第 1 4図は、 センターノ 一の幅の並ぴパターンを示 図である
第 1 5 図は、 センターノ ■ ~のノ 一、 スペース の並ぴノ ターンを示す図で める
第 1 6 図は、 カメ ラ内蔵型携帯電話機の構成の説明図である
第 1 7図は、 携帯電話端末のイ ンターネ ッ トへの接続を示す図である。 第 1 8 図は、 ノ ーコー ドの構成の説明図である。
第 1 9 図は、 検出頻度と幅との関係を示す図である。
第 2 0 図は、 従来のバーコ一 ド抽出の処理の流れを示すフ P一チャー ト である
第 2 1 図は、 隣接バーの条件 ( 1 ) を説明するための図であ o。
第 2 2 図は、 隣接バーの条件 ( 2 ) を説明するための図であ
第 2 3 図は、 隣接バーの条件 ( 3 ) を説明するための図であ ■ 。 発明を実施するための最良の形態
本発明においては、 入力された画像に対し、 ヒ ス ト グラム変換の刖処 理を実施した後に、 2値化を行い、 さ らにラベル付け処理を行う 。 ラベ ル付けされた画像よ り 、 バーコー ドの構造の特徴に基づき、 バ―の隣接 関係を計算する。 隣接関係は、 1 例と して、 以下の条件を満た している バ一候捕の連結領域を隣接バ一と して、 画像のすべての連結領域につレヽ て調べる。
( 1 ) 第 2 1 図に示すよ う に、 2 つのノ 一に共有される水平走 9 が 存在する。 ( 2 ) 第 2 2図に示すよ う に、 隣り合 n ノく一高の差がある範囲 内である。 こ こでは、 バー高の 2 0 %以内である と とする。
( 3 ) 第 2 3 図に示すよ う に、 位置座標の X方向 差がめ Ό範囲内であ る。 ここでは、 バー幅の 6倍以内である と とす
次に、 左端と右端に挟まれてい バ一の数を力 ン ト し 力 ゥン ト値 が規定数であれば、 バーコー ド領 と して抽出す 抽出 れたノく 一 ド領域內の黒画素の連結領域の からパ のモジ ' ~~ノレ と な る単位幅を決定する。
単位幅の整数倍のバー及びスぺースの幅 ノ タ一ンの並びで、 規定さ れているバーコードパターンと抽出された ド領域に おけるパタ 一ンと を照合するこ とによ り バーコードを認識する は ノ
ドの レフ 卜ガー ドのパターンを最初 照合し 成功 た ら順次、 左側 6 析のパターン、 プレフィ ッ ク スデジ 卜、 セ タ 右側 6桁のパ ターンと照合を行う。 前記のパタ の照ム 際に バ一及びスぺ' ~ スの に応じて、 すなわち倍率ごと に許容 を設 る と によ り 、 低 解像度の画像中でのノイズなどの影響を軽 る。
本発明によれば、 携帯端末に内蔵される小型のィ メージセンサで撮影 された低解像度の画像においても、 バ一コー ドを精度よ く 認識する こ と ができる。
以下、 本発明の実施の形態について 付図面を参照して詳細に説明 する。
第 1 図は 、バーコ一 ド認識の処理の流れを示すフ ローチヤ一 トである。 第 1 図において、 ステップ 1 では、 入力画像に対し、 前処理と して、 ヒス トグラム変換を行う。 入力画像の輝度の最小値を Y i と し、 最大値 を Y j とする と輝度 Yに対する変換後の輝度 Y ' は、 下記式 ( 1 ) で求 まる。 ' = -^-(7 -7,)
Yj-Yi 1 '式 (υ まず、 輝度 Υ ' の微分値を求め、 微分値が閾値以上の画素をエッジ部 と し、 このエッジ部についての輝度のヒ ス ト グラムを作成する。
ステップ 2 では、 ステップ 1 の処理画像に対して、 2値化を行 う。 2 値化処理で輝度の微分値計算を安定させ、 コン ト ラス トの低い画像に対 し、 コ ン ト ラス ト を向上する。
上記で求めたヒ ス トグラムから 2値化閾値を決定し、 画像の 2値化を 行う。 閾値の決定方法は、 例えば、 判別分析法を用いればよい。 判別分 析法は、 以下のよ う にして行う。
輝度の範囲が 「 0から D」 である画像を閾値 t で 2値化したと き、 輝 度が 「 0〜 t 一 1 J の画素の平均輝度を f ()、 輝度が 「 t から D」 の画素 の平均輝度を f 画像全体の平均輝度を f 、 輝度 k をもつ画素の数を n k とすれば、 クラス間分散 σ B 2は下記式 ( 2 ) と な り 、 ク ラス内分散ひ !2 は下記式 ( 3 ) と なる。
· . ,.式 (2)
Figure imgf000011_0001
び ( ^2 · · ,式 (3)
2 このと きの分散比は下記式 ( 4 ) に示すよ う になるので、 この F ( t を最大にする t を閾値とする。
Figure imgf000012_0001
式 (4 )
ステップ 3 では、 ラベル付け処理を行う。 ラベル付け処理は、 第 2 図 に示すよ う に、 2値化後の画像の黒画素 (画素値が 1 とする) に対し、 連結しているすべての黒画素に一意のラベルをつける こ とである。 連結 している黒画素が占める領域を連結領域という。 ラベル付けの方法は、 いろいろあるが一例と して、 以下のよ う な方法がある。
( 1 ) 画像上を左上から右下に向けて走査し、 画素値が 1 であ り 、 かつ ラベルが付けられていない画素 Ρ を見つけ、 新しいラベルを付ける。
( 2 ) 画素 Ρに対して、 画像内の連結しているすべての画素に同じラベ ルをつける (図中 1 0 〜 1 2 はラベルである)。
( 3 ) ( 1 )に戻り 、まだラベルの付けられていない画素が見つかった ら、 新しいラベルを付けて ( 2 ) の処理を行う。
( 4 ) 画像全体の走査が終わったと き、 処理を終了する。
ステップ 4では、 ラベル付け結果よ り 、 連結黒画素の高さ、 幅から構 成されるパターン情報よ り 、 バーコー ドである、 黒画素の連結領域 (バ 一) が所定の条件下に並んだ領域をバーコ一 ド領域と して抽出する。 ステップ 5 では、 抽出されたバー コ一ド領域のバーとスペース の幅の 並ぴを調べ、 バー コー ドを認識する。
ステップ 4 のバーコー ド領域の抽出は、 ラベル付けされた、 各連結領 域の隣接関係を調べるこ と によ り 、 実行される。 以降、 ラベル付けされ て連結領域をバーと呼ぶ。
第 3図、 第 4図は、 隣接するバーの探索処理の流れを示すフローチヤ 一トである。
隣接関係は、 バーの幅と高さおよび位置の情報を用いて行う。 次のよ う にバー幅、 バー高を求める。 バー高 : 連結領域を囲む矩形の高さ
バー幅 : 連結領域の面積/バー高
連結領域を囲む矩形の左上の座標をそのバーの位置座標とする。
隣接の条件を 1 例と して、 次のよ う に定める。
( 1 ) 2つのバーに共有される水平走査線が存在する。
( 2 ) 隣り合 うバー高の差は、 バー高の 2 0 %以内である。
( 3 ) 位置座標の X方向の差は、 バー幅 6倍以内である。
上記の条件を満た し、 対象となるバーの位置座標に一番近い位置座標 をもつバーをそのバーの隣接バーとする。 隣接バーは、 左側と右側にそ れぞれ存在する可能性がある。
全てのバーに対して隣接関係が求まったら、 次の手順でバーコ一 ド領 域であるかど う かを検査する。
第 3 図、第 4図によ り 隣接バーの探索処理の流れを説明する。第 3図、 第 4図において、 以下のよ う に定義する。
バー ( L ) : ラベル Lがつけられた連結領域 (バー)
バー高 ( L ) : ラベル Lがつけられたバーの高さ (パー高)
バー幅 ( L ) : ラベル Lがつけられたバーの幅 (バー幅)
バー位置— X ( L ) : ラベル Lがつけられたバーの位置座標の X座標
MAX— LABEL : ラベルの最大値
MIN— LABEL: ラベルの最小値
左距離 : バーの左側に存在するバーの水平距離の最小値
右距離 : バーの右側に存在するバーの水平距離の最小値
バー距離 ( L, L2) : ラベル Lがつけられたノ 一と ラベル L 2がつけら れたバーの水平距離
バー高差 ( L, L2 ) : ラベル Lがつけられたバーと ラベル L 2がつけら れたバーの高さの差
ステップ 1 0 1 では、 まず、 探索の基準と なる着目バーを示すラベル を変数 Lに代入する。 ラベルは、 ラベルの最小値 ( L A B E L— M I N ) から、 ラベルの最大値 ( L A B E L— M A X ) へと順に増加する。
ステップ 1 0 2では、 着目バーに対する隣接候捕となるバーを示すラ ベルを変数 L 2 に代入する。 ラベルは、 ラベルの最小値 ( L A B E L— M I N ) から、 ラベルの最大値( L A B E L _M A X ) へと順に増加する。 ステ ップ 1 0 3 では、 変数 L と変数 L 2 の値が同 じ、 つま り 同 じバー を示している と きは、 ステ ップ 1 1 6 に行く 。 そ う でなければ、 ステツ プ 1 0 4 に進む。
ステップ 1 0 4では、 前記の条件 ( 1 ) に示す条件をテス トする。 条 件 ( 1 ) を満た していれば、 ステ ップ 1 0 5 に進む。 満た していなけれ ば、 ステップ 1 1 6 に進む。
ステップ 1 0 5 では、 変数 Lで示されるラベルのついているバーのバ 一高と変数 L 2 で示される ラベルのついているバーのバー高差を計算す る。
ステップ 1 0 6 では、 前記の条件 ( 2 ) に示す条件をテス トする。 条 件 ( 2 ) を満たしていれば、 ステップ 1 0 7 に進む。 満たしていなけれ ば、 ステップ 1 1 6 に進む。
ステップ 1 0 7では、 変数 Lで示されるラベルのついているバーのバ 一位置と変数 L 2で示されるラベルのついているバー位置の水平方向の 距離を計算する。
ステップ 1 0 8では、 前記の条件 ( 3 ) に示す条件をテス トする。 条 件 ( 2 ) を満たしていれば、 ステップ 1 0 9 に進む。 満たしていなけれ ば、 ステップ 1 1 6 に進む。 条件 ( 3 ) は、 バーの幅に対する相対値を 閾値と しているので、 入力画像のバーの幅が一定でなく ても正しく 判定 ができる。
ステップ 1 0 9 では、 変数 Lで示されるラベルのついているバーに対 して、 変数し 2で示されるラベルのついているバーが右側にあるの力 、 左側にあるのかをバー位置座標を基準に判定する。 右側にある と判定さ れた場合は、 ステップ 1 1 0 に、 左側にある と判定された場合は、 ステ ップ 1 1 3 にそれぞれ進む。
ステップ 1 1 0では、 現在までに見つかった右側のバーと の最小距離 を保存してある変数 「右距離」 と現在の右側のバーと の距離を比較し、 よ り 距離が近ければ、 ステ ップ 1 1 1 に進む。 そ う でなければ、 このバ 一は、 右隣ではないと して、 ステップ 1 1 6 に進む。
ステップ 1 1 1 では、 変数 L 2 で示されるラベルのついているバーが 右隣である と し、変数 L 2 の値を記憶する。ステップ 1 1 2 では、変数「右 距離」を更新する。 ステップ 1 1 3 では、 現在までに見つかった左側のバ 一との最小距離を保存してある変数 「左距離」 と現在の左側のバーと の 距離を比較し、 よ り 距離が近ければステ ップ 1 1 4 に進む。 そ う でなけ れば、 このパーは、 左瞵ではないと して、 ステ ップ 1 1 6 に進む。
ステップ 1 1 4 では、 変数 L 2 で示される ラベルのついているバーが 左隣である と し、 変数 L 2 の値を記憶する。 ステ ップ 1 1 5では、 変数 「左距離」 を更新する。 ステ ップ 1 1 6 では、 変数 L 2 を次に小さいラ ベルへと更新する。
ステップ 1 1 7 では、 変数 L 2 によ り 隣接候捕と して探索されていな いラベルがあれば、 ステップ 1 0 3 に進み、 処理を繰り 返す。 全てのラ ベルについて探索が終わったら、 ステ ップ 1 1 8 に進む。
ステップ 1 1 8 では、 変数 Lを順次大きいラベルへと更新する。 この と き、 ステップ 1 1 1 および 1 1 4 で記憶された右隣バー、 左隣バーを 変数 Lで示されるバーの右隣パー、 左隣バーと してそれぞれ確定する。 ステップ 1 1 9 では、変数 Lによ り探索されていないラベルがあれば、 ステップ 1 0 2 に進み、 処理を繰り返す。 全てのラベルについて探索が 終わった ら、 ステップ 1 2 0 に進み、 処理を終了する。
以上のよ う にして、 隣接関係が求まったら次に示す手順にて、 バーコ 一 ド領域であるかどうかの判定を行う。
まず、 左隣のバーが存在しないパーを左端バーと して、 マークする。 次に、 左端バーから順次、 右隣のバーを探索する。 右隣のバーが存在し ないバーを右端パーと して、 マークする。
左端バーから、 右端バーまでのバーの数をカ ウ ン ト し、 バーの数が規 定の数であれば、 左端バーから右端パーまでのバーと これらのパー間の スペースが在る領域をバーコー ド領域とする。 規定の数は、 バーコー ド の規格によ り 、 決まる。 例えば J A N 1 3桁のバーコ一 ドであれば、 バ —の数は 3 0 と なる。
抽出されたバーコ一 ド領域に含まれるバーに対して、 バーコ一 ド認識 の処理を行う。
第 5図は、バーコ一 ド認識の処理の流れを示すフローチヤ一 トである。 ステップ 2 0 1 では、 まず、 バーおょぴスペースの幅を評価する基準 となる単位幅を決定する。 バーコー ド領域内のバー幅で、 最小のものを 単位幅とする。 単位幅は、 バーコー ドのモジユール幅に相当する。 ステップ 2 0 2 では、 左端の 2本のバーを対象にレフ トガー ドバーの パターンと照合し、 レフ トガー ドであるかど う かテス トする。 レフ トガ ー ドである と判定されたら、 ステ ップ 2 0 3 に進む。 そ う でなければ、 ステップ 2 1 2 に進む。
ステップ 2 0 3 では、 次の 1 2本のバーに対して、 左側 6桁の数値を 認識する。 ステップ 2 0 4 では、 左側の 6桁の認識がすべて正常に完了 したか判定する。 正常に完了 していた らステ ップ 2 0 5 に進む。 そ う で なければ、 ステップ 2 1 2 に進む。
ステップ 2 0 5 では、 左側 6桁の偶数、 奇数パリ ティ の組み合わせか ら、 プレフィ ッ ク スデジッ ト を認識する。 ステ ップ 2 0 6 では、 プレフ イ ツタ スデジッ トが矛盾なく認識できたかど う か判定する。 矛盾なく認 識できていれば、 ステップ 2 0 6 に進む。 そ う でなければ、 ステップ 2 1 2 に進む。
ステップ 2 0 7では、 次の 2本のバーに対して、 センターバーのパタ ーンと照合し、 センターバーであるかどう かテス トする。 センターバー である と判定されたら、 ステ ップ 2 0 8 に進む。 そ うでなければ、 ステ ップ 2 1 2 に進む。
ステップ 2 0 8 では、 次の 1 2本のバ一に対して、 右側 6桁の数値を 認識する。 ステップ 2 0 9 では、 右側の 6桁の認識がすべて正常に完了 したか判定する。 正常に完了 していたらステップ 2 1 0 に進む。 そ う で なければ、 ステップ 2 1 2 に進む。
ステップ 2 1 0では、 チェ ックデジッ トのテス トを行う。 チェ ックデ ジッ トに矛盾がなければ、 ステップ 2 1 1 に進む。 そ う でなければ、 ス テ ツプ 2 1 2 に進む。
なお、 チェ ックデジッ ト と は、 読み取り に誤り がないかをチェ ックす るために算出された数値で、 右側 6桁の数値の う ち最後の 1桁がチェ ッ クデジッ ト となっている。 チェ ックデジッ ト以外の 1 1桁よ り規定の算 出方法によ り チ- ックデジッ トを算出する。 その算出結果と読み取った チェックデジッ トを照合し、 等しければ矛盾がないとする。 第 1 8 図の 例ではチェックデジッ トは右端の数値 4 である。
ステップ 2 1 1 では、 認識が成功したと して処理を終了する。 ステ ツ プ 2 1 2では、 単位幅を 1画素増加させる。 ステ ップ 2 1 3 では、 単位 幅の増加が 3以下であるかどうか判定する。 3以下であれば、 ステップ 2 0 2へと進み、 再度同様な認識処理を行う。 そ う でなければステップ 2 1 4 に進む。 ステップ 2 1 4では、 認識が失敗したと して処理を終了 する。
前記の レフ トガー ドのテス ト、 センターバーのテス ト、 数値の認識 において、 バー及ぴスペース幅をあら力 じめ規定されているパターンと 比較し評価をする。 その評価の手順について次に述べる。
第 6 図は、 スペース幅を説明するための図であ り 、 第 7 図は、 許容誤 差率を説明するための図である。
バーとスペース の幅は、 単位幅の整数倍であ り 、 倍率ごとに評価され る。 スペース幅 1 5 は、第 6 図に示すよ う に、 隣接する 2 つのバー 1 3 , 1 4間の幅である。 スペース幅 1 5 は、 次のよ う に求める。
隣接するバー ( L ) 1 3 とバー ( L 2 ) 1 4 に対して、 水平走査線ご と にバー間の画素数を求める。 パー ( L ) 1 3およびバー ( L 2 ) 1 4 が共有する全走査線におけるバー間の画素数の平均をスペース幅 1 5 と する。
バーコー ドのパターンは、 基準と なるモジュール幅 (単位幅) の整数 倍の幅を持つパーまたは、 スペース の並びで規定されている。 幅の倍率 をそれぞれ 1 , 2 , 3 ,— 4 とする。 こ こで、 最も狭い幅が 1 、 もっ と も 広い幅が 4 である。
次の条件を満たす最小の倍率が、 そのバー (スペース) 幅の倍率とな る。 すなわち、 バー (スペース) 幅が倍率 X単位幅士許容誤差の範囲內 にあるこ とが条件である。
こ こで、 許容誤差は、 許容誤差 =単位幅 X許容誤差率で定義される。 許 容誤差率は、 倍率ごとに第 7図に示すよ う に規定されている。 こ こで、 許容誤差を持たせるのは、 2値化による画素の欠落の影響を考慮したた めである。 低解像度のデジタルカメ ラで、 バーコー ドを撮影した場合、 その画像における単位幅は、 2画素程度しかない。 2値化を行う と、 バ 一の画像に、 1 画素の程度の欠けや、 膨張のノイズが存在する。 幅 2画 素のバーと して許容誤差なしで比較する と、 1 画素幅や 3画素幅は、 異 なる幅と して認識される。 しかし、 実際には、 2値化のノイズによ り 2 画素幅が、 1 画素幅や 3画素幅になるこ とがある。 許容誤差を設ける こ とに - り 、 ~の幅の変 ftを考盧し、 同 じ幅である と する と ができ ス
記ステップ 2 0 2 の レフ ガー ドのテス 卜は 、 次のよ う に行う 。 第 8 図は、 レフ ガ一 Kの幅の並ぴパタ一ンを 明するための図であ り 第 9図はゝ レフ 卜ガ一 Kのノ 、 スぺ · _ス の並びパタ一ンを説明す るための図である。
第 8 図及び第 9図に示す う に規定されたレフ トガ一ドのノ 一 、 スぺ
—ス の幅の並びノ タ一ンと 、 抽出されたノ ー コ一ド領域において幅の評 価に基づいて求めたレフ 卜ガ一ドの幅のバー、 スぺースの並びノ タ一ン とを照合し、 パターンが一致した場合、 そのバ一は、 有効な レフ トガ一 ドを構成するバ一である とする。
前記ステップ 2 0 3 、 2 0 8 の数値の認識は 、 次のよ う に行う 第 1 0図は、 数値に対するノ^ ~及ぴスペースの幅の並ぴのパタ一ンの 規定を示す図であ り 第 1 1 図は 第 1 0 図に示す幅 1 力 ら幅 4 が、 バ 一幅力、スペース幅であるかの組み合わせを示す図であ り 、第 1 2 図は、 数値の認識の処理の流れを示すフロ ーチヤ一卜でめ る。
第 1 0図に レ、て、 左側の 6桁に対する幅の並ぴノヽ。ター ンには、 奇数 ノ y ティ と偶数パ リ ティ が存在する。 第 1 0図に示す幅の並ぴは、 奇数 ノ ジ ティ のと さである。 偶数パリ ティ の時は、 同 じ表を逆方向から 、 つ ま り幅 4、 幅 3 、 幅 2、 幅 1 と読む。 例えば奇数パリ ティ で数値 9 は、 左から 3倍幅のスペース、 単位隔のノ 一、 単位幅のスペース 、 2倍幅の ノ ―の並ぴパタ ―ンで表され、 偶数パリ ティ で数値 1 は、 左から、 単位 幅のスペース 、 2倍幅のパー、 2倍幅のスペース、 2倍幅のノ 一の並ぴ ス、タ一ンで表される (第 1 8図の左側 1 , 2番のデータキャ ラク タ一参
)。
第 1 1 図において、センターバーよ り も左側の 6桁と右側の 6桁では、 バ一とスぺースの並びのパターンが異なるので、 第 1 1 図では、 2種類 のノ ターンが定義されている。例えば、右側で奇数パリ ティ で数値 6 は、 左から、 単位幅のバー、 単位幅のスペース 、 単位幅のバー、 4倍幅のス ぺ一スの並ぴノ ターンで表される (第 1 8 図の右側 1 番のデータキャラ ク タ一参照)。
第 1 2 図のフ口一チャー トにおいて、 ステツプ 3 0 1 では、 左側の 6 桁のデータキャラク ターに対して、 レフ トガ一 ドのテス ト と同様な手順 で、 対象のバー、 スペースの幅の並びのパターンを求める。
ステップ 3 0 2では、 第 1 0 図及び第 1 1 図に規定された照合パター ンを用いて、 前記した幅の評価を行い、 バーとスペースの並びのパター ンが一致するかどうか順に調べる。 左側 6桁においては、 奇数パリ ティ の幅パターンか偶数パリ ティ の幅パターンかも順次調べる。
ステップ 3 0 3 では、 パターンが一致する と判定された時は、 ステ ツ プ 3 0 4 に進む。 そ う でなければ、 ステ ップ 3 0 7 に進む。 ステップ 3 0 4 では、 入力画像よ り得られた実際の幅と規定されている幅のパター ンと の幅差を求める。 幅差は、 対応する 4つの幅のそれぞれの差の合計 値とする。
ステップ 3 0 5では、 幅差がそれまでに見つかつた の り も小さか つた場合は、 ステップ 3 0 6 に進む。 そ う でなければ 、 ステップ 3 0 7 に進む。
ステ ップ 3 0 6 では、 そのパターンに対応する数値を 識候補の数値 と して記憶しておく。 同時に 、 奇数パ リ ティ か偶数パ ティ の種別も記 億しておく 。 なお、 幅差の初期値は、 最大値に設定されてレ、る。
ステ ップ 3 0 7 では、 第 1 0図に示すすべての照合ノ"?タ一ン (数値 0
〜 9 ) について処理が終了 していれば、 ステップ 3 0 8 に進む。 そ う で なければ、 ステツプ 3 0 2 に進み、 次の照合パターンについて処理を操 り返す。
ステ ップ 3 0 8 では、 規定されている数値のパターンと一致した場合 に、 その数値を認識結果と し 、 ステップ 3 0 9 に進み 、 成功と して 処理を終了する。 そ う でなければ、 認識不成功と して 、 ステップ 3 1 0 に進み、 処理を終了する。
ステップ 2 0 5 のプレフィ ックスデジッ トの認識は 、 次のよ う に して 行 つ。
第 1 3 図は、 奇数パリ ティ と偶数パリ ティ の組み合わせ結果 (プレフ イ ツクスデジッ ト) を示す図であ り 、 第 1 4図は、 センターバーの幅の 並びパターンを示す図であ り 、 第 1 5 図は、 センターバーのバー、 スぺ —スの並びパターンを示す図である。
ステ ップ 2 0 5 においては、 左側 6桁の認識がすべて成功した時の奇 数パリ ティ と偶数パ リ ティ の記録からプレフィ ッ ク スデジッ ト を認識す る。 奇数パリ ティ と偶数パ リ ティ の組み合わせ結果は、 第 1 3 図に示す よ う になつており 、 テーブルから検索 し、 一致したものをプレフィ ック スデジッ ト と して認識する。 一致する組み合わせが見つからなかったと きは、 プレフィ ックスデジッ トの認識は、 失敗と して処理を終了する。 第 1 8図の例では、 左側 6桁のデータキャラク ター 5 は、 奇数パリ ティ の 9、 偶数パ リ ティ の 1 、 奇数パ リ テ ィ の 2 、 奇数パ リ ティ の 3 、 偶数 パリ ティ の 4、 偶数パリ ティ の 5 であ り 、 ノ、。リ ティ の組み合わせは 1 0 1 1 0 0 なのでプレフ ィ ッ ク スデジッ ト 8 は第 1 3 図よ り 4 (第 1 8 図 の左端に表示)である。
ステ ップ 2 0 7 のセンターバーのテス ト は、 レフ トガー ドのテス ト と 同様に、 ノ、。ターンのマッチングを行う。 なお、 センターバーのテス トに 用レヽるバー、 スペースの幅の並びパターンは、 第 1 4 図及び第 1 5 図に 示すよ う になっている。 .
なお、 本発明は上記実施の形態に限定されず、 種々変更して実施する こ とが可能である。
また、 本発明のバーコ一 ド認識装置を携帯電話機に組み込むこ と も可 能である。 携帯電話機にバーコー ド認識装置を組み込むこ と によ り 、 ど こでも手軽にバーコー ド認識ができ る よ う にな り 、 さ らに、 バーコー ド 認識装置で認識したバーコ一 ドを即座に送信可能である。
第 1 6 図は本発明のバーコー ド認識装置をカメ ラ內蔵型携帯電話機に 組込んだ場合のプロ ック図であ り 、 カメ ラ内蔵型携帯電話機は電波を送 受信するアンテナ 2 1 、 無線通信の送受信を制御する無線部 2 2 、 ユ ー ザからのキー操作情報を入力生成するキー入力部 2 3 、 文字情報や画像 情報をユーザに表示する表示部 2 4、 音声信号を出力するス ピーカー 2 5、 ユーザから音声信号を入力するマイ ク 2 6 、 受信又は入力された文 字情報、 画像情報、 音声信号を記憶する記憶メ モ リ 2 7、 対象と なる画 像情報を入力するカメ ラ 2 8、 及びバーコー ド認識装置を内蔵し、 各部 を制御する制御部 2 9 とから構成される。
上記構成を有するカメ ラ内蔵型携帯電話機において、 カメ ラ 2 8 よ り 入力 された画像情報 (バ一コー ド) からバーコー ドの認識を行う場合、 ユーザはキー入力部 2 3 を操作しカメ ラ動作を選択する。 制御部 2 9 は キー入力部からの設定に基きカメ ラ 2 8 を初期化し、 画像情報 (バーコ 一 ド) の取り 込みを開始する。 カメ ラ 2 8 よ り 取り 込まれた画像情報 (バ 一コー ド) は制御部 2 9 を介し記憶メ モ リ 2 7 に転送される。 制御部 2 9 は記憶メ モ リ 2 7 に格納された画像情報 (バーコー ド) を表示部 2 4 に転送し、 画像情報 (バーコー ド) の表示を行う。 また、 画像情報 (バ 一コー ド) を連続的に取り込み、 表示するこ とで、 ユーザはカメ ラ画像 を動画と して確認できる。 一方、 記憶メ モ リ 2 7 に格納された画像情報
(バーコ一 ド) はバーコ一 ド認識装置を有する制御部 2 9 に転送され、 本実施の形態で説明 したバーコ一 ド認識処理にてバーコ一 ド認識が行わ れる。 認識に成功した場合、 認識結果を記憶メ モ リ 2 7 に転送し、 記憶 メ モ リ 2 7 にバーコー ドデータ と して格納する。
次に記憶メ モ リ 2 7に格納されたパーコー ドデータ を無線又はイ ンタ ーネ ッ トに接続し送信先に送信する際の動作について第 1 7 図を用いて 説明する。 ュ一ザはキー入力部 2 3 を操作し無線又はイ ンターネ ッ トへ の接続を選択する。 制御部 2 9 はキー入力部からの設定に基き無線部 2 2へ無線又はイ ンターネッ トへの接続を指示する。 無線部 2 2 は制御部 2 9 からの指示に基づき無線又はイ ンターネ ッ トへの接続を開始する。 ユーザはキ一入力部 2 3 を操作し記億メ モ リ 2 7 に格納済みのパーコー ドデータの送信を選択する。 制御部 2 9 はキー入力部 2 3 からの設定に 基き記憶メ モ リ 2 7 に格納済みのバーコー ドデータを無線部 2 2へ転送 し送信を指示する。 無線部 2 2 は制御部 2 9 からの指示に基づき、 転送 されたバーコー ドデ一タを無線又はイ ンターネ ッ トに送信する。 無線部 2 2 よ り送信されたバーコー ドデータは無線網 3 3 を介し U R Lデータ サーバ 3 2へと送信される。 U R Lデータサーバ 3 2 は携帯電話端末 3 4の無線網 3 3 とイ ンターネッ ト 3 1 のゲー ト ウェイ の動作制御を行う U R Lデータサ一バ 3 2 は受信したバーコー ドデータ と U R Lデータべ ースから送信先の U R Lを検索しイ ンターネッ ト 3 1 への接続を行い送 信先へバーコ一 ドデータを転送する。 転送完了の結果は携帯端末 3 4 に 送信される。
また、 本発明は、 コ ンピュータ をバーコー ド認織装置と して機能させ るプロ グラムと して、 また、 当該プロ グラムを記録した記録媒体と して も実現できる。 本発明の電子メ ール通信装置は、 本電子メ ル通信装置を機能させるた めのプロ グラムでも実現される このプ口 グラムは、 コンビユータで読 み取り 可能な記録媒体に格納されていても レ、
この記録媒体と して、 バーコ一 ド認 置内蔵の R O Mそのもの力 Sプ 口グラムメディ アであってもよレ、 し、 またノ 一コ一 ド認識装置を C D —
=± -
R O M ドライブ等のプロ グラム み取 り 装 ι£に接続し、 そこに記録媒体 を揷入するこ とで H5Cみ取り 可能な C D一 R ο Μ等のプロ グラムメディ ア であつてもよい。 レ、ずれの場合におレヽても 、 格納されているプロ グラム は C P Uがァクセス して実行させる構成であつてあよいし、 プログラム み出 し、 SJEみ出されたプログラムは、 図示されていないプロ グラム 記憶エリ アにダウンロー ドされて 、 そのプ グラムが実行される方式で あつても よい。 このダウンロ ー ド用のプ口グラムは予め本体装置に格納 されて^ヽるものとする。
-- こで上記プログラムメアイァは、 体と分離可能に構成される 己録 媒体であ り 、 磁気テ一プゃカセク トテ一プ等のテープ系、 フロ ッ ピーデ ィ スクゃノヽ ー κディ スク等の磁気ディ スクや C D一 R O M / M O / M D
/ Ό V D等の光ディスク のディスク系 I C力一 ド (メ モ リ カー ドを含 む) /光力一 ド等のカー ド系、 あるいはマスク R O M、 E P R O M、 E
E P R O M , フラ ソシュ R O M等による半導体メモ リ を含めた固定的に プ口 グラムを担持する媒体であつても よい
さ らに、 ノ ー コ 一 Γ BB¾ ¾ iaを備え 帯電 機の送信部及ぴ受信部 を介して通1 (言ネッ 卜 ワーク力 らプ口 グラムをダクンロー ドする よ う に、 流動的にプロ グラムを担持する媒体であってもよい なお のよ う に 通信ネッ ト ワーク力 らプロダラムをダウン口一 ドする場合には 、 そのダ ゥンロ ー ド用プログラムは予め装置本体に格納しておく か、 あるいは別 な記録媒体からイ ンス トールされる ものであっても よい。 なお 、 記録媒 体に格納されている内容と してはプロ グラムに限定されず、 デ一タであ つても よい。
産業上の利用可能性
以上説明 したよ う に本発明によれば、 携帯端末に内蔵される よ ラ な小 型のイ メージセンサで用いたカメ ラによ り 、 撮影したバー コ一 ド画像-よ り 、 精度よ く 、 バーコー ドを認識する こ とができ る。 また、 本発明によ れば、 低解像度のカメ ラを用いた場合にもバー コ 一 ドを認識する こ とが でき るため、 特別にバー コー ドリ ーダを付加 しなく と もバー コー ドを読 み取る こ とができ る よ う になる。

Claims

請 求 の 範 囲
1 .入力画像に対して前処理を行う 前処理手段と、 前処理後の入力画像 に対して 2値化を行う 2値化処理手段と、 2値化処理後の入力面像に対 してラベル付けを行う ラベル付け手段と、 ラベル付け後の入力画像から バーコ— ド領域を抽出するバーコ一 ド領域抽出手段と、 抽出されたバー コー ド領域からバーコ一 ドを認識するバーコ一 ド認識手段と、 を具備す るこ と を特徴とするバーコ一 ド認識装置。
2 - 前処理手段は、 ヒス ト グラ ム変換を行う こ と を特徴とする請求の範 囲第 1 項に記載のバーコ一 ド認識装置。
3 . 2値化処理手段は、 画像の 2値化における閾値の決定方法と して、 判別分析法を用いる こ と を特徴とする請求の範囲第 1 項又は第 2項に記 載のバーコ一 ド認識装置。
4 . ラベル付け手段は、 入力画像に対して 1 つ 1 つの違結されたパター ン毎に個別の数値名を振るこ と によ り ラベル付けを行う こ と を特徴とす る請求の範囲第 1 項から第 3項のいずれかに記載のパーコー ド認識装置。
5 . ラベル付け手段によ り ラベル付けされた入力画像よ り 、バーの幅を、 当該バーに係るラベルの黒画素数 Z垂直方向の高さで定義するこ と を特 徴とする請求の範囲第 4項に記載のバーコー ド認識装置。
6 . バー又はスペースの幅を照合する と きに、 幅に応じた幅の許容範囲 を設定するこ と を特徴とする請求の範囲第 5項に記載のバーコ一 ド認識 装置。
7 . バーコー ド領域抽出手段は、 パーの隣接関係を抽出し、 その隣接関 係からバーの左端とバーの右端と を決定し、 バーの左端とバーの右端と の間のバーの数がある規定値と一致する こ と によ り バーコ一 ド領域を抽 出する こ と を特徴とする請求の範囲第 1 項から第 6項のいずれかに記載 のバーコ— ド認識装置。
8 . バーの隣接関係は、 2つのバーが共有する走査線があるこ と、 2つ のバーの高さの差がある範囲内である こ と、 2つのバーの間隔がある範 囲内であるこ とをすベて満たす場合に隣接している と判定し、 バーの高 さの差の範囲及びバ一の間隔の範囲は、 基準となるバーの高さ と幅から 適応的に求められるこ と を特徴とする請求の範囲第 7項記載のバーコ一 ド認識装置。
9 . バーコー ド認識は、 バーコー ド領域抽出手段によ り 抽出されたパ一 コ一 ド領域内のバーで最小の幅を単位幅と して用い、 前記抽出されたバ ーコ一 ド領域における この単位幅の整数倍のバー及びスペースの幅のパ ターンの並びと予め規定されたバー及びスペースの幅のパターンの並ぴ と を照合するこ とによ り行う こ と を特徴とする請求の範囲第 7項又は第 8項に記載のバーコ一 ド認識,装置。
1 0 . バーコ一 ド認識は、 単位幅を変化させて線り返し行 う こ と を特徴 とする請求項 9 に記載のバーコ一 ド認識装置。
1 1 . 請求の範囲第 1 項から第 1 0項のいずれかに記載のパーコー ド認 識装置を備えたこ とを特徴とする携帯電話機。
1 2 . 、入力画像に対して前処理を行う工程と、 前処理後の入力画像に対 して 2値化を行う 工程と、 2値化処理後の入力画像に対してラベル付け を行 う工程と、 ラベル付け後の入力画像からバーコ一 ド領域を抽出する 工程と、 抽出されたバーコ一 ド領域からバーコ一 ドを認識する工程と、 を有するこ と を特徴とするバーコ一 ド認識方法。
1 3 . コ ンピュータを、 入力画像に対して前処理を行う 前処理手段と、 前処理後の入力画像に対して 2値化を行う 2値化処理手段と、 2値化処 理後の入力画像に対してラベル付けを行う ラベル付け手段と、 ラベル付 け後の入力画像からバーコ一 ド領域を抽出するバーコ一 ド領域抽出手段 と、 抽出されたバーコ一 ド領域からバーコ一 ドを認識するバーコ一 ド認 識手段と、 を具備するこ と を特徴とするバーコ一 ド認識装置と して機能 させるためのプログラム。
1 4 . 請求の範囲第 1 3項に記載のプロ グラムを記録したこ と を特徴と するコ ンピュータ読み取り 可能な記録媒体。
PCT/JP2002/013194 2002-12-17 2002-12-17 バーコード認識装置 WO2004055713A1 (ja)

Priority Applications (7)

Application Number Priority Date Filing Date Title
EP02786131A EP1580683B1 (en) 2002-12-17 2002-12-17 Barcode recognition apparatus
PCT/JP2002/013194 WO2004055713A1 (ja) 2002-12-17 2002-12-17 バーコード認識装置
CNB028301994A CN100458827C (zh) 2002-12-17 2002-12-17 条形码识别装置
JP2004560576A JPWO2004055713A1 (ja) 2002-12-17 2002-12-17 バーコード認識装置
DE60228894T DE60228894D1 (de) 2002-12-17 2002-12-17 Vorrichtung zur erkennung von strichcodes
US10/539,236 US7562820B2 (en) 2002-12-17 2002-12-17 Barcode recognition apparatus
AU2002354210A AU2002354210A1 (en) 2002-12-17 2002-12-17 Barcode recognition apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2002/013194 WO2004055713A1 (ja) 2002-12-17 2002-12-17 バーコード認識装置

Publications (1)

Publication Number Publication Date
WO2004055713A1 true WO2004055713A1 (ja) 2004-07-01

Family

ID=32587957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/013194 WO2004055713A1 (ja) 2002-12-17 2002-12-17 バーコード認識装置

Country Status (7)

Country Link
US (1) US7562820B2 (ja)
EP (1) EP1580683B1 (ja)
JP (1) JPWO2004055713A1 (ja)
CN (1) CN100458827C (ja)
AU (1) AU2002354210A1 (ja)
DE (1) DE60228894D1 (ja)
WO (1) WO2004055713A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081832A1 (en) * 2010-12-16 2012-06-21 Lg Innotek Co., Ltd. Apparatus and method for recognizing barcode
CN102955834A (zh) * 2011-08-31 2013-03-06 上海夏尔软件有限公司 基于条码位置识别的精确图像切分方法

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1792077B (zh) * 2003-05-19 2011-10-26 沃达丰集团股份有限公司 移动体通信终端
US7762473B2 (en) * 2006-11-28 2010-07-27 Xerox Corporation Machine-readable code format
JP4362578B2 (ja) * 2007-05-10 2009-11-11 シャープ株式会社 操作手順表示システム
JP2009049483A (ja) * 2007-08-13 2009-03-05 Ricoh Co Ltd データ通信装置、データ通信方法、データ通信プログラム
TW201025152A (en) * 2008-12-31 2010-07-01 Icp Electronics Inc Method for fast locating pattern
EP2454860A4 (en) * 2009-07-14 2014-11-05 Dpid Pty Ltd APPARATUS AND METHOD FOR MANAGING A REGISTER OF SINGLE IDENTIFIERS
CN102034084B (zh) * 2009-09-25 2013-03-06 神基科技股份有限公司 多类型条形码的辨识方法及条形码辨识装置
CN102117399A (zh) * 2009-12-31 2011-07-06 北京东方开元信息科技有限责任公司 一种识别公文条码的方法和装置
US8162223B2 (en) * 2010-03-08 2012-04-24 Seiko Epson Corporation Method and apparatus for creating pixel tokens from machine-readable symbols to improve decoding accuracy in low resolution images
EP2619711A4 (en) 2010-09-20 2017-06-07 HID Global Corporation Machine-readable symbols
US9483677B2 (en) 2010-09-20 2016-11-01 Hid Global Corporation Machine-readable symbols
US8333326B2 (en) * 2010-10-07 2012-12-18 Nidec Sankyo Corporation Stacked barcode reader and stacked barcode reading method
CN102063616A (zh) * 2010-12-30 2011-05-18 上海电机学院 一种基于图像特征匹配的商品自动识别系统及方法
JP5321610B2 (ja) * 2011-02-04 2013-10-23 カシオ計算機株式会社 スキャナ装置及びプログラム
JP5223940B2 (ja) * 2011-03-28 2013-06-26 カシオ計算機株式会社 スキャナ装置及びプログラム
CN103034834B (zh) * 2011-09-29 2015-07-29 无锡爱丁阁信息科技有限公司 条码检测方法及装置
CN103034831B (zh) * 2011-09-30 2015-05-27 无锡爱丁阁信息科技有限公司 线性条码识别方法和系统
US9674430B1 (en) * 2016-03-09 2017-06-06 Hand Held Products, Inc. Imaging device for producing high resolution images using subpixel shifts and method of using same
CN105894074B (zh) * 2016-04-15 2019-01-15 大连声鹭科技有限公司 一种防伪条形码标签、防伪条形码标签信息采集器、采集方法及防伪验证系统
KR102638707B1 (ko) * 2018-10-31 2024-02-21 삼성전자주식회사 바코드를 판독하는 방법 및 전자 장치
CN109754044B (zh) * 2019-01-14 2021-10-15 上海喜马拉雅科技有限公司 条形码、条形码生成方法及识别方法
US11531826B2 (en) * 2019-11-01 2022-12-20 Zebra Technologies Corporation Systems and methods for user choice of barcode scanning range
CN111797645B (zh) * 2020-07-08 2024-06-14 北京京东振世信息技术有限公司 用于识别条形码的方法和装置
EP4287066B1 (de) * 2022-05-31 2024-05-15 Sick Ag Bestimmen der modulgrösse eines optischen codes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS578874A (en) * 1980-03-06 1982-01-18 Reynolds Tobacco Co R Bar code reader
JPS63115282A (ja) * 1986-11-01 1988-05-19 Nippon Denso Co Ltd バ−コ−ド読取装置
JPH0519694A (ja) * 1990-10-30 1993-01-29 Omniplanar Inc 多解像度機械の読み取り可能な記号
JPH0922437A (ja) * 1995-07-06 1997-01-21 Fujitsu Ltd バーコード認識装置

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5153418A (en) 1990-10-30 1992-10-06 Omniplanar, Inc. Multiple resolution machine readable symbols
US5343028A (en) * 1992-08-10 1994-08-30 United Parcel Service Of America, Inc. Method and apparatus for detecting and decoding bar code symbols using two-dimensional digital pixel images
CN1083238A (zh) * 1992-08-27 1994-03-02 清华大学 一种条形码识别算法
DE69331456T2 (de) * 1992-10-09 2002-11-07 Matsushita Electric Ind Co Ltd Überprüfbare optische Zeichenerkennung
JPH06325197A (ja) 1993-05-14 1994-11-25 Fujitsu Ltd バーコード認識方法
JP3265804B2 (ja) 1994-03-18 2002-03-18 富士通株式会社 バーコード読取り装置
JPH08161423A (ja) 1994-12-06 1996-06-21 Dainippon Printing Co Ltd 照明装置および文字読取装置
JP3335265B2 (ja) 1995-06-29 2002-10-15 富士通株式会社 バーコード抽出装置
US5565669A (en) * 1995-09-06 1996-10-15 Intermec Corporation Orientation independent method for robust computing of X-dimensions in code one symbols
JPH1015150A (ja) 1996-06-28 1998-01-20 Sanyo Electric Co Ltd 将棋盤上の駒有無認識装置
JPH1015152A (ja) 1996-07-08 1998-01-20 Sanyo Electric Co Ltd 将棋盤上の駒有無認識装置
JPH10105641A (ja) 1996-09-30 1998-04-24 Toshiba Corp 機械コード検出装置と機械コード検出方法
JP2000285197A (ja) 1999-03-31 2000-10-13 Fujitsu Kiden Ltd バーコード認識方法及びバーコード読み取り装置
JP2001014421A (ja) 1999-06-28 2001-01-19 Matsushita Electric Ind Co Ltd バーコード読み取り装置
JP2001014555A (ja) * 1999-06-29 2001-01-19 Nec Corp Posシステム
US6674919B1 (en) * 1999-09-21 2004-01-06 Matsushita Electric Industrial Co., Ltd. Method for determining the skew angle of a two-dimensional barcode
JP2001119683A (ja) 1999-10-20 2001-04-27 Fujitsu General Ltd 画像センサ装置
JP2001197186A (ja) 2000-01-12 2001-07-19 Yasuhiro Tsuji 電話機の自動認識システムによる発信接続システム
JP2002196509A (ja) 2000-12-25 2002-07-12 Nagase Kasei Kogyo Kk フォトレジスト剥離剤組成物及びその使用方法
KR100393423B1 (ko) 2001-03-21 2003-08-02 김지영 2차원 바코드 정보 인식방법
JP2002290607A (ja) 2001-03-27 2002-10-04 Sanyo Electric Co Ltd 通信端末装置、通信方法及びネットワークシステム
CN2471019Y (zh) * 2001-04-16 2002-01-09 秦建忠 一种带条形码扫描系统的移动通讯终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS578874A (en) * 1980-03-06 1982-01-18 Reynolds Tobacco Co R Bar code reader
JPS63115282A (ja) * 1986-11-01 1988-05-19 Nippon Denso Co Ltd バ−コ−ド読取装置
JPH0519694A (ja) * 1990-10-30 1993-01-29 Omniplanar Inc 多解像度機械の読み取り可能な記号
JPH0922437A (ja) * 1995-07-06 1997-01-21 Fujitsu Ltd バーコード認識装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1580683A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081832A1 (en) * 2010-12-16 2012-06-21 Lg Innotek Co., Ltd. Apparatus and method for recognizing barcode
US9195874B2 (en) 2010-12-16 2015-11-24 Lg Innotek Co., Ltd. Apparatus and method for recognizing barcode
CN102955834A (zh) * 2011-08-31 2013-03-06 上海夏尔软件有限公司 基于条码位置识别的精确图像切分方法

Also Published As

Publication number Publication date
CN100458827C (zh) 2009-02-04
US7562820B2 (en) 2009-07-21
AU2002354210A1 (en) 2004-07-09
CN1742279A (zh) 2006-03-01
EP1580683A1 (en) 2005-09-28
EP1580683B1 (en) 2008-09-10
DE60228894D1 (de) 2008-10-23
EP1580683A4 (en) 2006-04-26
JPWO2004055713A1 (ja) 2006-04-20
US20060113390A1 (en) 2006-06-01

Similar Documents

Publication Publication Date Title
WO2004055713A1 (ja) バーコード認識装置
US20220392244A1 (en) Decoding 1d-barcodes in digital capture systems
US10621470B2 (en) Methods for optical character recognition (OCR)
EP2568412B1 (en) Apparatus for recognizing character and barcode simultaneously and method for controlling the same
US11036949B2 (en) Scanner with control logic for resolving package labeling conflicts
US7172124B2 (en) Camera-based barcode recognition
EP1909215B1 (en) Image region detection method, recording medium, and device therefor
JP4415010B2 (ja) 2次元コード領域抽出方法、2次元コード領域抽出装置、電子機器、2次元コード領域抽出プログラム及びそのプログラムを記録した記録媒体
US20110063468A1 (en) Method and apparatus for retrieving label
JP5146190B2 (ja) 文字認識装置、文字認識プログラム、および文字認識方法
WO2013044875A1 (zh) 线性条码识别方法和系统
KR20070081410A (ko) 이차원 코드 검출 시스템 및 이차원 코드 검출 프로그램
US20060202040A1 (en) Camera-based barcode recognition
JP2010277446A (ja) バーコード処理装置及びバーコード処理方法
JP2007034625A (ja) 情報表示装置
US10509934B1 (en) Methods and apparatus for improving QR code locator detectability and/or finding the corners of a locator pattern
JP4163406B2 (ja) バーコード認識装置
US10762405B2 (en) System and method for extracting bitstream data in two-dimensional optical codes
CN108108646B (zh) 条码信息识别方法、终端和计算机可读存储介质
KR100791704B1 (ko) 바코드 인식 장치
JP4853313B2 (ja) 文字認識装置
JP2008040910A (ja) 文字列判定装置、文字列判定方法、文字列判定プログラムおよびコンピュータ読み取り可能な記録媒体
KR100791705B1 (ko) 바코드 인식 장치
KR100784200B1 (ko) 이미지에 따른 코드 정보를 내장한 코드의 판독 방법 및장치
US20230419060A1 (en) Method, System and Apparatus Employing an Adaptive Threshold to Decode Barcodes

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ OM PH PL PT RO RU SD SE SG SK SL TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LU MC NL PT SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2004560576

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 2006113390

Country of ref document: US

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 1020057011092

Country of ref document: KR

Ref document number: 10539236

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2002786131

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 20028301994

Country of ref document: CN

WWP Wipo information: published in national office

Ref document number: 2002786131

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 1020057011092

Country of ref document: KR

WWP Wipo information: published in national office

Ref document number: 10539236

Country of ref document: US

WWG Wipo information: grant in national office

Ref document number: 2002786131

Country of ref document: EP